HTML <sup> 标签被称为上标标签,用于定义上标文本。<sup> 标签内的文本以上基线显示,并以比周围文本更小的字体大小呈现。
<sup> 标签对于定义数学公式和脚注很有用。
<sup>......</sup>
以下是关于 HTML <sup> 标签的一些规范
| 展示 | 排队 |
| 开始标签/结束标签 | 开始和结束标签 |
| 用法 | 原文 |
<!DOCTYPE html>
<html>
<head>
<title>HTML sup Tag</title>
<style>
body{
text-align: center;
}
</style>
</head>
<body>
<h2>Example of sup tag</h2>
Following is the famous Pythagorean Theorem:
<p style="font-size: 20px; color: green;"><var>a</var><sup>2</sup>+<var>b</var><sup>2</sup>=<var>c</var><sup>2</sup>
</p>
<p>Where a, b, and c represents the sides of right angle triangle</p>
</body>
</html>输出:

<sup> 标签不包含任何特定属性。
<sup> 标签支持 HTML 中的全局属性。
<sup> 标签支持 HTML 中的 Event 属性。
| 元素 | Chrome | IE | Firefox | Safari | Opera |
|---|---|---|---|---|---|
| <sup> | Yes | Yes | Yes | Yes | Yes |