Hi, you can write JavaScript code inside HTML page. You can refer the following link-
- https://msdn.microsoft.com/en-us/library/gg309549.aspx
As mentioned in this link, you need to add "SDK.JQuery.js" to your HTML page. You can copy paste the code in JavaScript section of HTML page.
Also, you need to use "window.parent.Xrm.Page" instead of "Xrm.Page" only in JavaScript code in HTML page.