HTML elements <h1>

<h1>HTML elements &lt;h1&gt;</h1>

Heading 2 <h2>

 <h2>Heading 2 &lt;h2&gt;</h2>

Heading 3 <h3>

 <h3>Heading 3 &lt;h3&gt;</h3>

Heading 4 <h4>

 <h3>Heading 4 &lt;h3&gt;</h4>

This is a paragraph. <p>

It can contain a linebreak <br />
without introducing blank space between lines. A paragraph which is long enough will wrap its lines to fit the horizontal space available to it.

New paragraphs will normally be separated by vertical white space.

<p>This is a paragraph. &lt;p&gt;</p>
<p>It can contain a linebreak &lt;br /&gt;<br />
without introducing blank space between lines. A paragraph which is long enough will wrap its lines to fit the horizontal space available to it.</p>
<p>New paragraphs will normally be separated by vertical white space.</p>
A blockquote is often indented.<blockquote>
 <blockquote>A blockquote is often indented.&lt;blockquote&gt;</blockquote>
  1. Item 1<li> in an Ordered List <ol>
  2. Item 2<li> in an Ordered List
 <ol>
 <li>Item 1&lt;li&gt; in an Ordered List &lt;ul&gt;</li>
 <li>Item 2&lt;li&gt; in an Ordered List </li>
</ol>
  • Item 1<li> in an Unordered List <ul>
  • Item 2<li> in an Unordered List
 <ul>
 <li>Item 1&lt;li&gt; in an Unordered List &lt;ul&gt;</li>
 <li>Item 2&lt;li&gt; in an Unordered List</li>
</ul>


Elements format the text inside the opening and closing HTML Tags, as well as describing its semantic significance. For example <h1>, <h2>, etc. indicate different levels of heading in a document. In the HTML source code, tag names are enclosed in angle brackets: < >
so if you want to display an angle bracket in your text then you need to use the special character entities:
 &lt; gives < (less than)
 &gt; gives > (greater than)

Since the introduction of xhtmlHTML Tags need to form valid XML. So tag names should always be lower case: <ul> not <UL>. Each opening tag should have a balanced and corresponding closing tag, but there are a couple of tags that never have text inside them so they are written with a "/>" to indicate they are self-closing. For example the line break tag: <br />

The actual appearance of an element in a web page is governed by its CSS: Cascading Style Sheet. The CSS for this page is what makes all the headings green, for instance.

Some tags need additional information so that the web browser knows what to display.  The image tag, <img /> is a self-closing tag but on its own there is nothing to say which image to display. For that reason the image tag must - and many other tags may - have HTML attributes.