Empty Element in HTML
In short, an element is an individual component of an HTML document that does not have any embedded OR text element. In HTML, there are many empty elements available, such as <img />, <input />, <link />, <meta />, <br />, <hr />, and <embed />.
Why Use Empty Elements?
As a developer by using empty elements, we can make a web page more flexible, for more understanding you can explore the below points:
- <be />: It is used for a line break in a text.
- <area>: It is used to design a map of clickable zones in an image to guide the users to different links.
- <base>: Pass URL for all relative URLs in a document.
- <hr />: If you want horizontal line then use <hr />.
- <img />: Use to pass image URL with other image attributes, etc...