Void Elements

suggest change

Introduction

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:

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents