HTML atrybut meta http-equiv
Przykłady
Co 30 sekund, aby odświeżyć dokument:
<head>
<meta http-equiv="refresh" content="30">
</head>
<meta http-equiv="refresh" content="30">
</head>
Spróbuj »
Pomoc Browser
Wszystkie główne przeglądarki obsługują atrybut http-equiv.
Definicja i Wykorzystanie
atrybut http-equiv zapewnia zawartość HTTP nagłówek / wartość nieruchomości.
Atrybut HTTP równoważniki mogą być stosowane do symulacji nagłówka odpowiedzi HTTP.
Różnice między HTML 4.01 i HTML5
Http-equiv sposób tylko do korzystania z zestawu znaków nie jest określony w dokumencie HTML:
- HTML 4.01: <meta http-equiv = "Content-Type" content = "text / html; charset = UTF-8">
- HTML5: <meta charset = "UTF-8">
gramatyka
<meta http-equiv="content-type|default-style|refresh">
Wartość nieruchomości
值 | 描述 |
---|---|
content-type | 规定文档的字符编码。 实例: <meta http-equiv="content-type" content="text/html; charset=UTF-8"> |
default-style | 规定要使用的预定义的样式表。 实例: <meta http-equiv="default-style" content=" the document's preferred stylesheet "> 注释:上面 content 属性的值必须匹配同一文档中的一个 link 元素上的 title 属性的值,或者必须匹配同一文档中的一个 style 元素上的 title 属性的值。 |
refresh | 定义文档自动刷新的时间间隔。
实例: <meta http-equiv="refresh" content="300"> 注释:值 "refresh" 应该慎重使用,因为它会使得页面不受用户控制。在 W3C's Web 内容可访问性指南 中使用 "refresh" 会到导致失败。 |
HTML <meta>