HTML <sub> 标签有什么作用?
<sub> 标签可定义下标文本。<sup> 可定义上标文本。都属于行内元素,默认比当前字体稍小。
<sub> 标签实例(www.169it.com)
下标文本:
<p>这个文本包含 <sub>下标</sub>文本。</p>





所有主流浏览器都支持 <sub> 标签。
标签定义及使用说明
<sub> 标签定义下标文本。下标文本将会显示在当前文本流中字符高度的一半为基准线的下方,但是与当前文本流中文字的字体和字号都是一样的。下标文本能用来表示化学公式,比如 H2O。
提示:请使用 <sup> 标签定义上标文本。
Html上标:<sup>上浮内容</sup>
Html下标:<sub>下浮内容</sub>
需要html的上浮上标加html sup标签,需要下浮下标注的内容加html sub标签。
1)、需要上浮上标的内容前加<sup>后加</sup>标签
2)、需要下浮下标内容前加<sub>后加</sub>标签
3)、常常在化学表达式中使用上标或下标的html标签比较多。我们使用html上标下标标签即可解决无需使用css样式来实现。
HTML 4.01 与 HTML5之间的差异
无。
<sub> 标签支持 HTML 的全局属性。
<sub> 标签支持 HTML 的事件属性。