Example: This example illustrates the HTML heading tags.
Heading Tag: An HTML heading tag is used to define the headings of a page. There are six levels of headings defined by HTML. These six heading elements are H1, H2, H3, H4, H5, and H6; with H1 being the highest level and H6 the least.
Importance of Heading:
- Search Engines use headings for indexing the structure and content of the webpage.
- Headings are used for highlighting important topics.
- They provide valuable information and tell us about the structure of the document.
<h1></h1> <h3></h3> <h6></h6>
Changing the size of HTML Headings: The default size of HTML headings can be changed using the style attribute.
The Horizontal rule in HTML: The <hr> tag which stands for the horizontal rule is used to define a thematic break in an HTML page. The <hr> tag is an empty tag, and it does not require an end tag. It is basically used to separate content. Please refer to the HTML <hr> Tag article for further details.
The head element in HTML: The <head> tag in HTML is used to define the head portion of the document which contains information related to the document. The HTML head element acts as a container for metadata. Metadata is the data about the HTML document which is not displayed. The head element has nothing to do with headings. The <head> tag contains other head elements such as <title>, <meta>, <link>, <style> <link> etc. The head element is placed between the “HTML” tag and the <body> tag. Please refer to the HTML <head> Tag article for details.
- Google Chrome 93.0
- Microsoft Edge 93.0
- Internet Explorer 11.0
- Firefox 92.0
- Opera 78.0
- Safari 14.1
Attention reader! Don’t stop learning now. Get hold of all the important HTML concepts with the Web Design for Beginners | HTML course.