HTML Headings Last Updated : 07 Nov, 2025 Comments Improve Suggest changes 103 Likes 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 <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>HTML</title> </head> <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 TagsCustomization in HTML heading tags allows you to change their style, color, font, and alignment using CSS. HTML <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>HTML</title> </head> <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> Best 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. Create Quiz HTML Headings in Web Development Comment S Shubrodeep Banerjee Follow 103 Improve S Shubrodeep Banerjee Follow 103 Improve Article Tags : Technical Scripter Web Technologies HTML HTML-Basics Explore HTML BasicsHTML Introduction4 min readHTML Editors4 min readHTML Basics7 min readStructure & ElementsHTML Elements4 min readHTML Attributes7 min readHTML Headings3 min readHTML Paragraphs3 min readHTML Text Formatting4 min readHTML Block and Inline Elements3 min readHTML Charsets4 min readListsHTML Lists3 min readHTML Ordered Lists5 min readHTML Unordered Lists4 min readHTML Description Lists3 min readVisuals & MediaHTML Colors11 min readHTML Links Hyperlinks2 min readHTML Images7 min readHTML Favicon4 min readHTML Video4 min readLayouts & DesignsHTML Tables9 min readHTML Iframes4 min readHTML Layout4 min readHTML File Paths3 min readProjects & Advanced TopicsHTML Forms4 min readHTML5 Semantics5 min readHTML URL Encoding4 min readHTML Responsive Web Design11 min readTop 10 Projects For Beginners To Practice HTML and CSS Skills8 min readTutorial ReferencesHTML Tags - A to Z List5 min readHTML Attributes Complete Reference8 min readHTML Global Attributes5 min readHTML5 Complete Reference8 min readHTML5 MathML Complete Reference3 min readHTML DOM Complete Reference15+ min readHTML DOM Audio/Video Complete Reference2 min readSVG Element Complete Reference5 min readSVG Attribute Complete Reference8 min readSVG Property Complete Reference7 min readHTML Canvas Complete Reference4 min read Like