标签与跨度:HTML [英] Label vs span: HTML
本文介绍了标签与跨度:HTML的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我对渲染数据的用途有些困惑.我的情况是我必须渲染计数,但我不确定使用 span
或 label
.
I am a bit confused in what to use for rendering data. My scenario is that I have to render count and I am not sure about using span
or label
.
<span id="spnCount"></span>
或
<label id="lblCount"></label>
推荐答案
label
用于当您有表单或输入元素时 - label
与input
元素.Span 是任何内联内容的通用容器.我认为你想要一个 span
在这种情况下
A label
is used when you have a form or input elements - the label
is associated with an input
element. Span is a general container for any inline content. I think you want a span
in this case
这篇关于标签与跨度:HTML的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文