WEB DEVELOPER SITE
HTMLCSSJAVASCRIPTSQLPHPBOOTSTRAPJQUERYANGULARXML
 

HTML Headings


Headings are important in HTML documents.


HTML Headings

Heading is through <h1> to <h6> Tags are defined.

<h1> Defines the largest title. <h6> Defines the smallest title.

Example

<h1>This is a heading</h1>
<h2>This is a heading</h2>
<h3>This is a heading</h3>
<h3>This is a heading</h3>
Try it yourself »

Headings Are Important

Be sure to use the HTML title tag only for the title. Don't use headings just to generate bold or large text.

Search engines use titles to index the structure and content of your web pages.

Because users can quickly browse your web pages by title, it is important to use the title to present the document structure.

h1 should be used as the main headline (most important), followed by h2 (secondarily important), then h3, and so on.


HTML Horizontal Rules

The <hr> Tags create horizontal lines in HTML pages.
The hr element can be used to separate content.

Example

<p>This is a paragraph.</p>
<hr>
<p>This is a paragraph.</p>
<hr>
<p>This is a paragraph.</p>
<hr>
<p>This is a paragraph.</p>
Try it yourself »

The HTML <head> Element

You can insert comments into your HTML code to make it more readable and easier to understand. The browser ignores the comments and does not display them. The comment is written as follows:

Example

<!DOCTYPE html>
<html>

<head>
  <title>My First HTML</title>
  <meta charset="UTF-8">
</head>

<body>
.
.
.
Try it Yourself »

The HTML <title> Element

The HTML <title> component is meta information. It characterizes the HTML report's title.

The title won't be shown in the report, yet may be shown in the program tab.


The HTML <meta> Element

The HTML <meta> component is additionally meta data.

It can be utilized to characterize the character set, and other data about the HTML document.


More Meta Elements

In the section about HTML styles you find more meta elements:

The HTML <style> component is utilized to characterize inner CSS style sheets.

The HTML <link> component is utilized to characterize outside CSS style sheets.


HTML Tip - How to View HTML Source

Have you seen some web pages and marveled at how it works. If you want to find the secret, just right-click and choose "View Source" (IE) or "View Page Source" (Firefox). Other browsers do the same. Doing so opens a window containing the HTML code for the page.

HTML Tag Reference

The tutorial label reference manual provides more information on these titles and their attributes. You will learn more about HTML tags and attributes in the following sections of this tutorial.
Tag Description
<html> Defines a HTML document
<body> Defines the archive's body
<head> Defines the archive's head element
<h1> to <h6> Defines HTML headings
<hr> Defines a flat line