DEV Community

Gaurav Singh
Gaurav Singh

Posted on

How to distinguish which HTML tag has to close tag or Not?

If any HTML element doesn't have any content inside them then it will not have a closing tag.

Image description
For Example image tag will not contain any content inside it that's why it doesn't have a closing tag.

Image description
The paragraph tag will have content that's why it has a closing tag.

I am a Web Developer & enjoy working on challenging projects, which is what makes this job so rewarding. You can reach out to my My Portfolio Site. I hope this article will helpful

Top comments (0)