HTML <html> xmlns- kenmerk
Voorbeeld
Een eenvoudig XHTML-document, met een minimum aan vereiste tags:
<!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">
<head>
<title>Title of the document</title>
</head>
<body>
The content of the document......
</body>
</html>
Definitie en gebruik
Het xmlns
attribuut specificeert de xml-naamruimte voor een document.
Opmerking: het xmlns
attribuut is vereist in XHTML, ongeldig in HTML 4.01 en optioneel in HTML5.
Opmerking: de HTML-validator op
http://w3.org klaagt niet als het xmlns
attribuut ontbreekt in een XHTML-document. Dit komt omdat de naamruimte "xmlns=http://www.w3.org/1999/xhtml" standaard is en aan de
<html>
tag wordt toegevoegd, zelfs als u deze niet opneemt.
Browserondersteuning
Attribute | |||||
---|---|---|---|---|---|
xmlns | Yes | Yes | Yes | Yes | Yes |
Syntaxis
<html xmlns="http://www.w3.org/1999/xhtml">
Attribuutwaarden
Value | Description |
---|---|
http://www.w3.org/1999/xhtml | The namespace to use (for XHTML documents) |
❮ HTML <html>-tag