'Why we need <HTML> tag in html? [closed]
I searched before but I couldn't get a logical answer. I want to know what's the use of < HTML > tag in HTML? Why do we use this tag and how is this useful?
Solution 1:[1]
You don't. Look at the specification. It says:
An html element's start tag can be omitted if the first thing inside the html element is not a comment.
An html element's end tag can be omitted if the html element is not immediately followed by a comment.
That said, if you don't have it, you can't put a lang attribute that applies to the whole document on it.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Quentin |
