HTML Elements

Definition of Elements

An HTML element is a part of HTML, defined by a start tag, content, and an end tag. Elements form the building blocks of web pages.

Block-Level vs Inline Elements

Block-level elements start on a new line and take up the full width available, while inline elements do not start on a new line and only take as much width as necessary.

Common Block-Level Elements

  • <div>
  • <p>
  • <h1>–<h6>

Common Inline Elements

  • <span>
  • <a>
  • <img>