There are different ways of formatting your HTML documents, but only one method is considered correct.

Every HTML file should begin with the tag <HTML> and end with </HTML>.

The documents are then divided into two sections, the header - which always comes first, followed by the body.

The header is created using the tags <HEAD> and </HEAD>, the body is created using <BODY> and </BODY>.

Inside the header tags goes information which defines the file, such as information about who created it, and the name of the file. In fact, the most common thing to find in the header is the title, enclosed by the <TITLE> and </TITLE> tags. The title is what appears in the bar at the very top of the browser window, for example in this file, the title appears as Learn HTML in 20 Minutes.

Inside the body, goes all the other text, words, tags, and everything else you will include as part of your file.

Another thing you may notice, is the use of upper and lower-case letters. HTML doesn't see a difference between the two. <br> is the same as <BR> or <Br>. They'll all do the same thing. Some designers will tell you it is best to put all of your tags in capital letters so that it's easier to read them later, but that's up to you.


An example of a properly formatted HTML document, with no content.

Go To Page Two

[HTML Basics] | [Introduction To Tags] | [Tables] | [Frames] | [Cascading Style Sheets] | [Test] | [Creating Your First Web Site]