HTML tag 速查表

Main

TagEnglish中文語義
!DOCTYPEdocument type宣告文件類型
htmlhtml rootHTML 根元素
!-- --html commentHTML 注釋

Metadata

TagEnglish中文語義
headheadHTML metadata
titletitleHTML 標題
basebase定義相對 URL
linklink外部匯入 JS 或 CSS
metameta定義其他 metadata
stylestyle樣式

script

TagEnglish中文語義
scriptscriptJS 腳本
noscriptno script無法使用 JS 時的替代文字
templatetemplate通過 JS 執行時實例化內容的容器

章節

TagEnglish中文語義
bodybodyHTML 內容
sectionsection章節
navnavigation導覽
headerheader頁面或章節頭部
footerfooter頁面或章節尾部
mainmain主要內容
articlearticle獨立內容
asideaside內容之外資訊
h1-h6header 1 to 6標題 1 到 6
addressaddress聯絡方式

內容

TagEnglish中文語義
pparagraph段落
hrhorizontal rule章節分隔符
figurefigure獨立內容
figcaptionfigure caption獨立內容說明
quotequotation引用
blockquoteblock quotation區塊引用
olordered list有序列表
ulunordered list無序列表
lilist item列表項目
dldefinition list定義列表
dtdefintion term定義術語
dddefinition description定義描述
prepreformatted預定義格式

形式

TagEnglish中文語義
divdivision通用分隔符
spanspan通用文字
aanchor錨點
strongstrong加重(表重點)
ememphasized強調(表強調)
smallsmall變小
citecitation作品標題或URL
abbrabbreviation縮寫
bbold粗體
iitalic斜體
uunderlined底線
sstrike through刪除線
supsuperscripted上標
subsubscripted下標
codecode代碼
varvariable變數
sampsample代碼輸出
markmark重點標示
rubyrubyRuby 注釋(或注音)標記
rpruby parenthesisRuby 注釋的額外插入
rtruby textRuby 注釋
rtcruby text containerRuby 注釋容器
bdibidirectional嵌入未知方向文字
bdobidirectional override覆蓋默認方向
timetime表日期與時間
datadata機器可讀內容
dfndefine定義
kbdkeyboard鍵盤輸出
brbreak換行
wbrword break opportunity建議換行

編輯

TagEnglish中文語義
deldeleted刪除(表移除)
insinserted插入(表修正)

嵌入

TagEnglish中文語義
imgimage圖片
canvascanvas繪圖區域
svgscalable vector graphics向量圖
iframeinline frame內聯框架
embedembed嵌入外部資源
objectobject物件(表外部資源)
paramparameter參數(object 所指定物件)
mathmath數學公式

多媒體

TagEnglish中文語義
mapmap與 area 共同定義圖形區域
areaarea與 map 共同定義圖形區域
videovideo影片及字幕
audioaudio音訊
sourcesource來源(指定 video 或 audio 來源)
tracktrack軌道(指定 video 或 audio 字幕)

表格

TagEnglish中文語義
tablefieldset控件組
tbodytable body表格主體
theadtable head表頭
tfoottable foot表尾
trtabel row
colcolumn
colgroupcolumn group單列或多列
tdtable cell表格單元
thtable cell head表格單元頭
captioncaption標題

表單

TagEnglish中文語義
formform表單
labellabel控件標題
inputinput表單輸入區
buttonbutton按鈕
selectselect下拉選擇
datalistdata list預定義選項
optionoption選項
optgroupoption group選項分組
textareatext area多行文字輸入區
outputoutput計算值
progressprogress進度
metermeter滑動條
fieldsetfieldset控件組
legendlegend圖標

互動元素

TagEnglish中文語義
dialogdialog對話框
datailsdetails細節(獲取額外訊息)
summarysummary摘要(details 的摘要)
menumenu選單
menuitemmenu item選單項目

已棄用(請避免使用)

TagEnglish中文語義
acronymacronym首字母縮寫
fontfont字型
centercenter置中
bigbig變大
keygenkey generation密鑰生成

參考資料

最後更新時間: