HTML常用带格式作用的标签

常用带格式作用的标签
1.文本格式化

<b><strong><em><big><small><sub><sup>

2.预格式文本

<pre>

3.引用

<blockquote>

4.删除线

<del>

代码如下:

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title></title>
</head>
<body>
    <b>加粗字体</b>

    <br />

    <strong>另一种粗体</strong>

    <br />

    <big>大号字体</big>

    <br />

    <em>强调字体</em>

    <br />

    <i>斜体</i>

    <br />

    <small>小号字体</small>
    <br />
        This text contains
    <sub>下标</sub>
    <br />
        This text contains
    <sup>上标</sup>
    <h1>下面为一段javascript代码</h1>
    <pre>
        var a = "";
        a = "Hello World";
        alert(a);
    </pre>
    <h1>引用演示</h1>
    <blockquote>
        引用自w3c官方HTML标准文档
    </blockquote>
    <h1>删除线</h1>
    <p><del>2</del></p>
</body>
</html>

产生效果:
在这里插入图片描述

总结:
这是几种常用带格式作用的标签,但是其中有很多都可以通过css来替代。

发布了263 篇原创文章 · 获赞 23 · 访问量 2万+

猜你喜欢

转载自blog.csdn.net/qq_41998938/article/details/90574227