如何在 HTML 中标记文本上标?
htmlweb developmentfront end technology更新于 2024/2/9 17:48:17
要在 HTML 中标记文本上标,请使用 <sup>…</sup> 标签。请记住,使用 <sup>...</sup> 标签时,起始标签和结束标签都是必需的。
上标文本看起来比正常行高出半个字符。它显示为较小的字体。

您可以尝试使用以下代码在 HTML 中标记文本上标。这里,我们使用 <sup> 标签写入值 2 4,
<!DOCTYPE html> <html> <head> <title>HTML text superscript</title> </head> <body> <h1>Heading</h1> <p> Value: 2 <sup>4</sup> = 16 </p> </body> </html>
输出

相关文章
有用资源
html 参考教程 - 该教程包含有关 html 的更多信息:https://www.cainiaomax.com/html/

