Structuring an HTML Document

The simple document template that you can do following the instructions on this page can be used again and again. Simply save the file to blank.html and then you can reuse it whenever you need to construct a new HTML document.

  • Open your text editor (notepad for windows, texteditor for mac)
  • Type the tag <html> at the top of the document.
  • the tag needs a closing </html> tag
    Example: 
    <html> 
     </html>
  • Place your cursor on the line between the opening <html> tags and end tag </html>. Type the tag <head> and make the closing tag </head>. Within the head tags comes special tags for search engines and for declaring different attributes to your document
    Example: 
      <html> <head> </head>
    </html>
  • to create the document title, which appears in the title bar of the browser window, enter <title> and is end tag </title> between the head tags
    Example: 
    <html> 
    <head>
    <title> 
    </title>
    </head> 
        </html>
      • the last tag you need to add is the <body> tag. Within this tag is where you write your content that you want to appear on your page. Don´t miss out on the closing tag </body>
      • Example: 
         <html>  
        <head>  
        <title>  
        </title>  
        </head> 
         <body> 
         </body>  
        </html>
      • Save your document. A good idea is to save it to blank.html so that you can reuse this as a template. However I would rewrite the code in the beginning over and over again so that you memorize this simple format. 
        If you open the document your browser will open it. However you will not see anything as you have only constructed the containing elements! Follow the rest of the tutorials and you will have a blistering page within no-time!