HTML Basic Tags

HTML most frequently used elements are:

The heading elements are used for structuring headings. There are six types of headings used in HTML, starting from <h1> to <h6>.

Learn more about HTML headings.

Example

<!DOCTYPE html>
<html>
  <head>
    <title>Title of the document</title>
  </head>
  <body>
    <h1>This is heading 1</h1>
    <h2>This is heading 2</h2>
    <h3>This is heading 3</h3>
    <h4>This is heading 4</h4>
    <h5>This is heading 5</h5>
    <h6>This is heading 6</h6>
  </body>
</html>

Result

The <p> element is used for separating the paragraphs of a text.

Learn more about HTML paragraphs.

Example

<!DOCTYPE html>
<html>
  <body>
    <h2> Elements example</h2>
    <p>This is some paragraph.</p>
    <p>This is another paragraph <br/> with  line break.</p>
  </body>
</html>

Result

The <img /> tag is used for including images in an HTML document.

Learn more about HTML images.

Example

<!DOCTYPE html>
<html>
  <head>
    <title>Title of the document</title>
  </head>
  <body>
    <h1>This is image example</h1>
    <img src="/uploads/media/default/0001/01/25acddb3da54207bc6beb5838f65f022feaa81d7.jpeg" alt="Aleq" width="200" height="185"/>
  </body>
</html>

Result

The <a> (anchor) tag is used for structuring links in a text.

Learn more about the <a> tag.

Example

<!DOCTYPE html>
<html>
  <head>
    <title>Title of the document</title>
  </head>
  <body>
    <a href="https://www.w3docs.com/">W3docs.com</a>
  </body>
</html>

Result

>