上标、下标~不常用的 html 标签

时间:2023-03-09 04:20:25
上标、下标~不常用的 html 标签

<sup>上标

<sub>下标

<small>小号字

<del> 删除线

上标、下标~不常用的 html 标签======》上标、下标~不常用的 html 标签

对应的 js

stringObj.sup()  上标

stringObj.sub()  下标

stringObj.sub()  使用小字号显示

stringObj.strike() 使用删除线

彩蛋:

<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<title>Document</title>
</head>
<body>
<script type="text/javascript">
var txt = "z-one" document.write("<p>1、Big--大号字体: " + txt.big() + "</p>")
document.write("<p>2、Small--小号字体: " + txt.small() + "</p>") document.write("<p>3、Bold--粗体: " + txt.bold() + "</p>")
document.write("<p>4、Italic--斜体: " + txt.italics() + "</p>") document.write("<p>5、Blink--字符串闪动: " + txt.blink() + " (does not work in IE)</p>")
document.write("<p>6、Fixed--以打印机文本显示: " + txt.fixed() + "</p>")
document.write("<p>7、Strike--删除线: " + txt.strike() + "</p>") document.write("<p>8、Fontcolor--字体颜色: " + txt.fontcolor("Red") + "</p>")
document.write("<p>9、Fontsize--字体大小: " + txt.fontsize(16) + "</p>") document.write("<p>10、Lowercase--转换为小写: " + txt.toLowerCase() + "</p>")
document.write("<p>11、Uppercase--转换为大写: " + txt.toUpperCase() + "</p>") document.write("<p>12、Subscript--下标: " + txt+txt.sub() + "</p>")
document.write("<p>13、Superscript--上标: " +txt+ txt.sup() + "</p>") document.write("<p>14、Link--链接: " + txt.link("http://www.cnblogs.com/z-one") + "</p>")
</script> </body> </html>

结果:

上标、下标~不常用的 html 标签