How to define an HTML heading in HTML5 ? Last Updated : 06 Jun, 2023 Summarize Comments Improve Suggest changes Share Like Article Like Report An HTML heading tag is used to define the headings of a page. Headings are defined with the <h1> to <h6> tags. The size of the text depends upon the type of heading tag. h1 is the largest heading tag and h6 is the smallest one (h1 > h2 > h3 > h4 > h5 > h6). Syntax: <h1></h1> <h2></h2> <h6></h6> Example 1: In this example, we will define HTML heading on the basis of requirement. HTML <!DOCTYPE html> <html> <body> <h1>Welcome to GeeksforGeeks </h1> <h2>A computer science portal for geeks</h2> <h5>Tutorial</h5> <h6>Geeks</h6> </body> </html> Output: Example 2: Each HTML heading has a default size, but the user can change its size as given below. HTML <!DOCTYPE html> <html> <body> <h1 style="font-size:40px;"> Welcome to GeeksforGeeks </h1> </body> </html> Output: Comment More infoAdvertise with us Next Article How to define the root of an HTML document ? A aksrathod07 Follow Improve Article Tags : Web Technologies HTML Web technologies HTML5 HTML-Tags HTML-Questions +2 More Similar Reads How to define metadata about an HTML document in HTML5 ? The metadata means the information about data. The <meta> tag in HTML provides information about HTML Document or in simple words, it provides important information about a document. These tags are basically used to add name/value pairs to describe properties of HTML documents, such as expiry 1 min read How to add sub heading using HTML ? In HTML, headings are used to structure the content, creating a clear hierarchy that improves readability and organization. Subheadings help break down sections of content, guiding users through the information. There are several ways to add subheadings in HTML, and we'll explore two common methods 3 min read How to define a variable in HTML5 ? The <var> tag is used to define variables in HTML and specify mathematical equations or computer programs. The content inside the tag is usually displayed in italics in most browsers. Note: This tag is not deprecated but using CSS can create more dynamic effects. The <var> tag also suppo 1 min read How to define the root of an HTML document ? The <html> tag in HTML is used to define the root of HTML and XHTML documents. The <html> tag tells the browser that it is an HTML document. It is the second outer container for everything that appears in an HTML document followed by the <!DOCTYPE> tag. The <html> tag require 1 min read How to define the document's body in HTML5 ? The document's body in HTML5 is defined by the <body> tag which is placed with in the <html> tags and just after the <head> tag.The body tag can include: headings tags : <h1>, <h2>, <h3> and so on.paragraph tag: <p>line break tag: <br>horizontal rule t 1 min read How to define a visible heading for details element in HTML5 ? In this article, we will learn how to define a visible heading for the <details> element. This element is used to create a widget that reveals information when it is in the "open" state. The state can be toggled by clicking on the element. The contents that have to be revealed are enclosed wit 2 min read Like