HTML Basics
Stanford University Libraries & Academic Information Resources

Title

 [Previous Page]  [Tutorial Top]  [Tech Guide]  [Next Page]

The Title element appears only in the head, because it is 'metadata', that is, information about the text but not really part of the text. Every HTML document must contain one and only one title and it should "identify the document in a global context". In other words, the reader may come to this document from a path that does make it obvious where the document fits in with other related materials, so a title like

<title>Chapter 1</title>

is useless, but a title like

<title>History of Boxing--Chapter 1</title>

makes sense.

The title normally isn't displayed by the browsing software (the <h1> element is used for that purpose--see the section on headings), but it is used for things like bookmarks, history lists, etc. Although there is no formal restriction on the length of a title, it is prudent to limit it to 64 characters (preferably less), since browsers will normally have to truncate anything much larger than that. Nice as it would be to use titles like

<title>
Stanford University Libraries &amp; Academic Resources--Preservation
Department--Procedures Manual
</title>

It just isn't possible. Every document from SUL/AIR would appear to have the identical title in people's history lists!

Note that the title can not contain markup (no highlighting, links, etc. It is strictly text.

Example

<html>
    <head>
        <title>HTML Basics--Title element</title>
    </head>
    <body>
    ....
    </body>
</html>

 [Previous Page]  [Tutorial Top]  [Tech Guide]  [Next Page]


Walter Henry
Stanford University Libraries and Academic Information Resources