HTML Heading
- HTML has six levels of headings element.
- The six heading elements are H1, H2, H3, H4, H5 and H6
- Importance:
- Search Engines use headings for indexing the structure and content of the webpage.
- Headings are used for highlighting important topics.
- They provide valuable information and tell us about the structure of the document.
Note: - HTML headings are used only for headings. It can’t be used for making text BIG or bold.
Headings Size
- Each HTML heading has a default size.
- Also, size of the headings can be specified with the style attribute using the CSS font-size property.
Example
<html>
<head>
<title>Page Title</title>
</head>
<body>
<h1>This is pre-defined Heading 1</h1>
<h1 style="font-size:60px;">This is user defined Heading 1</h1>
<p>HTML links are defined with a tag. The link address is specified in the href attribute.</p>
</body>
</html>
Try it »
HTML Horizontal Rules
- The <hr> tag in HTML stands for horizontal rule.
- It is used to insert a horizontal rule or a thematic break in an HTML page to divide or separate document sections.
- The <hr> tag is an empty tag and it does not require an end tag.
Example
<html>
<head>
<title>Page Title</title>
</head>
<body>
<h1>This is Heading 1</h1>
<p>Here is the text.</p>
<hr>
<h2>This is Heading 2</h2>
<p>Here is some other text.</p>
<hr>
<h3>This is Heading 3</h3>
<p>Here is some more text.</p>
<hr>
</body>
</html>
Try it »
Headings Size
- The <head> element is a container for metadata.
- HTML metadata is data about the HTML document.
- Metadata is not displayed.
- The <head> element is always placed in between <html> tag and <body> tag.
Example
<html>
<head>
<title>My First HTML Page</title>
<meta charset="UTF-8>
</head>
<body>
<p>The HTML head element contains meta data.</p>
<p>Meta data is data about the HTML document.</p>
</body>
</html>
Try it »
Note: - Metadata typically define the document title, character set, styles, scripts, and other meta information.