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越大标题越小

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

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

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

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

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

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

5.居中标记center

bash 复制代码
    <!--center: 居中 -->
    <center>Are you ok?</center>

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

bash 复制代码
 <!--blockquote: 缩排标记 
    左侧缩进,而且让字数变得紧凑
    -->
    <blockquote>
        The Greenwood Boys are a group of pop singers.At present,they are visiting all parts
        of 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 them
        at 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:就是一条分割线

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

所有代码

bash 复制代码
<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 parts
        of 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 them
        at 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:水平线 -->
    <hr/ color="red">
    <p align="right"> 东方翱翔 &copy;版权所有</p>


</body>
</html>
相关推荐
上海合宙LuatOS10 分钟前
全栈工程师实战手册:LuatOS日志系统开发指南!
java·开发语言·单片机·嵌入式硬件·物联网·php·硬件工程
多敲代码防脱发10 分钟前
导出导入Excel文件(详解-基于EasyExcel)
java·开发语言·jvm·数据库·mysql·excel
一刀到底21121 分钟前
做为一个平台,给第三方提供接口的时候,除了要求让他们申请 appId 和 AppSecret 之外,还应当有哪些安全选项,要过等保3级
java·网络·安全
进取星辰24 分钟前
25、Tailwind:魔法速记术——React 19 样式新思路
前端·react.js·前端框架
wjcurry1 小时前
我的实习日报
java·redis·mysql
x-cmd1 小时前
[250512] Node.js 24 发布:ClangCL 构建,升级 V8 引擎、集成 npm 11
前端·javascript·windows·npm·node.js
夏之小星星1 小时前
el-tree结合checkbox实现数据回显
前端·javascript·vue.js
我喜欢山,也喜欢海2 小时前
Jenkins Maven 带权限 搭建方案2025
java·jenkins·maven
明天更新2 小时前
Java处理压缩文件的两种方式!!!!
java·开发语言·7-zip