HTML Empty Element
HTML Elements without any content i.e., that do not print anything are called Empty elements. Empty HTML elements do not have an ending tag. For instance. <br>, <hr>, <link>, <input> etc are HTML elements.
Example 2: In this example <br> tag doesn’t print anything. It is used as a line break that breaks the line between <h2> and <p> tags.
<!DOCTYPE html>
<html>
<head>
<title>Empty HTML Elements</title>
</head>
<body>
<h2>Welcome To GfG</h2>
<br />
<p>Hello Geeks.</p>
</body>
</html>
Output:
HTML Elements
An HTML Element is a collection of start and end tags with the content inserted between them. HTML elements are building blocks of web pages, representing different types of content such as headings, paragraphs, links, and images.
Contact Us