HTML Elements

What is an HTML element?

An HTML element is a building block of a web page.
It represents a part of the content or structure on the page, like a paragraph, heading, image, or link.

Basic Structure of an HTML Element:

<p>This is a paragraph.</p>

<p> is the opening tag

This is a paragraph. is the content

</p> is the closing tag

Some Elements Don’t Have Closing Tags:

These are called void elements, like <img> or <br>

HTML elements define:

Structure (like <div>, <header>, <section>)

Content types (like <p>, <h1>, <ul>)

Functionality (like <a>, <form>, <input>)

Scroll to Top