title Element


 

Module

The title element is declared by the XHTML 1.1 Structure Module

Elements in the Structure Module are:
html | head | title | body

Description

The title element within the head contains a title for the document. This title is not usually displayed on the page itself but is instead commonly placed in the title bar of the window or tab containing the document and is often used by a search engine when classifying and showing information about a page it has found. The page's title will often also be the default text used when a page is bookmarked, so it is wise to consider this when thinking of of a suitable title for your page.

This example shows the title element within the context of an XHTML document.

<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
   "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-GB">
  <head>
    <title>Page Title</title>
  </head>
  <body>
    <h1>Page Title</h1>
    <!--Your page content goes here-->
  </body>
</html>

#REQUIRED Attributes

There are no #REQUIRED attributes on the title element.


Specific Attributes

There are no specific attributes declared on the title element.


Common Attributes

Common attributes of the title element are listed below:

From the Core Attribute Collection

xmlns [ type URI - #FIXED 'http://www.w3.org/1999/xhtml' ]
XML namespace

From the I18N Attribute Collection

dir [ type Enumeration (ltr | rtl) ], from the Bi-directional Text Module
Left-to-right or right-to-left directionality
xml:lang [ type LanguageCode ]
A language code for the element

Content Model

The Content Model for the title element is:

#PCDATA

See Content Model & Nesting for information about Content Model syntax and Nesting Groups.

Valid children of title

Valid parents of title


Page Footer & Copyright

Copyright © Sally Maughan 2005-2009 (Page last updated on 01 Oct 2009)

*Valid XHTML 1.1 - hosted by *Openstrike

Content based on the W3C Working Draft: *XHTML 1.1 and Recommendation: *XHTML Modularisation 1.1.

W3C, XHTML, XML, HTML, CSS and MathML are *Trademarks of the W3C (*MIT, *ERCIM, *Keio) with which the site's author has no connection.


Up, Next & Previous Links

Your Location

Home > XHTML 1.1 Home > XHTML 1.1 Indexes > Element Index (XHTML 1.1) > title Element