Just like with every other programming language, HTML possesses keywords, which define how the web browser will format and display the content within them, these are called HTML tags. HTML tags are used to indicate the beginning and end of an HTML element within an HTML document.
Tags define how the content within them will be formatted and displayed on a webpage. A standard webpage must have the essential tags. One of which is the
<heading> tag, which makes up the heading element.
<heading> tag is a structural tag that defines the headings for an HTML document from level 1 to 6.
It is represented with
<h6> and it possesses a closing tag i.e.,
<h2>Content goes here</h2>
<Heading> tags layout headings for an HTML document from level one to six.
<Heading> tags represent six levels of section headings, from the highest section level,
<h1>, to the lowest section level,
Google uses headings to index the structure and content of web pages, so they should be used wisely for SEO optimization.
<heading> tags can be used with attributes such as
alignattribute is now considered obsolete, so it can be ignored.
They can also be nested to create subsections.
By default, browsers format headings with bolder and larger fonts, paragraphs, breaks, and whitespace. However:
<h1>heading per page, as it may create confusion especially for screen reader users.
They are fully supported across major browsers on mobile and desktop devices.
<heading>tags are used to layout the section headings of a webpage in their order of importance.
<heading>tags can be used with HTML attributes such as
<heading>tags can be nested.
<heading>tags are cross-browser compatible.
View all Courses