Headings - HTML

HTML has six predefined heading tags. Headings use <h> tags containing the number of the heading. The <h1> tag specifies the highest (most important) level of headings, while <h6> specifies the lowest (least important) level of headings. As with most textual documents, HTML documents use larger fonts to specify higher-level headings.

For example, consider the following example and its output, shown in Figure:

There are six, predefined heading styles in HTML.

There are six, predefined heading styles in HTML.

Each heading style acts like a paragraph tag, providing an automatic line break and extra line spacing after the element. As you can see in Figure, the default spacing after a heading is one line. You can use heading tags to delimit a wide range of text. However, their default use is to mark headings in a document, much like headings in a textual document.

Also, like most tags, you can use styles to customize the size and appearance of the heading tags. For example, consider the following style code, which defines the first four heading levels in relationship to the normal paragraph font:


All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd DMCA.com Protection Status

HTML Topics