Void Elements
suggest changeIntroduction
Not all HTML tags have the same structure. While most elements require an opening tag, a closing tag, and contents, void elements only require an opening tag because they cannot contain anything. This topic explains and demonstrates the proper usage of void elements in HTML.
Remarks
A void element cannot have any content but may have attributes. It must not have a closing tag. In HTML the optional trailing slash does not make the tag an XML empty-element tag.
In HTML5, the following elements are void:
areabasebrcolembedhrimginputkeygen(obsolete; removed from HTML)linkmetaparamsourcetrackwbr
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents