HTML <html> tag is a starting html tag for every HTML document.
The html tag is required and most important tag for every web page. It generally contains all other available HTML Elements.
Note: The <html> tag mostly supported in all major web browsers.
Sample Code
<html>
<head>
<title>HTML html Tag With Example</title>
</head>
<body>
<p>html tag is a main html tag for HTML document</p>
</body>
</html>
<head>
<title>HTML html Tag With Example</title>
</head>
<body>
<p>html tag is a main html tag for HTML document</p>
</body>
</html>
Sample Result
html tag is a main html tag for HTML document
Tip: You can see the complete List of HTML Elements here.
Standard Attributes Support
The <html> tag supports mostly all HTML Attributes. Following are some most common attributes that are used by <html> tag. You can get more details about available HTML Attributes here.
Attribute | Value | Description |
---|---|---|
class | user_defined | Represents a style for an element which is used in CSS style sheet |
id | user_defined | Represents unique id for an element |
style | css_properties | Represents an inline style for an element for e.g style=”color:red;text-decoration:underline;” |
Event Attributes Support
The <html> tag does not support Event Attributes. But you can get more details about available HTML Event Attributes here.