In HTML, you’ll mainly come across 2 types of HTML elements:
block elements like:
lists: unordered (with bullet points)
<ul>or ordered lists (with numbers)
headings: from 1st level
<h1>to 6th level headings
inline elements like:
Block elements are meant to structure the main parts of your page, by dividing your content in coherent blocks.
Inline elements are meant to differentiate part of a text, to give it a particular function or meaning. Inline elements usually comprise a single or few words.
Opening and closing tags
All block-level elements have an opening and closing tags.
As a result, self-enclosing elements are inline elements, simply because their syntax don’t allow them to contain any other HTML element.
|Have opening and closing tags||Self-enclosing|
Other types of HTML elements
There are several exceptions to the block/inline elements, but the ones you will most often encounter are:
list items for the
table, table rows, table cells for