In order to compile your HTML page, simply go to File -> Save As and save it as a .html file. If given the options choose UTF-8 encoding and save as ‘all files’. Saving procedures differ from program to program. Now that you’ve saved it, drag and drop that .html file onto your favorite web browser (assuming you have content on your page, it will appear). If you are using a non-HTML specific editor, ensure that Rich Text Formatting is turned off.
When you create a simple HTML page, you can use the following template. In most HTML web pages, you need to include the following.
<HTML> <!-- Required-->
<HEAD> <!-- This shows the title of the page-->
<TITLE>--Include Name Here--</TITLE> <!-- This is the Title of your page-->
--You include all the Webpage content here--
The first thing you should know about HTML, is that it uses things called “Tags.” The Tags in the template are <BODY>, <HEAD>, <HTML>…You get what they are. They are pieces of code included in the <>.
When you start a tag, you write the tag above what you’re including in your tag. After you finish what you wanted to include in your tag, you end it with a tag that looks like this </BODY>. It doesn’t have to say BODY. It is supposed to say whatever the Tag you specified says.
For Hello World!, you use the template above. But where it says <BODY>, you hit return once. Then type “Hello World!” The code should look like this. What you should type is italicized.
<TITLE>My Hello World! Page</TITLE>
In order to test out your program, save your program as an html file by typing in .html after the document’s name. Then drag and drop the .html file into your browser and watch the magic!
And now you have mastered the basics: Remember the following
HTML uses Tags. i.e. <BODY>, </BODY>
You have to include the ending tag. You know it is the ending tag because it contains the same letters as the previous tag, as well as a forward slash before the word.