Ray's HTML Tutorial

The Basic Structure of an HTML Document

In progress....  

HTML (Hyper Text Markup Language) is not a programming language, as such, since there is no decision making, custom code or functions possible using the basic HTML language.  Instead, HTML is considered a document formatting language which defines the presentation of images and text as they appear on a web page.

Each element of an HTML web page must be enclosed in a pair of tags, one called an opening tag, the other a closing tag (there are a few exceptions, however).  The normal syntax for defining these tags is <TAG> content </TAG> so that it is clear to the browser where each element begins and ends.

Secondly, Each HTML document must contain 2 distinct sections, a <head> and a <body> section.  Additionally, these sections will surround all other tags used in the document and must be enclosed inside another pair of tags, <html> at the top of the document and </html> at the very end of the document.

 

 
<html>
  <head>
    <title> My Home Page </title>
  </head>       
   <body>
     Here is the story of my life.....
   </body>
</html>
        

This diagram shows a basic HTML template with the bare minimum of necessary information.

 
Please Click to view this simple page

First, please note how our simple page displayed the phrase "My Home Page" on the title bar of the new browser mini-window that opened when you clicked the above link.  The title is the most often used tag in the <head> section and will often be the only tag appearing with the <head> section.  Other stuff can go in the <head> section, but we are not ready for that yet.

Next, notice how the text "Here is the story..." appeared as the content of the page even though it was not enclosed in any of the tags we said were needed.  HTML will treat such text as a paragraph by default.

However, normally you will place simple text in a paragraph, which uses this pair of tags:  <p>Here starts and ends my paragraph.</p>.  When used, paragraphs must be included in the body section.

By the way, HTML tags are not case-sensitive by nature.  Nonetheless, to conform to accepted standards set up by the W3C, an internet standards administrative body, all tags should be lower case.

 

 

 

 

Next Page

 


Email:   

raykelly@rakelly.com