Photo by from Pexels


Read Time2 Minutes, 12 Seconds

HTML Headings

HTML headings go from <h1> to <h6> based on importance<h1> tag has the most importance and <h6> the least

Lets see with the help of below example:

HTML Code:

<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>

The browser displays it as:

This is heading 1

This is heading 2

This is heading 3

This is heading 4

This is heading 5
This is heading 6

HTML Paragraphs

HTML paragraphs are define with <p> </p> tags

HTML Code:

<p>This is first paragraph</p>
<p>This is second paragraph</p>

The browser displays it as:

This is first paragraph

This is second paragraph

HTML Links

HTML links are defined with the <a> </a> tags. The destination of the link is specified with attribute href. Attributes provide additional information about HTML tags.

HTML code:

<a href="">This is a link</a

The browser displays it as:

This is a link

Clicking on the above text takes user to the link

HTML Images

HTML images are defined with the <img> tag. The source file is specified as src attribute, alternative text as alt attribute, width and height of the image displayed as width and height attributes respectively:

HTML code:

<img src="" alt="cute baby image" width="104" height="142">

The browser displays it as:

cute baby image

HTML Buttons

HTML buttons are defined with the <button> </button> tags

HTML code:

<button>This is a Button</button>

The browser displays it as:

HTML Lists

HTML lists are defined with the <ul> </ul> tags for unordered lists and  <ol> </ol> tags for ordered/numbered lists. These tags are followed by <li> </li> tags for each list item.

HTML code:

  <li>First unordered item</li>
  <li>Second unordered item</li>
  <li>Third unordered item</li>

  <li>First ordered item</li>
  <li>Second ordered item</li>
  <li>Third ordered item</li>

The browser displays it as:

  • First unordered item
  • Second unordered item
  • Third unordered item
  1. First ordered item
  2. Second ordered item
  3. Third ordered item

HTML tags are not case sensitive

0 0

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Close Menu