Looking for html Answers? Try Ask4KnowledgeBase
Looking for html Keywords? Try Ask4Keywords

HTMLVoid Elements


Introduction

Not all HTML tags are of the same structure. While most elements require an opening tag, a closing tag, and contents, some elements - known as void elements - only require an opening tag as they themselves do not contain any elements. 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. Void elements are self-closing, so they must not have a closing tag.

In HTML5, the following elements are void:

  • area
  • base
  • br
  • col
  • embed
  • hr
  • img
  • input
  • keygen
  • link
  • meta
  • param
  • source
  • track
  • wbr