The <html> element is the containing element for the whole HTML document.
After the declaration of the DOCTYPE, each and every HTML document should have the <html> element opening and closing </html> tag.
If you are writing strict XHTML 1.0 the opening must also include a namespace identifier.
The concept of using namespaces may seem a little odd at first. Now it is depreciated.
The <html> element can also carry the following attributes; we will talk more about them in later in chapters.
In earlier versions of HTML, a version attribute could be used to indicate which version of HTML document is written in, although it is usually depreciated or left off.
HTML documents should use the DOCTYPE declaration along with the xmlns attribute to indicate which version of HTML they use.
HTML Attributes Group
As you have seen, most of the time attributes are used to do some changes with the HTML element.
Attribute live on the opening tag of an element and provide the extra information about the element that carries them.
All attributes consist of the name and value; the name contains the property of the element and the value is a value for that property.
the xml:lang attribute describes the language used within that element; the value may be the EN-US- that indicates the U.S English
Three Type of Attributes,
- Core Attributes
- Internationalization Attributes
- UI Events
Core attributes– The class, id, and title are the core attributes in HTML.
Internationalization Attributes– The dir, lang, and XML:lang is the internationalization attributes in HTML
Remember: Together, the core attributes and the internationalization attribute are known as universal attributes.