English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية

HTML Referenzhandbuch

Vollständiges Verzeichnis der HTML-Tags

HTML meta http-equiv-Attribut

http-equiv-Attribut ist Information über das content-Attribut/Werte liefern HTTP-Kopfzeilen, http-equiv-Attribut kann verwendet werden, um HTTP-Antwortkopfzeilen zu simulieren.

 HTML <meta> Tag

Online-Beispiel

jede1Seite alle 60 Sekunden neu laden:

!DOCTYPE html
<html>
<head>
<title>HTML:<meta> http-equiv-Attribut - Grundlagen-Tutorial-Website(oldtoolbag.com)</title>
<meta http-equiv="refresh" content="60">
</head>
<body>
<h1>Meine Website</h1>
<p>Einige Texte.../p>
</body>
</html>
Testen Sie es heraus ‹/›

Browserkompatibilität

IEFirefoxOperaChromeSafari

Alle gängigen Browser unterstützen http-equiv-Attribut.

Definition und Verwendung

http-equiv-Attribut ist content Informationen über das Attribut/Werte liefern HTTP-Kopfzeilen.

http-equiv-Attribut kann verwendet werden, um HTTP-Antwortkopfzeilen zu simulieren.

HTML 4.01 und HTML5zwischen den Unterschieden

Verwenden Sie http-equiv ist nicht mehr die einzige Methode zur Festlegung der Zeichensatzkodierung für HTML-Dokumente:

  • HTML 4.01: <meta http-equiv="content-type" content="text/html; charset=UTF-8">

  • HTML5: <meta charset="UTF-8">

Syntax

      <meta http-equiv="content-type|default-style|refresh">

Attributwert

WertBeschreibung
content-typeSpecifies the character encoding of the document.

Example:

<meta http-equiv="content-type" content="text/html; charset=UTF-8">

default-styleSpecifies the predefined stylesheet to be used.

Example:

<meta http-equiv="default-style" content="the document's preferred stylesheet">

Note:The value of the content attribute above must match the value of the title attribute of a link element in the same document, or it must match the value of the title attribute of a style element in the same document.

refreshDefine the time interval for automatic document refresh, in seconds.

Example:

<meta http-equiv="refresh" content="300">

Note: The value "refresh" should be used with caution, as it will make the page不受用户控制.W3C's Web Content Accessibility Guidelines In the use of "refresh" can lead to failure.

 HTML <meta> Tag