HTML and CSS Reference
In-Depth Information
Listing 3-39. Additional Namespace Declaration
<html version="XHTML+RDFa 1.0"
xmlns=" " xmlns:foaf=" "
In mixed-namespace documents, such as XHTML + MathML + SVG, multiple namespace declarations occur
throughout the document body (unlike the previous ones that are declared in the document head). Listing 3-40 shows
an example.
Listing 3-40. Namespace Declarations in the body of a Compound Document
<!-- ... XHTML content ... -->
<math xmlns=" " >
<!-- ... MathML notation ... -->
<!-- ... XHTML content ... -->
<svg:svg version="1.1"
xmlns:svg=" http :// " xmlns:xlink=" " >
<!-- ... SVG graphic ... -->
<!-- ... XHTML content ... -->
The XHTML Head
The title of XHTML documents can be written exactly the same way as in HTML, that is, between the start and end
tags (Listing 3-41).
Listing 3-41. XHTML Document Title
<title> Title of the sample XHTML document </title>
The meta , link , and script elements can be provided in the document head of XHTML like in HTML
documents. However, in XHTML these elements (along with all other elements) should be closed. These empty
elements apply the XHTML shorthand notation (self-closing) (Listing 3-42).
Listing 3-42. A Self-Closing Link Element in XHTML
<link rel="stylesheet" type="text/css" media="all" href="alt2.css"
title="Alternative style 2" / >
In the following example, the title attribute is used to indicate search engines that show where to locate the
German and Hungarian versions of the original English document (Listing 3-43). The xml:lang attribute declares the
language of the target documents.
Listing 3-43. Links to Other Language Versions of the Same Document
<title>The document in English</title>
<link title="Das Dokument auf Deutsch"
xml:lang="de" />
Search WWH ::

Custom Search