HTML html Tag - HTML Tutorial

HTML html Tag

BLUF: Mastering HTML html Tag is a fundamental step in becoming a web developer. This guide covers the structure, syntax, and best practices for using this HTML element effectively.
Key Lesson: HTML html Tag

Web structure starts with solid HTML. Learn how HTML html Tag contributes to accessible and semantic web pages in the tutorial below.

The <html> tag represents root of an HTML document hence also called as root element. It is a container of all elements (except <!Doctype> ) such as <body>, <head> and each element which appears in an HTML document. It tells the browser that the document is an HTML document.

Before the <html> element, we are limited to employing the <!Doctype> statement that provides details about the HTML version to the browser.

Syntax

Example

<html>....</html>

Here are some details regarding the HTML <html> element:

Display None
Start tag/End tag Both Start and End tag
Usage Structural

Example 1

Example

<!DOCTYPE html>

<html>

<head>

<title>HTML tag</title>

</head>

<body>

<h2>Example of HTML tag</h2>

<p> Write your main Content within Body of the HTML document. </p>

</body>

</html>

Output:

Attribute

Attribute Value Description
xmlns http://www.w3.org/1999/xhtml It specifies the XML namespace for the document(Not required)
manifest URL It specifies the URL of the resource manifest indicates resource which should be cached locally.

Global attribute

The <html> tag facilitates the utilization of global attributes within HTML.

Event attribute

The <html> tag enables the utilization of event attributes within HTML.

Supporting Browsers

Element Chrome IE Firefox Opera Safari
<html> Yes Yes Yes Yes Yes

Input Required

This code uses input(). Please provide values below:

Logic Practice
Install Logic Practice
Add to home screen for a faster app-like experience