Etiqueta HTML <html>


Exemplo

Um documento HTML simples:

<!DOCTYPE html>
<html lang="en">
<head>
  <title>Title of the document</title>
</head>
<body>

<h1>This is a heading</h1>
<p>This is a paragraph.</p>

</body>
</html>

Definição e uso

A <html>tag representa a raiz de um documento HTML.

A <html>tag é o contêiner para todos os outros elementos HTML (exceto a tag <!DOCTYPE> ).

Nota: Você deve sempre incluir o atributo lang<html> dentro da tag, para declarar o idioma da página da Web. Isto destina-se a ajudar os motores de busca e navegadores.


Suporte ao navegador

Element
<html> Yes Yes Yes Yes Yes


Atributos

Attribute Value Description
xmlns http://www.w3.org/1999/xhtml Specifies the XML namespace attribute (If you need your content to conform to XHTML)

Atributos Globais

A <html>tag também suporta os Atributos Globais em HTML .


Páginas relacionadas

Tutorial HTML: Introdução HTML

Referência HTML DOM: Objeto HTML


Configurações padrão de CSS

A maioria dos navegadores exibirá o <html>elemento com os seguintes valores padrão:

html {
  display: block;
}

html:focus {
  outline: none;
}