Tag HTML <html>
Esempio
Un semplice documento HTML:
<!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>
Definizione e utilizzo
Il <html>
tag rappresenta la radice di un documento HTML.
Il <html>
tag è il contenitore di tutti gli altri elementi HTML (tranne il
tag <!DOCTYPE> ).
Nota: dovresti sempre includere l'
attributo lang<html>
all'interno del
tag, per dichiarare la lingua della pagina Web. Questo ha lo scopo di aiutare i motori di ricerca e i browser.
Supporto browser
Element | |||||
---|---|---|---|---|---|
<html> | Yes | Yes | Yes | Yes | Yes |
Attributi
Attribute | Value | Description |
---|---|---|
xmlns | http://www.w3.org/1999/xhtml | Specifies the XML namespace attribute (If you need your content to conform to XHTML) |
Attributi globali
Il <html>
tag supporta anche gli attributi globali in HTML .
Pagine correlate
Esercitazione HTML: Introduzione all'HTML
Riferimento DOM HTML: Oggetto HTML
Impostazioni CSS predefinite
La maggior parte dei browser visualizzerà l' <html>
elemento con i seguenti valori predefiniti:
html {
display: block;
}
html:focus {
outline: none;
}