HTML Head and Heading Elements at a Glance
Tags | Description |
---|---|
<head> | A container for all head elements. For example, the container element for elements such as title, script, style, meta, link, etc. |
<h1> – <h6> | HTML is used to write headings. |
< head> element
<head>
Headings or titles have nothing to do with HTML elements.
<head>
An element is a container for holding metadata. HTML metadata is information about an HTML document. Metadata is not displayed in the browser.
<head>
The element is written <html>
after the tag and before the tag:<body>
Examples
HTML head element
The HTML head element contains meta data.
Meta data is data related to the HTML document.
Output
The HTML head element contains meta data.
Meta data is data related to the HTML document.
HTML Heading
<h1>
<h6>
Headings or titles are created in HTML using the <head> tag .
<h1>
The most important heading is indicated by and <h6>
the least important heading is indicated by.
Using CSS, you can change the font size of headings, just like other elements.
Examples
HTML Headings
Table of Contents
Toggle
h1 is the most important heading
h2, less important heading than h1
h3, less important heading than h2
h4, less important heading than h3
h5, less important heading than h4
h6 is the least important heading
Output

The importance of headings
Search engines use headings to index the structure and content of your web pages.
The use of headings is very important to make the structure of the document elegant.
Note: Do not use heading elements to make text larger or bolder .
Chapter summary
- The HTML
<head>
element contains other elements related to metadata. - Elements are used
<h1>
to create headings in HTML documents .<h6>