HTML Heading Tutorial (Heading Tags)

There are six heading tags in HTML for displaying large font text in the form of titles or headings in the browser. The largest of these is <h1></h1> thus <h2></h2>, <h3></h3> ... up to h6


Such as

<h1>A long flow of text</h1>
<h2>unbroken by title,</h2>
<h3>subtitles, and other headers, </h3>
<h4>crosses  the eyes and numbs the mind</h4>
<h5>not to mention the fact that</h5>
<h6>it makes it nearly impossible to scan the text for a specific topic</h6>


Let me repeat what I said in the paragraph tutorial - Only HTML heading tags are shown here. Heading tags should be written inside the body tag and follow the HTML document's whole structure, as we previously mentioned in the Doc Type tutorial.


Output:

A long flow of text

unbroken by title,

subtitles, and other headers,

crosses the eyes and numbs the mind

not to mention the fact that
it makes it nearly impossible to scan the text for a specific topic


Here, because of the CSS effect of our site, the size and color look different. You will see the actual output if you save it and run it in the browser or this online editor.


Like the p tag, you can use attributes such as align, class, dir, id, lang, onclick, onkeydown, onkeypress, style, title, etc.


One using the heading (<h1></h1>) and paragraph (<p></p>) elements


Example

<!DOCTYPE html>
<html>
<head>
    <title>CodesBright HTML Tutorials</title>
</head>
<body>

    <h1>CodesBright is the largest Bengali tutorial site</h1>

    <p>To learn Web development and design please visit 

        <a href="https://codesbright.com">CodesBright</a>
    </p>
</body>
</html>


This is a complete example. Save with a .html extension (e.g., index.html test.html), run in the browser, or view in this online editor.