HTML Elements

Heading

This element operate between <h1> and <h6>.

HTML Code:

<h1>Heading 1</h1> <h2>Heading 2</h2> <h3>Heading 3</h3> <h4>Heading 4</h4> <h5>Heading 5</h5> <h6>Heading 6</h6>

Result:

Heading 1

Heading 2

Heading 3

Heading 4

Heading 5
Heading 6

Paragraph

HTML Code:

<p>This is a paragraph ...</p> <p>This is a other paragraph <br> Other line in the paragraph ...</p>

Result:

This is a paragraph ...

This is a other paragraph
Other line in the paragraph ...

Note: The <br> tag is a line break in a paragraph. It is not recommended its use for create vertical white spaces.


Preformatted Text

The HTML <pre> element defines preformatted text.

HTML Code:

<pre> My Bonnie lies over the ocean. My Bonnie lies over the sea. My Bonnie lies over the ocean. Oh, bring back my Bonnie to me. </pre>

Result:

  My Bonnie lies over the ocean.

    My Bonnie lies over the sea.

        My Bonnie lies over the ocean.

    Oh, bring back my Bonnie to me.

HTML Index

This page is only a summary of the material from W3Schools. Definitions, Examples and Codes are exclusive property of W3Schools.