sup 元素的使用

最近学到一个新的html的元素使用:<sup/>,在这里总结一下。

<sup/>基本的含义是标注上标的功能,最常见到的就是指向本网站外的链接,下面一个例子:

Go to http://www.eclipse.org/webtools/ and download the latest release of WTP. (This tutorial is using release 1.5.2).

用一个绿色的箭头表示,呵呵,源代码是这样的:

  1. Go to <span class="nobr"><a href="http://www.eclipse.org/webtools/" title="Visit page outside Confluence">http://www.eclipse.org/webtools/<sup><img class="rendericon" src="/confluence/images/icons/linkext7.gif" height="7" width="7" align="absmiddle" alt="" border="0"/></sup></a></span> and download the latest release of WTP.   

与之对应的是下标<sub>,呵呵,下面是详细的定义:

定义

说明内含文本要以上标的形式显示,比当前字体稍小。

Specifies that the enclosed text should be displayed in superscript, using a smaller font than the current font <script type="text/javascript">arw(">C", ark2);</script>.

注释

此元素在 Internet Explorer 3 <script type="text/javascript">arw(">h", ark4);</script>.0 及以上版本的 HTML 中可用,在 Internet Explorer 4.0 及以上版本的脚本中可用。

此元素 <script type="text/javascript">arw("|3b", ark6);</script>是内嵌元素。

此元素需要关闭标签。

than the current font.element.

The SUP element is available in HTML as of Internet Explorer 3.0, and in script as of Internet Explorer 4 <script type="text/javascript">arw(">h", ark4);</script>.0 <script type="text/javascript">arw("@P", ark0);</script>.

<script type="text/javascript">arw("AQpf>vt0lVPce>vx9@nLc@FpU0pUP@nPet3lU8@x", ark5);</script>This element is an inline element.

element requires!

This element requires a closing tag.

另外,js也提供了这个函数:

sup 方法

将 HTML 的 <SUP> 标识放置到 String 对象中的文本两端。

strVariable.sup( )
"String Literal".sup( )

说明

下面的示例演示了 sup 方法是如何使用的:

var strVariable = "This is a string object";
strVariable = strVariable.sup( );

在执行上一条语句后 strVariable 的值为:

<SUP>This is a string object</SUP>

不检查该标识是否已应用于该字符串了。

要求
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值