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.