过web前端开发的都知道,每个标签都自带样式,比如body自带margin,a标签自带下划线,li标签自带小圆点,但是你知道更具体的吗?以下的文档还原了w3c对每个标签最初的定义,收藏一下,对你一定有帮助。
@charset "utf-8";/*@charset "gb2312";*//** * ============================================================================ * 版权所有: 切版 * 网站地址: http://www.qieban.cn * 该文件为W3C为标签赋予最原始样式规则、制作参考无实际作用 * ---------------------------------------------------------------------------- **/ html, address, blockquote, body, dd, div, dl, dt, fieldset, form, frame, frameset, h1, h2, h3, h4, h5, h6, noframes, ol, p, ul, center, dir, hr, menu, pre { display: block } li { display: list-item } head { display: none } table { display: table } tr { display: table-row } thead { display: table-header-group } tbody { display: table-row-group } tfoot { display: table-footer-group } col { display: table-column } colgroup { display: table-column-group } td, th { display: table-cell } caption { display: table-caption } th { font-weight: bolder; text-align: center } caption { text-align: center } body { margin: 8px } h1 { font-size: 2em; margin: .67em 0 } h2 { font-size: 1.5em; margin: .75em 0 } h3 { font-size: 1.17em; margin: .83em 0 } h4, p, blockquote, ul, fieldset, form, ol, dl, dir, menu { margin: 1.12em 0 } h5 { font-size: .83em; margin: 1.5em 0 } h6 { font-size: .75em; margin: 1.67em 0 } h1, h2, h3, h4, h5, h6, b, strong { font-weight: bolder } blockquote { margin-left: 40px; margin-right: 40px } i, cite, em, var, address { font-style: italic } pre, tt, code, kbd, samp { font-family: monospace } pre { white-space: pre } button, textarea, input, select { display: inline-block } big { font-size: 1.17em } small, sub, sup { font-size: .83em } sub { vertical-align: sub } sup { vertical-align: super } table { border-spacing: 2px; } thead, tbody, tfoot { vertical-align: middle } td, th { vertical-align: inherit } s, strike, del { text-decoration: line-through } hr { border: 1px inset } ol, ul, dir, menu, dd { margin-left: 40px } ol { list-style-type: decimal } ol ul, ul ol, ul ul, ol ol { margin-top: 0; margin-bottom: 0 } u, ins { text-decoration: underline } br:before { content: "\A" } :before, :after { white-space: pre-line } center { text-align: center } :link, :visited { text-decoration: underline } :focus { outline: thin dotted invert } /* Begin bidirectionality settings (do not change) */ BDO[DIR="ltr"] { direction: ltr; unicode-bidi: bidi-override } BDO[DIR="rtl"] { direction: rtl; unicode-bidi: bidi-override } *[DIR="ltr"] { direction: ltr; unicode-bidi: embed } *[DIR="rtl"] { direction: rtl; unicode-bidi: embed } @media print { h1 { page-break-before: always } h1, h2, h3, h4, h5, h6 { page-break-after: avoid } ul, ol, dl { page-break-before: avoid } }
切版,切图网旗下靠谱的web前端外包服务切图客群体。http://www.qieban.cn/
近米谷爱上了整理的活,HTML标签全称对照,拿去♥
HTML标签 | 英文全称 | 中文释义 |
a | Anchor | 锚 |
abbr | Abbreviation | 缩写词 |
acronym | Acronym | 取首字母的缩写词 |
address | Address | 地址 |
dfn | Defines a Definition Term | 定义定义条目 |
kbd | Keyboard | 键盘(文本) |
samp | Sample | 示例(文本 |
var | Variable | 变量(文本) |
tt | Teletype | 打印机(文本) |
code | Code | 源代码(文本) |
pre | Preformatted | 预定义格式(文本 ) |
blockquote | Block Quotation | 区块引用语 |
cite | Citation | 引用 |
q | Quotation | 引用语 |
strong | Strong | 加重(文本) |
em | Emphasized | 加重(文本) |
b | Bold | 粗体(文本) |
i | Italic | 斜体(文本) |
big | Big | 变大(文本) |
small | Small | 变小(文本) |
sup | Superscripted | 上标(文本) |
sub | Subscripted | 下标(文本) |
bdo | Direction of Text Display | 文本显示方向 |
br | Break | 换行 |
center | Centered | 居中(文本) |
font | Font | 字体 |
u | Underlined | 下划线(文本) |
s/ strike | Strikethrough | 删除线 |
div | Division | 分隔 |
span | Span | 范围 |
ol | Ordered List | 排序列表 |
ul | Unordered List | 不排序列表 |
li | List Item | 列表项目 |
dl | Definition List | 定义列表 |
dt | Definition Term | 定义术语 |
dd | Definition Description | 定义描述 |
del | Deleted | 删除(的文本) |
ins | Inserted | 插入(的文本) |
h1~h6 | Header 1 to Header 6 | 标题1到标题6 |
p | Paragraph | 段落 |
hr | Horizontal Rule | 水平尺 |
href | hypertext reference | 超文本引用 |
alt | alter | 替用(一般是图片显示不出的提示) |
src | Source | 源文件链接 |
cell | cell | 巢 |
cellpadding | cellpadding | 巢补白 |
cellspacing | cellspacing | 巢空间 |
nl | navigation lists | 导航列表 |
tr | table row | 表格中的一行 |
th | table header cell | 表格中的表头 |
td | table data cell | 表格中的一个单元格 |
iframe | Inline frame | 定义内联框架 |
optgroup | Option group | 定义选项组 |
TML 文本格式化
加粗文本
斜体文本
电脑自动输出
这是 下标 和 上标
HTML 格式化标签
HTML 使用标签<b> 与<i> 对输出的文本进行格式, 如:粗体 or 斜体
这些HTML标签被称为格式化标签(请查看底部完整标签参考手册)。
通常标签 <strong> 替换加粗标签 <b> 来使用, <em> 替换 <i>标签使用。然而,这些标签的含义是不同的:<b> 与<i> 定义粗体或斜体文本。<strong> 或者 <em>意味着你要呈现的文本是重要的,所以要突出显示。现今所有主要浏览器都能渲染各种效果的字体。不过,未来浏览器可能会支持更好的渲染效果。 |
在线实例
文本格式化
此例演示如何在一个 HTML 文件中对文本进行格式化
预格式文本
此例演示如何使用 pre 标签对空行和空格进行控制。
"计算机输出"标签
此例演示不同的"计算机输出"标签的显示效果。
地址
此例演示如何在 HTML 文件中写地址。
缩写和首字母缩写
此例演示如何实现缩写或首字母缩写。
文字方向
此例演示如何改变文字的方向。
块引用
此例演示如何实现长短不一的引用语。
删除字效果和插入字效果
此例演示如何标记删除文本和插入文本。
HTML 文本格式化标签
标签 | 描述 |
---|---|
<b> | 定义粗体文本 |
<em> | 定义着重文字 |
<i> | 定义斜体字 |
<small> | 定义小号字 |
<strong> | 定义加重语气 |
<sub> | 定义下标字 |
<sup> | 定义上标字 |
<ins> | 定义插入字 |
<del> | 定义删除字 |
HTML "计算机输出" 标签
标签 | 描述 |
---|---|
<code> | 定义计算机代码 |
<kbd> | 定义键盘码 |
<samp> | 定义计算机代码样本 |
<var> | 定义变量 |
<pre> | 定义预格式文本 |
HTML 引文, 引用, 及标签定义
标签 | 描述 |
---|---|
<abbr> | 定义缩写 |
<address> | 定义地址 |
<bdo> | 定义文字方向 |
<blockquote> | 定义长的引用 |
<q> | 定义短的引用语 |
<cite> | 定义引用、引证 |
<dfn> | 定义一个定义项目。 |
如您还有不明白的可以在下面与我留言或是与我探讨QQ群308855039,我们一起飞!
*请认真填写需求信息,我们会在24小时内与您取得联系。