根据HTML5.1推荐标准,HTML元素主要分为7大类:
- metadata content(原数据的内容)
- flow content(流数据的内容)
- sectioning content(分节的内容)
- sectioning content(标题的内容)
- phrasing content(短语的内容)
- embedded content(嵌入的内容)
- interactive content(交互式的内容)
- metadata content(原数据的内容)
原数据的内容是设置其余内容的表现或行为的内容、或者是建立文档与其他文档关系的内容、或者是传达文档之外信息的内容。
base
link
meta
noscript
script
style
template
title
- flow content (流数据的内容)
流数据的内容是应用于文档或者应用程序的主体的大多数元素。
a
abbr
address
area
(if it is a descendant of amap
element)article
aside
audio
b
bdi
bdo
blockquote
br
button
canvas
cite
code
data
datalist
del
details
dfn
div
dl
em
embed
fieldset
figure
footer
form
h1
h2
h3
h4
h5
h6
header
hr
i
iframe
img
input
ins
kbd
keygen
label
main
map
mark
math
menu
meter
nav
noscript
object
ol
output
p
picture
pre
progress
q
ruby
s
samp
script
section
select
small
span
strong
sub
sup
svg
table
template
textarea
time
u
ul
var
video
wbr
- text
- sectioning content(分节的内容)
分节的内容是定义标题和页脚范围的内容
article
aside
nav
section
- heading content(标题的内容)
标题的内容是定义文档某一节的标题h1
h2
h3
h4
h5
h6
- phrasing content(短语的内容)
短语的内容是文档的文本以及在段落层次上标记该文本的元素a
abbr
area
(if it is a descendant of amap
element)audio
b
bdi
bdo
br
button
canvas
cite
code
data
datalist
del
dfn
em
embed
i
iframe
img
input
ins
kbd
keygen
label
map
mark
math
meter
noscript
object
output
picture
progress
q
ruby
s
samp
script
select
small
span
strong
sub
sup
svg
template
textarea
time
u
var
video
wbr
- text
- embedded content(嵌入的内容)
嵌入的内容是将另一种资源导入文档的内容,或从另一个资源中插入到文档中的内容。
audio
canvas
embed
iframe
img
math
object
picture
svg
video
- interactive content(交互式内容)
交互式内容是专门用于用户交互的内容。
a
(if thehref
attribute is present)audio
(if thecontrols
attribute is present)button
details
embed
iframe
img
(if theusemap
attribute is present)input
(if thetype
attribute isnot in the hidden state)keygen
label
select
textarea
video
(if thecontrols
attribute is present)
7大类的关系图: