<?xml version="1.0" encoding="utf-8"?>

Empty HTML element

Empty HTML element

Empty HTML elements, also known as void elements, are unique because they don't have content between an opening and closing tag. Instead, they perform specific functions or display particular attributes on the page.

Common examples include the <img> tag for images, the <br> tag for line breaks, and the <input> tag for form fields. Since there's no content to wrap, these elements are self-closing and don't require a separate closing tag.

Utilizing empty elements correctly can enhance the structure and readability of your code.

Improve your UX & Product skills with interactive courses that actually work