+ 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 Answers
+ 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