In html we use start tag and ending tag....but if we dont write ending tag then it will work...then why we should use ending tag | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

In html we use start tag and ending tag....but if we dont write ending tag then it will work...then why we should use ending tag

example<html> </html>.....here if we donot write </html> then it will work then why need of using ending tag

23rd Sep 2018, 8:32 PM
Piyush Kumar
Piyush Kumar - avatar
3 Answers
+ 6
Because html standards. Html ”skeleton” is mandatory so some browers does it for you. Try to use anchor tag without ending and you see what happens.
23rd Sep 2018, 8:36 PM
Toni Isotalo
Toni Isotalo - avatar
+ 1
thanks🙂
23rd Sep 2018, 8:56 PM
Piyush Kumar
Piyush Kumar - avatar
0
Also, it may work, but is not guaranteed to work. If we write without following the language rules, it will probably fail sometimes.
24th Sep 2018, 2:52 AM
Emerson Prado
Emerson Prado - avatar