Skip to main content

  | मौसम…

411 समाचार
Public archive edition · Attributed source reporting with original dates · AI drafts are excluded

411 REFERENCE · Wikibooks

HyperText Markup Language/Tag List/html

Reference material by Wikibooks contributors. This retains its source identity and is not 411 news reporting.

Use html wraps the whole HTML document. The opening tag is placed directly after the doctype declaration, the end tag at the end of the document. It is recommended that the primary language of the document is indicated with either the lang attribute for HTML or the xml:lang attribute for XHTML. XHTML 1.0 documents served with a MIME type of text/html should use both lang and xml:lang. Example An English language HTML 4.01 document. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html lang="en"> <head> <title>Example page</title> </head> <body> <p>Example paragraph.</p> </body> </html> An English language XHTML 1.0 document. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xml:lang="en" xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Example page</title> </head> <body> <p>Example paragraph.</p> </body> </html> Required attributes xmlns In XHTML 1.0 and XHTML 1.1 xmlns is required. xmlns defines the XML namespace. Its value in XHTML 1.0 and XHTML 1.1 is http://www.w3.org/1999/xhtml. Standard attributes dir lang xml:lang Notes This tag is optional in HTML 4.01, but it is strongly recommend to use it. It is required in XHTML. More info The HTML element in HTML 4.01 Specification The <html> tag on W3Schools deep