Account
Categories

HTML ELEMENT


It is a building block of a web page.

It has three main parts:

  • Opening tag – shows where the element starts.
  • Content (optional) – the text or information inside the element tag.
  • Closing tag – shows where the element ends.

Example of an HTML element (paragraph tag):

<p>This is a paragraph</p>

<p> → opening tag of the HTML element

</p> → closing tag of the HTML element

This sentence is an HTML element, which appears on the webpage.

Some HTML elements are self-closing, meaning they do not have any content.

Example of a self-closing HTML element:

<img src="image.jpg" alt="HTML image example" />