Necessary to add an end Tag
It is important to include the closing tag of an HTML element in order to ensure that the content is displayed correctly. While it is recommended to add closing tags to non-void HTML elements, modern browsers are becoming more forgiving and will not throw an error if you forget to include them. However, this can cause issues when you add additional HTML elements later on. Therefore, it is best practice to always include the closing tag for non-void HTML elements.
Example 1: In this example, we will see the implementation of above tag.
<!DOCTYPE html>
<html>
<head>
<title>HTML Elements</title>
</head>
<body>
<h2>Welcome To w3wiki</h2>
<p>Hi Geeks!
</body>
</html>
Output: This Image is showing the Browser’s Developer Tools and you can see that the missing closing tag of the paragraph element in the above-written code is automatically added by the browser without showing any error.
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