Elements in HTML

A start tag, content, and an end tag.

Example:

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

Here:
<p>→ Start tag

This is a paragraph. → Content

</p> → End tag

Together, they form a paragraph element

Types of Elements:

  1. Block-level elements:
    start on a new line and take full width
    Examples:
    <div>, <p>, <h1>, <table>, <form>

  2. Inline elements:
    stay in the same line and take only necessary width
    Examples:
    <span>, <a>, <img>, <b>, <i>

Leave a Reply