您的位置:首页 > 教育 > 锐评 > HTML中的文字/分区标记/特殊符号

HTML中的文字/分区标记/特殊符号

2025/4/20 16:34:09 来源:https://blog.csdn.net/qq_74861982/article/details/142137748  浏览:    关键词:HTML中的文字/分区标记/特殊符号

1.font标记:用来设置文字的字体,大小,颜色,等属性

<!--font:font标记用来设置字体大小颜色属性size:设置字号,默认是3号,+1表示4号,-1表示2号,取值范围是[+1,+7]或[-7,-1]color:设置文字的颜色,有 black blue gray green lime...共16钟face:设置字体,默认为宋体--><font size="+1" color="green" face="宋体"> 潇潇暮雨子规啼</font>

2.hn标记:标题标记,n为1~6,n越大标题越小

 <!-- hn:标题标记属性align:对齐方式有 left right center--><h2>我是一个标题</h2>

3.段落标记p,自动再段落前后换行的

4.br换行标记是一个单标记,两个换行标记相当于一个p

 <!-- p:段落标记,自动再段落前后添加换行属性align:对齐方式有 left right center--><p>大家好!</p>

4.预格式化标记pre:保留源代码中的格式

    <!-- pre:预格式化标记  保留源代码中的格式 --><pre>hey will be staying for five days.How long time will you be staying? </pre>

 

5.居中标记center 

    <!--center: 居中 --><center>Are you ok?</center>

6.缩排标记 blockquote:左侧缩进,而且让字数变得紧凑

 <!--blockquote: 缩排标记 左侧缩进,而且让字数变得紧凑--><blockquote>The Greenwood Boys are a group of pop singers.At present,they are visiting all partsof the country.They will be arrving here tomorrow.They will be comming by train and most of the young people in thw town will be meeting themat the station. Tomorrow evening they will be singing at the Wrokers' Club.The Greenwood Boys will be staying five days. During this time,they will give five performances.As usual,the police will have a difficult time.they will be trying keep  order.It is always the same one these occasions.</blockquote>

7.水平线标记hr:就是一条分割线

<!-- hr:水平线 size:大小width:宽度color=水平线颜色align:对齐方式 默认居中center 也可以left right --><hr/ size="5%"  width="100%" color="red" align="right" >

 

8.常用特殊符号

        符号         功能

        &nbsp;:      表示一个空格

        &yen;:       钱的符号

        sup;:        下标

        sup;:        上标

        &lt;:        <

        &gt;:        >

        &copy:       ©

        &trade;:     tm

        &hellip;:    ...

        &Prime;:     "

        ^prime;:     '

<!-- i/em:都表示斜体 --><p>你好 <i>你好</i> <em>你好</em></p><!-- b/strong:都表示加粗 --><p>say hello <strong>say hello</strong> <b>say hello</b></p><!-- 符号         功能&nbsp;:      表示一个空格 &yen;:       钱的符号sup;:        下标sup;:        上标&lt;:        <&gt;:        >&copy:       ©&trade;:     tm&hellip;:    ...&Prime;:     "^prime;:     '--><p>x<sup>2</sup>+y<sup>2</sup>=z<sup>2</sup>&nbsp;   10&yen;&nbsp; H<sub>2</sub>O</p><p>2&gt;1</p><p>1&lt;2</p><p>12&trade;</p><p>&Prime;me&Prime;</p><p>&prime;me&prime;</p><p>&hellip;</p>

效果:

所有代码


<html>
<head><title>东方翱翔</title>
</head><!-- 
bgcolor:背景颜色
bgcolor="blue"background:背景图片
background="./imgs/B.jpg"link alink vlink:超链接访问前后的颜色
link="green" alink="yellow" vlink="black"--><body><!-- p:段落标记 有自动换行的功能 --><!--font:font标记用来设置字体大小颜色属性size:设置字号,默认是3号,+1表示4号,-1表示2号,取值范围是[+1,+7]或[-7,-1]color:设置文字的颜色,有 black blue gray green lime...共16钟face:设置字体,默认为宋体--><font size="+1" color="green" face="宋体"> 潇潇暮雨子规啼</font><!-- hn:标题标记,属性align:对齐方式有 left right center--><h2>我是一个标题</h2><!-- p:段落标记,自动再段落前后添加换行属性align:对齐方式有 left right center--><p>大家好!</p><!-- pre:预格式化标记  保留源代码中的格式 --><pre>hey will be staying for five days.How long time will you be staying? </pre><!--center: 居中 --><center>Are you ok?</center><!-- hr:水平线 size:大小width:宽度color=水平线颜色align:对齐方式 默认居中center 也可以left right --><hr/ size="5%"  width="100%" color="red" align="right" ><!--blockquote: 缩排标记 左侧缩进,而且让字数变得紧凑--><blockquote>The Greenwood Boys are a group of pop singers.At present,they are visiting all partsof the country.They will be arrving here tomorrow.They will be comming by train and most of the young people in the town will be meeting themat the station. Tomorrow evening they will be singing at the Wrokers' Club.The Greenwood Boys will be staying five days. During this time,they will give five performances.As usual,the police will have a difficult time.they will be trying keep  order.It is always the same one these occasions.</blockquote><hr/ color="red"><!-- hr:水平线 --><!-- i/em:都表示斜体 --><p>你好 <i>你好</i> <em>你好</em></p><!-- b/strong:都表示加粗 --><p>say hello <strong>say hello</strong> <b>say hello</b></p><!-- 符号         功能&nbsp;:      表示一个空格 &yen;:       钱的符号sup;:        下标sup;:        上标&lt;:        <&gt;:        >&copy:       ©&trade;:     tm&hellip;:    ...&Prime;:     "^prime;:     '--><p>x<sup>2</sup>+y<sup>2</sup>=z<sup>2</sup>&nbsp;   10&yen;&nbsp; H<sub>2</sub>O</p><p>2&gt;1</p><p>1&lt;2</p><p>12&trade;</p><p>&Prime;me&Prime;</p><p>&prime;me&prime;</p><p>&hellip;</p><hr><p align="right"> 东方翱翔 &copy;版权所有</p></body>
</html>

版权声明:

本网仅为发布的内容提供存储空间,不对发表、转载的内容提供任何形式的保证。凡本网注明“来源:XXX网络”的作品,均转载自其它媒体,著作权归作者所有,商业转载请联系作者获得授权,非商业转载请注明出处。

我们尊重并感谢每一位作者,均已注明文章来源和作者。如因作品内容、版权或其它问题,请及时与我们联系,联系邮箱:809451989@qq.com,投稿邮箱:809451989@qq.com