HTML Headings Last Updated : 03 Feb, 2025 Comments Improve Suggest changes Like Article Like Report HTML headings are used to define the titles and subtitles of sections on a webpage. They help organize the content and create a structure that is easy to navigate.Proper use of headings enhances readability by organizing content into clear sections.Search engines utilize headings to understand page structure, aiding in SEO. HTML <html> <body> <h1>This is the Main Heading</h1> <h2>This is a Subheading</h2> <h3>This is a Smaller Subheading</h3> <h4>This is a Sub-Subheading</h4> <h5>This is a Minor Subheading</h5> <h6>This is the Smallest Heading</h6> </body> </html> This code uses HTML heading tags (<h1> to <h6>) to create headings that range from the main heading to the smallest subheading.Each tag shoes the hierarchy of the content, helping organize the structure of the webpage.Note: the 'h' inside the tag should always be in lowercase.Levels of HTML Heading TagsHTML offers six levels of heading tags, each serving a different purpose in structuring your content:<h1> – Main Heading (Largest)Represents the primary focus of the page, usually used for the main title.Use only one <h1> tag per page for the best SEO practices.Makes it clear to both users and search engines what the main topic is.<h2> – SubheadingsIdeal for dividing the content into major sections.If the content has further subsections, use <h3> to create a logical flow.<h3> to <h6> – Smaller HeadingsThese heading levels are used for finer subdivisions, gradually decreasing in size and importance.<h3> is used for subsections under <h2>, while <h4> to <h6> are used for additional, less important subdivisions.<h6> defines the least important heading.Customization in HTML Heading TagsExample: Here’s how you can apply basic styles to HTML heading tags: HTML <!DOCTYPE html> <html> <body> <h1>H1 Heading</h1> <!-- With the help of Style attribute you can customize the size of the heading, As done below--> <h1 style="font-size: 50px">H1 with new size.</h1> <!-- Here font-size is the property by which we can modify the heading. Here we kept it 50px i.e. 50 pixels --> </body> </html> Output:HTML Headings Example OutputBest Practices for Using HTML HeadingsUse Only One <h1> per Page: The <h1> tag should be reserved for the main title of the page. Too many <h1> tags can confuse both users and search engines about the content’s priority.Maintain a Logical Structure: Follow a logical hierarchy of headings (<h1> → <h2> → <h3>) to ensure content is organized. Don't jump directly from <h1> to <h4>, as it can make the content harder to navigate.Keep Headings Descriptive: Headings should clearly describe the content that follows. This makes it easier for readers to understand what each section is about.Avoid Overusing Heading Tags: Headings are for organizing content, not for styling text. Use them where appropriate and avoid using heading tags for emphasis or styling alone. Comment More infoAdvertise with us Next Article HTML Paragraphs S Shubrodeep Banerjee Follow Improve Article Tags : Technical Scripter Web Technologies HTML HTML-Basics Similar Reads HTML Tutorial HTML stands for HyperText Markup Language. It is the standard language used to create and structure content on the web. It tells the web browser how to display text, links, images, and other forms of multimedia on a webpage. HTML sets up the basic structure of a website, and then CSS and JavaScript 11 min read HTML Introduction HTML stands for Hyper Text Markup Language, which is the core language used to structure content on the web. It organizes text, images, links, and media using tags and elements that browsers can interpret. As of 2025, over 95% of websites rely on HTML alongside CSS and JavaScript, making it a fundam 6 min read HTML Editors An HTML Editor is a software application designed to help users create and modify HTML code. It often includes features like syntax highlighting, tag completion, and error detection, which facilitate the coding process. There are two main types of HTML editors: Text-Based Editors - Allow direct codi 5 min read HTML Basics HTML (HyperText Markup Language) is the standard markup language used to create and structure web pages. It defines the layout of a webpage using elements and tags, allowing for the display of text, images, links, and multimedia content. As the foundation of nearly all websites, HTML is used in over 6 min read HTML Comments HTML comments are used to add notes or explanations in the HTML code that are not displayed by the browser.They are useful for documenting the code, making it easier to understand and maintain.To add a comment, use the syntax <!-- your comment here -->. HTML<!-- This is a comment and will n 4 min read HTML Elements An HTML Element consists of a start tag, content, and an end tag, which together define the element's structure and functionality. Elements are the basic building blocks of a webpage and can represent different types of content, such as text, links, images, or headings.For example, the <p> ele 5 min read HTML Attributes HTML Attributes are special words used within the opening tag of an HTML element. They provide additional information about HTML elements. HTML attributes are used to configure and adjust the element's behavior, appearance, or functionality in a variety of ways. Each attribute has a name and a value 8 min read HTML Headings HTML headings are used to define the titles and subtitles of sections on a webpage. They help organize the content and create a structure that is easy to navigate.Proper use of headings enhances readability by organizing content into clear sections.Search engines utilize headings to understand page 4 min read HTML Paragraphs A paragraph in HTML is simply a block of text enclosed within the <p> tag. The <p> tag helps divide content into manageable, readable sections. Itâs the go-to element for wrapping text in a web page that is meant to be displayed as a distinct paragraph.Syntax:<p> Some Content... 5 min read HTML Text Formatting HTML text formatting refers to the use of specific HTML tags to modify the appearance and structure of text on a webpage. It allows you to style text in different ways, such as making it bold, italic, underlined, highlighted, or struck-through. Table of ContentCategories of HTML Text FormattingLogic 4 min read Like