Basic HTML tags

Besides the required tags, there are a couple more tags that most HTML pages have, even if they aren't strictly necessary.

HTML <title> Tag

The <title> tag allows you to set a short page heading, and this is displayed at the very top of the web browser, rather than in the main body of the document. This is a great way to personalize your pages a little bit, and it also helps the user when the window is minimized on the start menu, they can still tell at a glance which page is which. As an example, the title of this page is "Basic HTML tags", and you should see it displayed at the very top of the screen.

HTML <head> Tag

The <title> tag is actually a part of the web page's "header information". The header can be used to give web browsers various bits of information, such as the page description and author name, as well as the page title. All header information is included within the <head> and </head> tags.

If all this is sounding a little confusing, let's simplify it with an example of a basic web page that include the four basic HTML tags we have just discussed. Why not try following along with this example and making the web page yourself - simply open up your text editor and type what you see below. Alternatively you could copy and paste the text, and then save it as a web page by adding the ".htm" or ".html" extension.

<html>

<head>
<title>My first HTML page!</title>
</head>

<body>
This is my very first HTML page!
</body>

</html>

You can probably figure out the meaning of this code yourself, but let's walk through it anyway. First we have the opening <html> tag, which tells the browser that it is looking at a file coded in HTML. Next up we open the <head> section, and use this to set our page title, which will be displayed at the very top of the screen. Once this is done we can close the <head> section because we're done with it. We can then use the opening <body> tag to start the main body of the document. In here we can type our text and insert our pictures; whatever we want. We then close the <body> section, and finally we use the </html> closing tag to tell the browser it has come to the end of the file and can stop.