過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小時內與您取得聯系。