Confusion in HTML tags | SoloLearn: Learn to code for FREE!


Confusion in HTML tags

Some HTML tags have ending tags like <a> has ending tag </a>. while others don't have ending tags like meta tags in head section or input tags or some other. So how can we remember which tag has ending tag and which has not?

2/24/2019 3:27:54 AM

Saadat Ali

8 Answers

New Answer


Alternatively, you can run your code through a validation service. There are lots of free validators. They will tell you when you're missing something. Example:


The easy and best way is practice. Use what you learn and make some project combine of these tag!


As a general rule, tags that go around something obviously have open and close. Tags that don’t go around something generally don’t have to have closing tags, but they still can. Best explanation is examples: <a href=“”>link text</a> <b>bold text</b> <meta name=“description” content=“page description”> <br> To close those last 2, just add a space and / at the end. <meta name=“description” content=“page description” /> <br /> Now they are closed too. Like pp said, practice is best way to learn.



You remember it when you have practice them in real projects. In addition you should use google for searching all of time, when you are beginner or professional


Saadat Ali, that is a very nice question but I think we shouldn't beat around the bush, the answer to your question is "by practicing and using various tags often". I hope this helps