<head> Creating a Web Page's HeadThe <head> element contains the head of an XHTML document, which should contain at least a <title> element. The <head> element is supported in XHTML 1.0 Strict, XHTML 1.0 Transitional, XHTML 1.0 Frameset, and XHTML 1.1. Here are the attributes of this element:
Each XHTML document should have a <head> element, like the one in this example: <?xml version="1.0"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title> Welcome to my page </title> </head> <body> <h1> Welcome to XHTML! </h1> </body> </html> The head of an XHTML document holds information that isn't directly displayed in the document itself, such as a title for the document (which usually appears in the browser's title bar), keywords that search engines can pick up, the base address for URIs, and so on. The head of every XHTML document is supposed to contain a <title> element, which holds the title of the document. This element also supports the usual attributes, such as lang and xml:lang , as well as one attribute that is specific to <head> elements: profile . The profile attribute can hold a whitespace-separated list of URIs that hold information about the document, such as a description of the document, the author's name , copyright information, and so forth. (None of the major browsers implements this attribute yet.) Here are the elements that can appear in the head:
As mentioned, each <head> element should contain exactly one <title> element. |