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 meta element instead of the http-equiv method to define the document’s character encoding.

  • content="Text"

    Required. Defines the value of the meta element and is generally used with the attributes name or http-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 meta element.

  • 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"> 

 

> back to the alphabetical list of elements

   

 

 

 

back to top