So, I was learning about lists in HTML at college and the professor said <li>
doesn't have an ending tag </li>
along with some other tags like <img>
and <br>
. Is that correct or not? Because I've seen a lot of templates / themes using tag at the end, as well many sites also teach you that </li>
exists, so I'm not sure whom to believe and what is correct way of using <li>
?
The reason why I'm asking this is because last time we learned about <img>
tag, he said that the alt=""
attribute gives you a text displayed over the image when you hover the mouse, which turned it's only alternative text for broken images when I asked here and he was wrong for that case, which also made me wonder this as well.
Thanks.
<li>
is not a self-closing tag and needs a separate closing</li>
. – WertIs that correct or not?
— was answering this. – Pleiad</li>
tag should never be considered 'optional' if you wish to write proper HTML code. – Laurettalaurette<optgroup>
elements. This may not be the case. – Incantationbr
andinput
) use only the shorthand (<input/>
) and do not use the full<input></input>
syntax, because it is actually invalid in HTML4 – Retraction<li>
element? It's easily readable if one understands the technology one is using. Understanding the technology should be considered the "good practice". – Incantation</li>
tags. – Incantation<b>
is not and is not being deprecated, neither in lower case nor upper case. – Eulogy