HTML < head > Tag - Learn About Website | DaddyFile

0

HTML <head> Tag

Example

An HTML document, with a <title> tag inside the head section:

<!DOCTYPE html>
<html>
<head>
<title>Title of the document</title>
</head>

<body>
The content of the document......
</body>

</html>

Definition and Usage

The <head> element is a container for all the head elements.
The <head> element can include a title for the document, scripts, styles, meta information, and more.
The following elements can go inside the <head> element:

Differences Between HTML 4.01 and HTML5

In HTML 4.01 the <head> element is required.
In HTML5, the <head> element can be omitted. The following code will validate as HTML5:

<!DOCTYPE html>
<html>
<title>Title of the document</title>

<body>
<h1>This is a heading</h1>
<p>This is a paragraph.</p>
</body>

</html>

Post a Comment

 
Top