XML technologies / HTML & XHTML / Alphabetical list of HTML and XHTML elements / meta
(Excerpt from "HTML & XHTML ─ kurz & gut" by Jennifer Niederst Robbins)
A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | Y | Z
meta
HTML 4.01 | HTML 5 |
HTML: <meta>; XHTML: <meta/> or <meta />
Contains additional information about the document. It should appear in the head section of the document. It is commonly used to specify the media type and character encoding. It can also provide keywords, information about the document’s content or author, and other metadata.
Start/end tag
This is an empty element. HTML forbids an end tag. In XHTML, the element must end with a slash before the closing angle bracket. Developers can insert a space before the slash to improve backward compatibility with older browsers.
Attributes
Internationalization, global HTML 5 attributes
charset="Zeichenkodierung"HTML 5 only. Can be used with the
metaelement instead of thehttp-equivmethod to define the document’s character encoding.content="Text"Required. Defines the value of the
metaelement and is generally used with the attributesnameorhttp-equiv.http-equiv="Text"The information is treated as if supplied in the HTTP header sent by the web server before the document itself.
id="Text"XHTML and HTML 5. Assigns a unique name to identify the element.
name="Text"Specifies the kind of
metaelement.scheme="Text"Not available in HTML 5. Contains additional information for interpreting metadata.
Example (HTML)
<meta name="copyright" content="2010, O'Reilly Media"> Examples (XHTML)
<meta http-equiv="content-type" content="text/html;charset=UTF-8"/>
<meta http-equiv="refresh" content= "15" />Example (HTML 5)
<meta charset="UTF-8">
|
Copyright © 2010 O’Reilly Verlag GmbH & Co. KG
You may print the online version for your private use.
Otherwise, this chapter from "HTML & XHTML ─ kurz & gut" is subject to the same provisions as the printed edition: the work, including all its parts, is protected by copyright. All rights are reserved, including reproduction, translation, microfilming, and storage and processing in electronic systems.
O’Reilly Verlag GmbH & Co. KG, Balthasarstraße 81, 50670 Köln, kommentar(at)oreilly.de