+ 6
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?
8 Respuestas
+ 5
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:
https://validator.w3.org/
+ 3
The easy and best way is practice. Use what you learn and make some project combine of these tag!
+ 3
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=“site.com”>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.
+ 3
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
+ 3
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