In HTML, as a rule, every element
is required to have both an
opening and a closing tag.
However, there are exceptions
to this rule.
Certain HTML elements are self-closing
elements and they do not require
a closing tag. These elements are
called Void Elements.
The /
is optional for void elements.
Some developers use /
while writing
the void elements, but in this course,
the void elements will be written
without the /
.
Let us have a look at some examples
of void elements:
Since there is no closing tag,
no content can be added between
the opening and closing tags.