< li> HTML中的标签有结尾标签? [英] Does the <li> tag in HTML have an ending tag?
问题描述
< / li>
以及其他一些标签,如< img>
和< br>
。这是否正确?因为我在最后看到很多使用标签的模板/主题,许多网站也告诉你< li>
? 的正确方法。为什么我问这是因为上次我们了解到 谢谢。 So, I was learning about lists in HTML at college and the professor said The reason why I'm asking this is because last time we learned about Thanks. The An
这篇关于< li> HTML中的标签有结尾标签?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!< img>
标签,他说 alt =$ c当鼠标悬停时,$ c>属性为您提供了一个显示在图片上的文本,当我在这里问他时,这只是替代破碎图片的文本,这也让我很想知道这一点。 p>
li
元素有一个结束标记(< / li>
),但它是optio nal :
lockquote
li
元素的结束标签可能如果 li
元素之后紧跟着另一个 li
元素,或者父元素中没有更多内容。
<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>
?<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.li
element has an end tag (</li>
), but it’s optional in some cases:
li
element's end tag may be omitted if the li
element is immediately followed by another li
element or if there is no more content in the parent element.