Web Development
Learn HTML5
Types Of HTML Elements

Types of HTML Elements

HTML elements are divided into 2: block elements and inline elements.

Block Elements

These define elements that always start on a new line when they are declared.

Examples of block elements

  1. div
  2. section
  3. p
  4. ul
  5. ol
  6. All headings (h1 to h6)
  7. table
  8. form
  9. article
  10. main

Among others...

Inline Elements

These define elements that continue on the same line in which they are declared. They are usually used within block elements to achieve a certain goal, such as to make text block.

Example:

<p>Please ensure you submit your report by <strong>the 8th</strong></p>

Above, the paragraph is a block element, and strong is an inline element.

Examples of inline elements

  1. strong
  2. b
  3. mark
  4. span
  5. input
  6. label
  7. a
  8. button
  9. img
  10. q

Among others...