Songs, Music Blogs & Other Blog Topics

Step 2 – Head

Last update: February 15 2019

An HTML document has two parts: A Head and a Body. The Head usually contains a title that appears at the top of a browser tab. The Body contains all the details about the lay out. This shapes the website that becomes visible in the browser window.

Add A Head-element

Let’s add a Head element to our document. Make sure your document will look like below. The bold part is what’s newly added to the document. The text that’s printed italic, is a place holder. This means you can change this to your own text:

<title>my own homepage</title>


This piece of coding tells the browser to print your TITLE in the HEAD of the browser. The text that’s printed within the title-tag shows at the top of your browser tab. You can test this by saving the file. Open your browser and open the file index.html. The browser window will be blank, because the Body section is still empty. However, you can see your title on the browser tab.

Opening And Closing HTML Tags

As you can see, you always open and close HTML tags. This counts for most HTML tags. In this case, you’ve also performed your first bit of nesting. Nesting means that you added an HTML tag within another. You’ve opened the HEAD-element first, then place the TITLE-tag within. Finally, you closed both.

Uppercase vs Lowercase

HTML tags can be written in both uppercase or lowercase.  Browsers read tags either way. Certain versions of HTML or XHTML are lowercase sensitive, though. But in any other option you can weigh out your options. By writing tags in uppercase, you’ll easily recognize tags if your HTML file has texts in it, too.

On to Step 3