HTML5 <sub> 和 <sup> 标签

定义和用法

<sub> 标签可定义下标文本。<sup> 可定义上标文本。

HTML 4.01 与 HTML5 之间的差异

没有。

例子

这段文本包含 <sub>下标</sub>
      
这段文本包含 <sup>上标</sup>

属性

标准属性

class, contenteditable, contextmenu, dir, draggable, id, irrelevant, 
lang, ref, registrationmark, tabindex, template, title

如需完整的描述,请访问 HTML5 中标准属性

事件属性

onabort, onbeforeunload, onblur, onchange, onclick, oncontextmenu, 
ondblclick, ondrag, ondragend, ondragenter, ondragleave, ondragover, 
ondragstart, ondrop, onerror, onfocus, onkeydown, onkeypress, onkeyup, 
onload, onmessage, onmousedown, onmousemove, onmouseover, onmouseout, 
onmouseup, onmousewheel, onresize, onscroll, onselect, onsubmit, onunload

如需完整的描述,请访问 HTML5 中事件属性

TIY 实例

上标和下标
本例演示如何使用 sup 和 sub 元素。

Copyright © 2009-2011 HTML5中文网 版权所有