HTMLチートシート
目次
- 一般
- ドキュメントタイプ宣言とHTMLルート
- メタデータ
- スクリプト
- セクショニング
- テキストレベルの要素
- パラグラフ・リスト・図表
- テーブル
- コメントアウト
- 埋め込みコンテンツ
- フォーム
- ユーザーによる操作
- フレーム
- その他
一般
一般に、どのようなタグ(仮にそれが存在しない要素であっても)もタグ名から展開可能です。
foo
1 | < foo ></ foo > |
ドキュメントタイプ宣言とHTMLルート
! または html:5
1 2 3 4 5 6 7 8 9 10 | <!doctype html> < html lang = "en" > < head > < meta charset = "UTF-8" /> < title >Document</ title > </ head > < body > </ body > </ html > |
!!!
1 | <!doctype html> |
!!!4t
1 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> |
!!!4s
1 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> |
!!!xt
1 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
!!!xs
1 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> |
!!!xxs
1 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> |
html:4t
1 2 3 4 5 6 7 8 9 10 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> < html lang = "en" > < head > < meta http-equiv = "Content-Type" content = "text/html;charset=UTF-8" /> < title >Document</ title > </ head > < body > </ body > </ html > |
html:4s
1 2 3 4 5 6 7 8 9 10 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 //EN" "http://www.w3.org/TR/html4/strict.dtd"> < html lang = "en" > < head > < meta http-equiv = "Content-Type" content = "text/html;charset=UTF-8" /> < title >Document</ title > </ head > < body > </ body > </ html > |
html:xml
1 |
html:xt
1 2 3 4 5 6 7 8 9 10 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> < head > < meta http-equiv = "Content-Type" content = "text/html;charset=UTF-8" /> < title >Document</ title > </ head > < body > </ body > </ html > |
html:xs
1 2 3 4 5 6 7 8 9 10 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> < head > < meta http-equiv = "Content-Type" content = "text/html;charset=UTF-8" /> < title >Document</ title > </ head > < body > </ body > </ html > |
html:xxs
1 2 3 4 5 6 7 8 9 10 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> < head > < meta http-equiv = "Content-Type" content = "text/html;charset=UTF-8" /> < title >Document</ title > </ head > < body > </ body > </ html > |
doc
1 2 3 4 5 6 7 8 9 | < html > < head > < meta charset = "UTF-8" /> < title >Document</ title > </ head > < body > </ body > </ html > |
doc4
1 2 3 4 5 6 7 8 9 | < html > < head > < meta http-equiv = "Content-Type" content = "text/html;charset=UTF-8" /> < title >Document</ title > </ head > < body > </ body > </ html > |
メタデータ
base
1 | < base href = "" /> |
link
1 | < link rel = "stylesheet" href = "" /> |
link:css
1 | < link rel = "stylesheet" href = "style.css" /> |
link:print
1 | < link rel = "stylesheet" href = "print.css" media = "print" /> |
link:favicon
1 | < link rel = "shortcut icon" type = "image/x-icon" href = "favicon.ico" /> |
link:touch
1 | < link rel = "apple-touch-icon" href = "favicon.png" /> |
link:rss
1 | < link rel = "alternate" type = "application/rss+xml" title = "RSS" href = "rss.xml" /> |
link:atom
1 | < link rel = "alternate" type = "application/atom+xml" title = "Atom" href = "atom.xml" /> |
meta
1 | < meta /> |
meta:utf
1 | < meta http-equiv = "Content-Type" content = "text/html;charset=UTF-8" /> |
meta:win
1 | < meta http-equiv = "Content-Type" content = "text/html;charset=windows-1251" /> |
meta:vp
1 | < meta name = "viewport" content = "width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0" /> |
meta:compat
1 | < meta http-equiv = "X-UA-Compatible" content = "IE=7" /> |
style
1 | < style ></ style > |
スクリプト
script
1 | < script ></ script > |
script:src
1 | < script src = "" ></ script > |
セクショニング
adr または address
1 | < address ></ address > |
art または article
1 | < article ></ article > |
ftr または footer
1 | < footer ></ footer > |
hdr または header
1 | < header ></ header > |
sect または section
1 | < section ></ section > |
テキストレベルの要素
a
1 | < a href = "" ></ a > |
a:link
1 |
a:mail
1 | < a href = "mailto:" ></ a > |
abbr
1 | < abbr title = "" ></ abbr > |
acr または acronym
1 | < acronym title = "" ></ acronym > |
basefont
1 | < basefont /> |
br
1 | < br /> |
bdo
1 | < bdo dir = "" ></ bdo > |
bdo:r
1 | < bdo dir = "rtl" ></ bdo > |
bdo:l
1 | < bdo dir = "ltr" ></ bdo > |
str または strong
1 | < strong ></ strong > |
パラグラフ・リスト・図表
bq または blockquote
1 | < blockquote ></ blockquote > |
dl+ または dl>dt+dd
1 2 3 4 | < dl > < dt ></ dt > < dd ></ dd > </ dl > |
fig または figure
1 | < figure ></ figure > |
figc または figcaption
1 | < figcaption ></ figcaption > |
hr
1 | < hr /> |
ol+ または ol>li
1 2 3 | < ol > < li ></ li > </ ol > |
ul+ または ul>li
1 2 3 | < ul > < li ></ li > </ ul > |
テーブル
cap または caption
1 | < caption ></ caption > |
col
1 | < col /> |
colg または colgroup
1 | < colgroup ></ colgroup > |
colgroup+, colg+ または colgroup>col
1 2 3 | < colgroup > < col /> </ colgroup > |
table+ または table>tr>td
1 2 3 4 5 | < table > < tr > < td ></ td > </ tr > </ table > |
tr+ または tr>td
1 2 3 | < tr > < td ></ td > </ tr > |
コメントアウト
c
1 | <!-- ${child} --> |
cc:ie6
1 2 3 | <!--[if lte IE 6]> ${child} <![endif]--> |
cc:ie
1 2 3 | <!--[if IE]> ${child} <![endif]--> |
cc:noie
1 2 3 | <!--[if !IE]><!--> ${child} <!--<![endif]--> |
埋め込みコンテンツ
area
1 | < area shape = "" coords = "" href = "" alt = "" /> |
area:d
1 | < area shape = "default" href = "" alt = "" /> |
area:c
1 | < area shape = "circle" coords = "" href = "" alt = "" /> |
area:r
1 | < area shape = "rect" coords = "" href = "" alt = "" /> |
area:p
1 | < area shape = "poly" coords = "" href = "" alt = "" /> |
audio
1 | < audio src = "" ></ audio > |
emb または embed
1 | < embed src = "" type = "" /> |
img
1 | < img src = "" alt = "" /> |
ifr または iframe
1 | < iframe src = "" frameborder = "0" ></ iframe > |
map
1 | < map name = "" ></ map > |
map+ または map>area
1 2 3 | < map name = "" > < area shape = "" coords = "" href = "" alt = "" /> </ map > |
obj または object
1 | < object data = "" type = "" ></ object > |
param
1 | < param name = "" value = "" /> |
src または source
1 | < source ></ source > |
video
1 | < video src = "" ></ video > |
フォーム
btn または button
1 | < button ></ button > |
btn:b または button[type=button]
1 | < button type = "button" ></ button > |
btn:r または button[type=reset]
1 | < button type = "reset" ></ button > |
btn:s または button[type=submit]
1 | < button type = "submit" ></ button > |
datal または datalist
1 | < datalist ></ datalist > |
fst, fset または fieldset
1 | < fieldset ></ fieldset > |
form
1 | < form action = "" ></ form > |
form:get
1 | < form action = "" method = "get" ></ form > |
form:post
1 | < form action = "" method = "post" ></ form > |
input
1 | < input type = "text" /> |
inp
1 | < input type = "text" name = "" id = "" /> |
input:h、input:hidden または input[type=hidden name]
1 | < input type = "hidden" name = "" /> |
input:text、input:t または inp
1 | < input type = "text" name = "" id = "" /> |
input:search または inp[type=search]
1 | < input type = "search" name = "" id = "" /> |
input:email または inp[type=email]
1 | < input type = "email" name = "" id = "" /> |
input:url または inp[type=url]
1 | < input type = "url" name = "" id = "" /> |
input:password または inp[type=password]
1 | < input type = "password" name = "" id = "" /> |
input:p または input:password
1 | < input type = "password" name = "" id = "" /> |
input:datetime または inp[type=datetime]
1 | < input type = "datetime" name = "" id = "" /> |
input:date または inp[type=date]
1 | < input type = "date" name = "" id = "" /> |
input:datetime-local または inp[type=datetime-local]
1 | < input type = "datetime-local" name = "" id = "" /> |
input:month または inp[type=month]
1 | < input type = "month" name = "" id = "" /> |
input:week または inp[type=week]
1 | < input type = "week" name = "" id = "" /> |
input:time または inp[type=time]
1 | < input type = "time" name = "" id = "" /> |
input:number または inp[type=number]
1 | < input type = "number" name = "" id = "" /> |
input:color または inp[type=color]
1 | < input type = "color" name = "" id = "" /> |
input:checkbox または inp[type=checkbox]
1 | < input type = "checkbox" name = "" id = "" /> |
input:c または input:checkbox
1 | < input type = "checkbox" name = "" id = "" /> |
input:r、input:radio または inp[type=radio]
1 | < input type = "radio" name = "" id = "" /> |
input:range または inp[type=range]
1 | < input type = "range" name = "" id = "" /> |
input:f、input:file または inp[type=file]
1 | < input type = "file" name = "" id = "" /> |
input:s または input:submit
1 | < input type = "submit" value = "" /> |
input:i または input:image
1 | < input type = "image" src = "" alt = "" /> |
input:b または input:button
1 | < input type = "button" value = "" /> |
input:reset または input:button[type=reset]
1 | < input type = "reset" value = "" /> |
isindex
1 | < isindex /> |
kg または keygen
1 | < keygen /> |
label
1 | < label for = "" ></ label > |
leg または legend
1 | < legend ></ legend > |
opt または option
1 | < option value = "" ></ option > |
optg または optgroup
1 | < optgroup ></ optgroup > |
optgroup+, optg+ または optgroup>option
1 2 3 | < optgroup > < option value = "" ></ option > </ optgroup > |
out または output
1 | < output ></ output > |
prog または progress
1 | < progress ></ progress > |
select
1 | < select name = "" id = "" ></ select > |
select+ または select>option
1 2 3 | < select name = "" id = "" > < option value = "" ></ option > </ select > |
tarea または textarea
1 | < textarea name = "" id = "" cols = "30" rows = "10" ></ textarea > |
ユーザーによる操作
cmd または command
1 | < command /> |
det または details
1 | < details ></ details > |
menu:c、menu:context または menu[type=context]>
1 | < menu type = "context" ></ menu > |
menu:toolbar または menu[type=toolbar]>
1 | < menu type = "toolbar" ></ menu > |
menu:t または menu:toolbar
1 | < menu type = "toolbar" ></ menu > |
フレーム
frame
1 | < frame /> |
その他
dlg または dialog
1 | < dialog ></ dialog > |
datag または datagrid
1 | < datagrid ></ datagrid > |