HTML <sup>标签
HTML <sup>标签作用
HTML <sup>标签被称为上标标签,用于定义上标文本。 <sup>标签中的文本以较高的基线出现,并且以比周围文本小的字体大小呈现。
<sup>标签对于定义数学公式和脚注很有用。比如10的平方,10
2。
语法
以下是有关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中的事件属性。
支持浏览器