- Courses
- HTML
- HTML top level tags
- <html>
- Permitted attributes in the <html> element
What attributes are permitted in the <html>
element?
The <html>
element includes global attributes like lang
and xmlns
.
The lang
attribute specifies the primary language of the webpage and helps screen readers, while the xmlns
attribute specifies the XML Namespace of the document. These attributes are essential for defining the language and namespace, ensuring proper interpretation and accessibility of the content.
<html lang="en" xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Attributes Example</title>
</head>
<body>
<p>Sample content</p>
</body>
</html>