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
div
section
p
ul
ol
- All headings (
h1
toh6
) table
form
article
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
strong
b
mark
span
input
label
a
button
img
q
Among others...