Step 2 – Head

An HTML document has two parts. A Head and a Body. The Head usually contains a title, that appears at the top left of a browser. The body contains tags that determine the lay out. This shapes the website that becomes viewable in the browser.

We’ll add a Head to our document. Make sure your document will look like this. The bold part is what’s newly added to the document. The text that’s printed italic, is variable. You can change this to your own text:

<HTML>

<HEAD>
<TITLE>my own homepage</TITLE>
</HEAD>

</HTML>

With the above codes you have told the browser to print your TITLE in the HEAD of the browser. The text that’s printed within the title-tag will show on the top left of the browser. You can test this by saving the file. Open your browser and open the file index.html. The body will be empty, but way at the top of the browser you can see your title.

As you can see you open and close HTML tags. In this case, you open the header first, place the title within and then close both.

What you may have noticed is that the HTML tags are written here in CAPITOLS. This is not required. The browsers read the tags either way, but you will notice with maintenance that it saves you a lot of time when you write HTML tags this way. By writing tags in capitols you will easily find your way around the file. You can easily recognise the tags and the texts written within. However, if you are specifying a particular version of HTML in your document (in other words your document starts with something other than just <HTML>), use lowercase. Certain versions of HTML or XHTML are lower case sensitive.

On to Step 3

Bookmark the permalink.

Comments are closed