![]() |
|
You use the <head> tag to enter information that applies to the whole page. It is not content; the information does not appear in the browser window. The most important thing in the header is the title of your page. Every page must have a title at the beginning. For example: <head> <title>Ann’s idiot guide to creating web pages</title> </head> The title starts with the <title> tag and ends with a matching </title> tag. A browser displays the title at the top of its window and it also appears in the history list and on the list of favourites or bookmarks. Search engines use the title to add a page to their database and use the text in their search results. Make sure the title makes sense out of context; the title Introduction, for example, isn't helpful because it doesn't tell you anything about what is on the page. Use Introducing HTML instead. I don’t think there is a limit on how long a title can be but keep it shortish (64 characters or less). If you don’t type anything between the <title> tags, the browser usually displays the name of your document as the title. For a basic page, this is all you need in the header. You can now move on and add the HTML body with the content of your pages. You can enter your headings, paragraphs, lists, tables, pictures and sounds, links to other pages and forms to fill in. As you learn more about HTML, there are some other important tags that can appear in the <head> tag. They let you do interesting things like:
The other possible tags are <base> and <isindex>. These are described briefly in the A to Z of HTML Tags. |
More information The HTML header |