How can this code lies in a regular manner? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

How can this code lies in a regular manner?

https://code.sololearn.com/WQdio92T6X7n/?ref=app

14th Aug 2018, 6:54 PM
SUBHRANSHU PANDA
SUBHRANSHU PANDA - avatar
8 Answers
+ 2
You mean why it doesn't show an error, even though you haven't closed the <li> tags. This happens because HTML is not as strict as other languages and some browsers will just ignore that problem. But remember, not every browser will tolerate such errors.
14th Aug 2018, 7:20 PM
Ledio Deda
Ledio Deda - avatar
+ 2
If you try every browser you will definetly find one.✌ But the idea is that we have to educate the future programmers with good programming practises, so they will write clean and correct codes.😁
14th Aug 2018, 7:50 PM
Ledio Deda
Ledio Deda - avatar
+ 2
😇
14th Aug 2018, 7:51 PM
SUBHRANSHU PANDA
SUBHRANSHU PANDA - avatar
+ 1
Thanks
14th Aug 2018, 7:31 PM
SUBHRANSHU PANDA
SUBHRANSHU PANDA - avatar
+ 1
Lεd10 Dεda Name one browser that won't tolerate it.
14th Aug 2018, 7:44 PM
Vlad Serbu
Vlad Serbu - avatar
+ 1
i dont know sir, please tell
14th Aug 2018, 7:45 PM
SUBHRANSHU PANDA
SUBHRANSHU PANDA - avatar
+ 1
Lεd10 Dεda Google doesn't agree with you: https://google.github.io/styleguide/htmlcssguide.html#HTML_Formatting_Rules . The reason is simple: the HTML standard specifies the following tags as optional to close: li, html, head, body, p, dt, dd, option, thead, th, tbody, tr, td, tfoot, colgroup. You can not close any of the above and NO standard browser will complain.
14th Aug 2018, 7:59 PM
Vlad Serbu
Vlad Serbu - avatar
+ 1
@Vlad Serbu Thanks for the precious information😉
14th Aug 2018, 8:34 PM
Ledio Deda
Ledio Deda - avatar