meta atributo http-equiv HTML
Exemplos
A cada 30 segundos para atualizar o documento:
<head>
<meta http-equiv="refresh" content="30">
</head>
<meta http-equiv="refresh" content="30">
</head>
tente »
Suporte a navegadores
Todos os principais navegadores suportam atributo http-equiv.
Definição e Uso
atributo http-equiv fornece conteúdo do cabeçalho HTTP / valor do imóvel.
atributo http-equiv pode ser utilizado para simular um cabeçalho de resposta HTTP.
Diferenças entre HTML 4.01 e HTML5
Http-equiv única maneira de usar o conjunto de caracteres não é especificado em um documento HTML:
- HTML 4.01: <meta http-equiv = "Content-Type" content = "text / html; charset = UTF-8">
- HTML5: <meta charset = "UTF-8">
gramática
<meta http-equiv="content-type|default-style|refresh">
Valor de propriedade
值 | 描述 |
---|---|
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" 会到导致失败。 |
<Meta> tag HTML