Chapter 4. The HEAD Elements
IN THIS CHAPTER
Specifying the document title
Providing information to search engines
Setting the default path
Script sections
Style sections
Specifying profiles
Background color and background images
You have seen what various pieces make up HTML documents and how they all fit together. In the next group of chapters you will see how each individual piece is formatted and placed in the document. This specific chapter deals with the elements in the head section of the document.
Specifying the Document Title
The <head>
element of an HTML document contains several other elements including the document title. The document title is delimited between <title>
tags and can include any character or entity. For example, consider the following <head>
section, which includes a copyright symbol:
<title>Welcome to On Target Games ©</title>
This title shows in the title bar of Internet Explorer, as shown in Figure 4-1.
While it is useful to have the title of your document in the title bar of the client's browser, the title is used in several other locations, as well. It is used as the default shortcut/favorite name in most browsers, linked to in most search engines, and so on. As such, you should always include a title for your documents, and make it as descriptive (but concise) as possible.
Figure 4-1. Entities are rendered correctly in document titles.
Providing Information ...
Get HTML, XHTML, and CSS Bible, Fourth Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.