目录
- 1 概述
- 2 公共基础设施
- 3 HTML 文档的语义,结构,与API
- 4 HTML 元素
- 5 微数据
- 6 用户交互
- 7 加载 Web 页面
- 8 Web 应用 API
- 9 通信
- 10 Web 工作线程
- 11 Worklets
- 12 Web 存储
- 13 HTML 语法
- 14 XML 语法
- 15 渲染
- 16 废弃的特性
- 17 IANA 注意事项
- 索引
- References
- 致谢
- Intellectual property rights
详细目录
- 1 概述
- 1.1 本标准的适用范围
- 1.2 这是 HTML5 吗?
- 1.3 背景
- 1.4 受众
- 1.5 范围
- 1.6 历史
- 1.7 设计笔记
- 1.7.1 脚本执行的可串行性
- 1.7.2 与其他标准的兼容性
- 1.7.3 可扩展性
- 1.8 HTML 和 XML 语法
- 1.9 本标准的结构
- 1.9.1 如何阅读本标准
- 1.9.2 排版惯例
- 1.10 HTML 的简单介绍
- 1.10.1 使用 HTML 编写安全应用
- 1.10.2 使用脚本 API 时常见的陷阱
- 1.10.3 编写 HTML 时如何发现错误:验证器和一致性检查器
- 1.11 对页面作者的一致性要求
- 1.11.1 表示性的标记
- 1.11.2 语法错误
- 1.11.3 内容模型和属性值的限制
- 1.12 推荐阅读
- 2 公共基础设施
- 2.1 术语
- 2.1.1 Parallelism
- 2.1.2 资源
- 2.1.3 XML 兼容性
- 2.1.4 DOM 树
- 2.1.5 脚本
- 2.1.6 插件
- 2.1.7 字符编码
- 2.1.8 符合性类别
- 2.1.9 Dependencies
- 2.1.10 可扩展性
- 2.1.11 与 XPath 和 XSLT 交互
- 2.2 String comparison
- 2.3 Policy-controlled features
- 2.4 公共微语法
- 2.4.1 常见的解析器风格
- 2.4.2 布尔属性
- 2.4.3 关键字和枚举属性
- 2.4.4 数字
- 2.4.4.1 有符号整数
- 2.4.4.2 非负整数
- 2.4.4.3 浮点数
- 2.4.4.4 百分数和长度
- 2.4.4.5 非零百分数和长度
- 2.4.4.6 浮点数列表
- 2.4.4.7 维度值列表
- 2.4.5 日期和时间
- 2.4.5.1 月份
- 2.4.5.2 日期
- 2.4.5.3 无年的日期
- 2.4.5.4 时间
- 2.4.5.5 本地日期和时间
- 2.4.5.6 时区
- 2.4.5.7 全球日期和时间
- 2.4.5.8 星期
- 2.4.5.9 时间间隔
- 2.4.5.10 模糊的时间
- 2.4.6 颜色
- 2.4.7 空格分隔的令牌
- 2.4.8 逗号分隔的字符集
- 2.4.9 引用
- 2.4.10 媒体查询
- 2.5 URL
- 2.5.1 术语
- 2.5.2 解析 URL
- 2.5.3 基 URL 的动态变化
- 2.6 获取资源
- 2.6.1 术语
- 2.6.2 确定响应类型
- 2.6.3 从
meta
元素提取字符编码 - 2.6.4 CORS 设置属性
- 2.6.5 引荐来源策略属性
- 2.6.6 Nonce attributes
- 2.6.7 Lazy loading attributes
- 2.7 通用 DOM 接口
- 2.7.1 在 IDL 属性中反映内容属性
- 2.7.2 集合
- 2.7.2.1 The
HTMLAllCollection
interface- 2.7.2.1.1 [[Call]] ( thisArgument, argumentsList )
- 2.7.2.2
HTMLFormControlsCollection
接口 - 2.7.2.3
HTMLOptionsCollection
接口
- 2.7.3
DOMStringList
接口
- 2.8 安全地传递结构化数据
- 2.8.1 可序列化对象
- 2.8.2 可传输对象
- 2.8.3 StructuredSerializeInternal ( value, forStorage [ ,
memory ] )
- 2.8.4 StructuredSerialize ( value )
- 2.8.5 StructuredSerializeForStorage ( value )
- 2.8.6 StructuredDeserialize ( serialized, targetRealm [ ,
memory ] )
- 2.8.7 StructuredSerializeWithTransfer ( value, transferList
)
- 2.8.8 StructuredDeserializeWithTransfer ( serializeWithTransferResult,
targetRealm )
- 2.8.9 在其他规范中执行序列化和传输
- 3 HTML 文档的语义,结构,与API
- 3.1 文档
- 3.1.1
Document
对象 - 3.1.2 The
DocumentOrShadowRoot
interface - 3.1.3 资源元数据管理
- 3.1.4 DOM 树访问器
- 3.2 元素
- 3.2.1 语义
- 3.2.2 DOM 中的元素
- 3.2.3 HTML 元素构造器
- 3.2.4 元素定义
- 3.2.4.1 属性
- 3.2.5 内容模型
- 3.2.5.1 "nothing" 内容模型
- 3.2.5.2 内容的种类
- 3.2.5.2.1 元数据内容
- 3.2.5.2.2 流式内容
- 3.2.5.2.3 章节内容
- 3.2.5.2.4 标题内容
- 3.2.5.2.5 短语内容
- 3.2.5.2.6 嵌入内容
- 3.2.5.2.7 交互式内容
- 3.2.5.2.8 可感知内容
- 3.2.5.2.9 脚本支持元素
- 3.2.5.3 透明内容模型
- 3.2.5.4 段落
- 3.2.6 全局属性
- 3.2.6.1
title
属性 - 3.2.6.2
lang
和 xml:lang
属性 - 3.2.6.3
translate
属性 - 3.2.6.4
dir
属性 - 3.2.6.5
style
属性 - 3.2.6.6 使用
data-*
属性 嵌入自定义不可见数据
- 3.2.7 The
innerText
getter and
setter - 3.2.8 与双向算法相关的要求
- 3.2.8.1 双向算法格式化字符的编写一致性标准
- 3.2.8.2 用户代理一致性标准
- 3.2.9 ARIA 与 平台可访问性 API 相关的要求
- 4 HTML 元素
- 4.1 文档元素
- 4.1.1
html
元素
- 4.2 文档元数据
- 4.2.1
head
元素 - 4.2.2
title
元素 - 4.2.3
base
元素 - 4.2.4
link
元素- 4.2.4.1 处理
media
属性 - 4.2.4.2 处理
type
属性 - 4.2.4.3 从
link
元素获取和处理资源 - 4.2.4.4 处理 `
Link
` 协议头 - 4.2.4.5 为用户提供一种跟随使用
link
元素创建的超链接的方式
- 4.2.5
meta
元素- 4.2.5.1 标准元数据名
- 4.2.5.2 其他元数据名称
- 4.2.5.3 Pragma directives
- 4.2.5.4 Specifying the document's character encoding
- 4.2.6 The
style
element - 4.2.7 Interactions of styling and scripting
- 4.3 Section
- 4.3.1 The
body
element - 4.3.2 The
article
element - 4.3.3 The
section
element - 4.3.4 The
nav
element - 4.3.5 The
aside
element - 4.3.6 The
h1
, h2
, h3
, h4
, h5
, and
h6
elements - 4.3.7 The
hgroup
element - 4.3.8 The
header
element - 4.3.9 The
footer
element - 4.3.10 The
address
element - 4.3.11 标题和章节
- 4.3.11.1 Creating an outline
- 4.3.11.2 Sample outlines
- 4.3.11.3 暴露目录给用户
- 4.3.12 Usage summary
- 4.3.12.1 使用 article 还是 section?
- 4.4 Grouping content
- 4.4.1 The
p
element - 4.4.2 The
hr
element - 4.4.3 The
pre
element - 4.4.4 The
blockquote
element - 4.4.5 The
ol
element - 4.4.6 The
ul
element - 4.4.7 The
menu
element - 4.4.8 The
li
element - 4.4.9 The
dl
element - 4.4.10 The
dt
element - 4.4.11 The
dd
element - 4.4.12 The
figure
element - 4.4.13 The
figcaption
element - 4.4.14 The
main
element - 4.4.15 The
div
element
- 4.5 Text-level semantics
- 4.5.1 The
a
element - 4.5.2 The
em
element - 4.5.3 The
strong
element - 4.5.4 The
small
element - 4.5.5 The
s
element - 4.5.6 The
cite
element - 4.5.7 The
q
element - 4.5.8 The
dfn
element - 4.5.9 The
abbr
element - 4.5.10 The
ruby
element - 4.5.11 The
rt
element - 4.5.12 The
rp
element - 4.5.13 The
data
element - 4.5.14 The
time
element - 4.5.15 The
code
element - 4.5.16 The
var
element - 4.5.17 The
samp
element - 4.5.18 The
kbd
element - 4.5.19 The
sub
and sup
elements - 4.5.20 The
i
element - 4.5.21 The
b
element - 4.5.22 The
u
element - 4.5.23 The
mark
element - 4.5.24 The
bdi
element - 4.5.25 The
bdo
element - 4.5.26 The
span
element - 4.5.27 The
br
element - 4.5.28 The
wbr
element - 4.5.29 Usage summary
- 4.6 Links
- 4.6.1 概述
- 4.6.2 Links created by
a
and area
elements - 4.6.3 API for
a
and area
elements - 4.6.4 Following hyperlinks
- 4.6.5 Downloading resources
- 4.6.5.1 Hyperlink auditing
- 4.6.6 Link types
- 4.6.6.1 Link type "
alternate
" - 4.6.6.2 "
author
" 链接类型 - 4.6.6.3 "
bookmark
" 链接类型 - 4.6.6.4 Link type "
canonical
" - 4.6.6.5 "
dns-prefetch
" 链接类型 - 4.6.6.6 "
external
" 链接类型 - 4.6.6.7 "
help
" 链接类型 - 4.6.6.8 Link type "
icon
" - 4.6.6.9 "
license
" 链接类型 - 4.6.6.10 Link type "
manifest
" - 4.6.6.11 Link type "
modulepreload
" - 4.6.6.12 "
nofollow
" 链接类型 - 4.6.6.13 Link type "
noopener
" - 4.6.6.14 Link type "
noreferrer
" - 4.6.6.15 Link type "
opener
" - 4.6.6.16 "
pingback
" 链接类型 - 4.6.6.17 "
preconnect
链接类型" - 4.6.6.18 "
prefetch
" 链接类型 - 4.6.6.19 Link type "
preload
" - 4.6.6.20 "
prerender
" 链接类型 - 4.6.6.21 Link type "
search
" - 4.6.6.22 Link type "
stylesheet
" - 4.6.6.23 "
tag
" 链接类型 - 4.6.6.24 顺序链接类型
- 4.6.6.24.1 "
next
" 链接类型 - 4.6.6.24.2 "
prev
" 链接类型
- 4.6.6.25 其他链接类型
- 4.7 Edits
- 4.7.1 The
ins
element - 4.7.2 The
del
element - 4.7.3 Attributes common to
ins
and del
elements - 4.7.4 编辑与段落
- 4.7.5 编辑与列表
- 4.7.6 编辑与表格
- 4.8 嵌入内容
- 4.8.1 The
picture
element - 4.8.2 The
source
element - 4.8.3 The
img
element - 4.8.4 图片
- 4.8.4.1 概述
- 4.8.4.1.1 自适应图片
- 4.8.4.2 Attributes common to
source
,
img
, and link
elements- 4.8.4.2.1 Srcset attributes
- 4.8.4.2.2 Sizes attributes
- 4.8.4.3 Processing model
- 4.8.4.3.1 When to obtain images
- 4.8.4.3.2 响应 DOM 变化
- 4.8.4.3.3 The list of available images
- 4.8.4.3.4 Decoding images
- 4.8.4.3.5 Updating the image data
- 4.8.4.3.6 Selecting an image source
- 4.8.4.3.7 Updating the source set
- 4.8.4.3.8 Parsing a srcset attribute
- 4.8.4.3.9 Parsing a sizes attribute
- 4.8.4.3.10 源像素密度规范化
- 4.8.4.3.11 Reacting to environment changes
- 4.8.4.4 为图片提供替代文字的要求
- 4.8.4.4.1 通用指引
- 4.8.4.4.2 只包含图片的链接或按钮
- 4.8.4.4.3 A phrase or paragraph with an alternative graphical representation: charts, diagrams, graphs, maps, illustrations
- 4.8.4.4.4 带有替代图形表示的短语或标签:图标,徽标
- 4.8.4.4.5 Text that has been rendered to a graphic for typographical effect
- 4.8.4.4.6 A graphical representation of some of the surrounding text
- 4.8.4.4.7 辅助性图片
- 4.8.4.4.8 不提供任何信息的纯装饰性图片
- 4.8.4.4.9 组成但个没有链接的大图的图片组
- 4.8.4.4.10 组成单个有链接的大图的图片组
- 4.8.4.4.11 内容的关键部分
- 4.8.4.4.12 不是给用户看的图片
- 4.8.4.4.13 An image in an email or private document intended for a specific person who is known to be able to view images
- 4.8.4.4.14 Guidance for markup generators
- 4.8.4.4.15 规范检查工具指引
- 4.8.5 The
iframe
element - 4.8.6 The
embed
element - 4.8.7 The
object
element - 4.8.8 The
param
element - 4.8.9
video
元素 - 4.8.10 The
audio
element - 4.8.11 The
track
element - 4.8.12 Media elements
- 4.8.12.1 Error codes
- 4.8.12.2 Location of the media resource
- 4.8.12.3 MIME types
- 4.8.12.4 网络状态
- 4.8.12.5 Loading the media resource
- 4.8.12.6 Offsets into the media resource
- 4.8.12.7 Ready states
- 4.8.12.8 Playing the media resource
- 4.8.12.9 Seeking
- 4.8.12.10 多媒体轨道的媒体资源
- 4.8.12.10.1
AudioTrackList
and VideoTrackList
objects - 4.8.12.10.2 声明式地选择特定的音频和视频轨道
- 4.8.12.11 计时字幕
- 4.8.12.11.1 Text track model
- 4.8.12.11.2 Sourcing in-band text tracks
- 4.8.12.11.3 Sourcing out-of-band text tracks
- 4.8.12.11.4
显示各种格式的 字幕提示
的 指南
- 4.8.12.11.5 Text track API
- 4.8.12.11.6 Event handlers for objects of the text track APIs
- 4.8.12.11.7 元数据字幕的最佳实践
- 4.8.12.12 通过 URL 识别轨道类型
- 4.8.12.13 User interface
- 4.8.12.14 Time ranges
- 4.8.12.15 The
TrackEvent
interface - 4.8.12.16 Events summary
- 4.8.12.17 Security and privacy considerations
- 4.8.12.18 作者使用媒体元素的最佳实践
- 4.8.12.19 Best practices for implementers of media elements
- 4.8.13 The
map
element - 4.8.14 The
area
element - 4.8.15 图片映射
- 4.8.15.1 编写
- 4.8.15.2 Processing model
- 4.8.16 MathML
- 4.8.17 SVG
- 4.8.18 Dimension attributes
- 4.9 表格数据
- 4.9.1 The
table
element- 4.9.1.1 描述表格的技术
- 4.9.1.2 表格设计技术
- 4.9.2 The
caption
element - 4.9.3 The
colgroup
element - 4.9.4 The
col
element - 4.9.5 The
tbody
element - 4.9.6 The
thead
element - 4.9.7 The
tfoot
element - 4.9.8 The
tr
element - 4.9.9 The
td
element - 4.9.10 The
th
element - 4.9.11 Attributes common to
td
and th
elements - 4.9.12 Processing model
- 4.9.12.1 Forming a table
- 4.9.12.2 Forming relationships between data cells and header cells
- 4.9.13 示例
- 4.10 表单
- 4.10.1 概述
- 4.10.1.1 编写表单的用户界面
- 4.10.1.2 实现服务器端表单处理
- 4.10.1.3 配置表单与服务器通信
- 4.10.1.4 客户端表单验证
- 4.10.1.5 启用表单控件的客户端自动填充
- 4.10.1.6 Improving the user experience on mobile devices
- 4.10.1.7 The difference between the field type, the autofill field name, and the input modality
- 4.10.1.8 日期、时间和数字格式
- 4.10.2 Categories
- 4.10.3 The
form
element - 4.10.4 The
label
element - 4.10.5 The
input
element- 4.10.5.1
type
属性的状态- 4.10.5.1.1 Hidden state (
type=hidden
) - 4.10.5.1.2 Text (
type=text
) state and Search state (type=search
) - 4.10.5.1.3 Telephone state (
type=tel
) - 4.10.5.1.4 URL state (
type=url
) - 4.10.5.1.5 Email state (
type=email
) - 4.10.5.1.6 Password state (
type=password
) - 4.10.5.1.7 Date state (
type=date
) - 4.10.5.1.8 Month state (
type=month
) - 4.10.5.1.9 Week state (
type=week
) - 4.10.5.1.10 Time state (
type=time
) - 4.10.5.1.11 Local Date and Time state (
type=datetime-local
) - 4.10.5.1.12 Number state (
type=number
) - 4.10.5.1.13 Range state (
type=range
) - 4.10.5.1.14 Color state (
type=color
) - 4.10.5.1.15 Checkbox state (
type=checkbox
) - 4.10.5.1.16 Radio Button state (
type=radio
) - 4.10.5.1.17 File Upload state (
type=file
) - 4.10.5.1.18 Submit Button state (
type=submit
) - 4.10.5.1.19 Image Button state (
type=image
) - 4.10.5.1.20 Reset Button state (
type=reset
) - 4.10.5.1.21 Button state (
type=button
)
- 4.10.5.2 关于表单控件的本地化的实现笔记
- 4.10.5.3 通用
input
元素属性- 4.10.5.3.1 The
maxlength
and minlength
attributes - 4.10.5.3.2
size
属性 - 4.10.5.3.3
readonly
属性 - 4.10.5.3.4
required
属性 - 4.10.5.3.5
multiple
属性 - 4.10.5.3.6
pattern
属性 - 4.10.5.3.7
min
和 max
属性 - 4.10.5.3.8 The
step
attribute - 4.10.5.3.9
list
属性 - 4.10.5.3.10 The
placeholder
attribute
- 4.10.5.4 Common
input
element APIs - 4.10.5.5 通用事件行为
- 4.10.6 The
button
element - 4.10.7 The
select
element - 4.10.8 The
datalist
element - 4.10.9 The
optgroup
element - 4.10.10 The
option
element - 4.10.11 The
textarea
element - 4.10.12 The
output
element - 4.10.13 The
progress
element - 4.10.14 The
meter
element - 4.10.15 The
fieldset
element - 4.10.16 The
legend
element - 4.10.17 Form control infrastructure
- 4.10.17.1 A form control's value
- 4.10.17.2 可变性
- 4.10.17.3 Association of controls and forms
- 4.10.18 表单控件通用的属性
- 4.10.18.1 Naming form controls: the
name
attribute - 4.10.18.2 提交元素 element directionality: the
dirname
attribute - 4.10.18.3 Limiting user input length: the
maxlength
attribute - 4.10.18.4 Setting minimum input length requirements: the
minlength
attribute - 4.10.18.5 Enabling and disabling form controls: the
disabled
attribute - 4.10.18.6 Form submission attributes
- 4.10.18.7 自动填充
- 4.10.18.7.1 Autofilling form controls: the
autocomplete
attribute - 4.10.18.7.2 Processing model
- 4.10.19 APIs for the text control selections
- 4.10.20 约束
- 4.10.20.1 定义
- 4.10.20.2 Constraint validation
- 4.10.20.3 The constraint validation API
- 4.10.20.4 安全性
- 4.10.21 表单提交
- 4.10.21.1 概述
- 4.10.21.2 隐式提交
- 4.10.21.3 Form submission algorithm
- 4.10.21.4 Constructing the entry list
- 4.10.21.5 Selecting a form submission encoding
- 4.10.21.6 URL 编码的表单数据
- 4.10.21.7 Multipart form data
- 4.10.21.8 Plain text form data
- 4.10.21.9 The
SubmitEvent
interface - 4.10.21.10 The
FormDataEvent
interface
- 4.10.22 表单重置
- 4.11 Interactive elements
- 4.11.1 The
details
element - 4.11.2 The
summary
element - 4.11.3 命令
- 4.11.3.1 Facets
- 4.11.3.2 使用
a
元素来定义命令 - 4.11.3.3 使用
button
元素来定义命令 - 4.11.3.4
使用
input
元素来定义命令 - 4.11.3.5 Using the
option
element to define a command - 4.11.3.6
在
legend
元素上
使用 accesskey
属性
来定义一个命令 - 4.11.3.7 使用
accesskey
属性给其他元素定义命令
- 4.11.4 The
dialog
element
- 4.12 脚本
- 4.12.1 The
script
element- 4.12.1.1 Processing model
- 4.12.1.2 Scripting languages
- 4.12.1.3
script
元素内容的限制 - 4.12.1.4 Inline documentation for external scripts
- 4.12.1.5 Interaction of
script
elements and XSLT
- 4.12.2 The
noscript
element - 4.12.3 The
template
element- 4.12.3.1 Interaction of
template
elements with XSLT and XPath
- 4.12.4 The
slot
element - 4.12.5 The
canvas
element- 4.12.5.1 The 2D rendering context
- 4.12.5.1.1 实现说明
- 4.12.5.1.2 Canvas 状态
- 4.12.5.1.3 Line styles
- 4.12.5.1.4 Text styles
- 4.12.5.1.5 Building paths
- 4.12.5.1.6
Path2D
objects - 4.12.5.1.7 Transformations
- 4.12.5.1.8 Image sources for 2D rendering contexts
- 4.12.5.1.9 Fill and stroke styles
- 4.12.5.1.10 Drawing rectangles to the bitmap
- 4.12.5.1.11 Drawing text to the bitmap
- 4.12.5.1.12 Drawing paths to the canvas
- 4.12.5.1.13 Drawing focus rings and scrolling paths into view
- 4.12.5.1.14 Drawing images
- 4.12.5.1.15 Pixel manipulation
- 4.12.5.1.16 合成
- 4.12.5.1.17 Image smoothing
- 4.12.5.1.18 Shadows
- 4.12.5.1.19 滤镜
- 4.12.5.1.20 使用外部定义的 SVG 滤镜
- 4.12.5.1.21 Drawing model
- 4.12.5.1.22 最佳实践
- 4.12.5.1.23 示例
- 4.12.5.2
ImageBitmap
渲染上下文- 4.12.5.2.1 Introduction
- 4.12.5.2.2 The
ImageBitmapRenderingContext
interface
- 4.12.5.3 The
OffscreenCanvas
interface- 4.12.5.3.1 The offscreen 2D rendering context
- 4.12.5.4 Color spaces and color correction
- 4.12.5.5 Serializing bitmaps to a file
- 4.12.5.6
canvas
元素的安全问题
- 4.13 Custom elements
- 4.13.1 概述
- 4.13.1.1 创建自主的 Custom Element
- 4.13.1.2 Creating a form-associated custom element
- 4.13.1.3 Creating a custom element with default accessible roles, states, and properties
- 4.13.1.4 创建定制的内建元素
- 4.13.1.5 自主 custom element 的缺点
- 4.13.1.6 在创建之后升级元素
- 4.13.2 Requirements for custom element constructors and
reactions
- 4.13.3 核心概念
- 4.13.4
CustomElementRegistry
接口 - 4.13.5 升级
- 4.13.6 Custom element reactions
- 4.13.7 Element internals
- 4.13.7.1 The
ElementInternals
interface - 4.13.7.2 Shadow root access
- 4.13.7.3 Form-associated custom elements
- 4.13.7.4 Accessibility semantics
- 4.14 Common idioms without dedicated elements
- 4.14.1 面包屑导航
- 4.14.2 标签云
- 4.14.3 对话
- 4.14.4 脚注
- 4.15 Disabled elements
- 4.16 使用选择符和 CSS 匹配 HTML 元素
- 4.16.1 CSS 'attr()' 函数的大小写敏感性
- 4.16.2 Case-sensitivity of selectors
- 4.16.3 Pseudo-classes
- 5 微数据
- 5.1 概述
- 5.1.1 Overview
- 5.1.2 The basic syntax
- 5.1.3 Typed items
- 5.1.4 Global identifiers for items
- 5.1.5 Selecting names when defining vocabularies
- 5.2 Encoding microdata
- 5.2.1 The microdata model
- 5.2.2 Items
- 5.2.3 Names: the
itemprop
attribute - 5.2.4 Values
- 5.2.5 Associating names with items
- 5.2.6 Microdata and other namespaces
- 5.3 Sample microdata vocabularies
- 5.3.1 vCard
- 5.3.1.1 Conversion to vCard
- 5.3.1.2 Examples
- 5.3.2 vEvent
- 5.3.2.1 Conversion to iCalendar
- 5.3.2.2 Examples
- 5.3.3 Licensing works
- 5.3.3.1 Examples
- 5.4 Converting HTML to other formats
- 5.4.1 JSON
- 6 用户交互
- 6.1
hidden
属性 - 6.2 Inert subtrees
- 6.3 Tracking user activation
- 6.3.1 Data model
- 6.3.2 Processing model
- 6.3.3 APIs gated by user activation
- 6.4 Activation behavior of elements
- 6.5 焦点
- 6.5.1 概述
- 6.5.2 数据模型
- 6.5.3 The
tabindex
attribute - 6.5.4 Processing model
- 6.5.5 Sequential focus navigation
- 6.5.6 Focus management APIs
- 6.5.7 The
autofocus
attribute
- 6.6 指定快捷键
- 6.6.1 概述
- 6.6.2 The
accesskey
attribute - 6.6.3 Processing
model
- 6.7 编辑
- 6.7.1 Making document regions editable: The
contenteditable
content attribute - 6.7.2 Making entire documents
editable: the
designMode
getter and setter - 6.7.3 Best practices for in-page editors
- 6.7.4 Editing APIs
- 6.7.5 Spelling and grammar checking
- 6.7.6 Autocapitalization
- 6.7.7 Input modalities: the
inputmode
attribute - 6.7.8 Input modalities: the
enterkeyhint
attribute
- 6.8 Find-in-page
- 6.8.1 Introduction
- 6.8.2 Interaction with selection
- 6.9 Drag and drop
- 6.9.1 Introduction
- 6.9.2 The drag data store
- 6.9.3 The
DataTransfer
interface- 6.9.3.1 The
DataTransferItemList
interface - 6.9.3.2 The
DataTransferItem
interface
- 6.9.4 The
DragEvent
interface - 6.9.5 Processing model
- 6.9.6 Events summary
- 6.9.7 The
draggable
attribute - 6.9.8 拖放模型中的安全风险
- 7 加载 Web 页面
- 7.1 Browsing contexts
- 7.1.1 Creating browsing contexts
- 7.1.2 Related browsing contexts
- 7.1.2.1 Navigating related browsing contexts in
the DOM
- 7.1.3 Security
- 7.1.4 浏览上下文分组
- 7.1.5 Browsing context names
- 7.2
Window
,
WindowProxy
, 和 Location
对象的安全基础设施 - 7.2.1 Integration with IDL
- 7.2.2 Shared internal slot: [[CrossOriginPropertyDescriptorMap]]
- 7.2.3 Shared abstract operations
- 7.2.3.1 CrossOriginProperties ( O )
- 7.2.3.2 CrossOriginPropertyFallback ( P )
- 7.2.3.3 IsPlatformObjectSameOrigin ( O )
- 7.2.3.4 CrossOriginGetOwnPropertyHelper ( O, P )
- 7.2.3.5 CrossOriginGet ( O, P, Receiver )
- 7.2.3.6 CrossOriginSet ( O, P, V,
Receiver )
- 7.2.3.7 CrossOriginOwnPropertyKeys ( O )
- 7.3 The
Window
object- 7.3.1 APIs for creating and navigating browsing contexts by name
- 7.3.2 Accessing other browsing contexts
- 7.3.3 Named access on the
Window
object - 7.3.4 Discarding browsing contexts
- 7.3.5 Closing browsing contexts
- 7.3.6 Browser interface elements
- 7.3.7 Script settings for
Window
objects
- 7.4 The
WindowProxy
exotic object- 7.4.1 [[GetPrototypeOf]] ( )
- 7.4.2 [[SetPrototypeOf]] ( V )
- 7.4.3 [[IsExtensible]] ( )
- 7.4.4 [[PreventExtensions]] ( )
- 7.4.5 [[GetOwnProperty]] ( P )
- 7.4.6 [[DefineOwnProperty]] ( P, Desc
)
- 7.4.7 [[Get]] ( P, Receiver )
- 7.4.8 [[Set]] ( P, V, Receiver )
- 7.4.9 [[Delete]] ( P )
- 7.4.10 [[OwnPropertyKeys]] ( )
- 7.5 Origin
- 7.5.1 Sites
- 7.5.2 Relaxing the same-origin restriction
- 7.5.3 Origin isolation
- 7.6 Sandboxing
- 7.7 Cross-origin opener policies
- 7.7.1 The `
Cross-Origin-Opener-Policy
`
header - 7.7.2 Browsing context group switches due to cross-origin opener policy
- 7.8 Cross-origin embedder policies
- 7.8.1 The headers
- 7.8.2 Embedder policy checks
- 7.9 Session history and navigation
- 7.9.1 Browsing sessions
- 7.9.2 The session history of browsing contexts
- 7.9.3 The
History
interface - 7.9.4 Implementation notes for session history
- 7.9.5 The
Location
interface- 7.9.5.1 [[GetPrototypeOf]] ( )
- 7.9.5.2 [[SetPrototypeOf]] ( V )
- 7.9.5.3 [[IsExtensible]] ( )
- 7.9.5.4 [[PreventExtensions]] ( )
- 7.9.5.5 [[GetOwnProperty]] ( P )
- 7.9.5.6 [[DefineOwnProperty]] ( P, Desc )
- 7.9.5.7 [[Get]] ( P, Receiver )
- 7.9.5.8 [[Set]] ( P, V, Receiver )
- 7.9.5.9 [[Delete]] ( P )
- 7.9.5.10 [[OwnPropertyKeys]] ( )
- 7.10 Browsing the web
- 7.10.1 Navigating across documents
- 7.10.2 HTML 文件的页面加载处理模型
- 7.10.3 XML 文件的页面加载处理模型
- 7.10.4 文本文件的页面加载处理模型
- 7.10.5
multipart/x-mixed-replace
资源的媒体的页面加载处理模型 - 7.10.6 媒体的页面加载处理模型
- 7.10.7 使用插件的内容的页面加载处理模型
- 7.10.8 没有 DOM 的内联内容的页面加载处理模型
- 7.10.9 Navigating to a fragment
- 7.10.10 History traversal
- 7.10.10.1 Persisted history entry state
- 7.10.10.2 The
PopStateEvent
interface - 7.10.10.3 The
HashChangeEvent
interface - 7.10.10.4 The
PageTransitionEvent
interface
- 7.10.11 Loading documents
- 7.10.12 Unloading documents
- 7.10.12.1 The
BeforeUnloadEvent
interface
- 7.10.13 Aborting a document load
- 7.10.14 The `
X-Frame-Options
` header
- 7.11 Offline web applications
- 7.11.1 概述
- 7.11.1.1 支持遗留应用的离线缓存
- 7.11.1.2 Events summary
- 7.11.2 Application caches
- 7.11.3 缓存清单语法
- 7.11.3.1 一些示例清单
- 7.11.3.2 Writing cache manifests
- 7.11.3.3 Parsing cache manifests
- 7.11.4 Downloading or updating an application cache
- 7.11.5 应用缓存选择算法
- 7.11.6 Changes to the networking model
- 7.11.7 应用缓存过期
- 7.11.8 磁盘空间
- 7.11.9 离线应用缓存的安全问题
- 7.11.10 Application cache API
- 7.11.11 Browser state
- 8 Web 应用 API
- 8.1 脚本
- 8.1.1 概述
- 8.1.2 Agents and agent clusters
- 8.1.2.1 Integration with the JavaScript agent formalism
- 8.1.2.2 Integration with the JavaScript agent cluster formalism
- 8.1.3 Realms and their counterparts
- 8.1.3.1 Environments
- 8.1.3.2 Environment settings objects
- 8.1.3.3 Realms, settings objects, and global objects
- 8.1.3.3.1 Entry
- 8.1.3.3.2 Incumbent
- 8.1.3.3.3 Current
- 8.1.3.3.4 Relevant
- 8.1.3.4 Enabling and disabling scripting
- 8.1.3.5 Secure contexts
- 8.1.4 Script processing
model
- 8.1.4.1 Scripts
- 8.1.4.2 Fetching scripts
- 8.1.4.3 Creating scripts
- 8.1.4.4 Calling scripts
- 8.1.4.5 Killing scripts
- 8.1.4.6 Runtime script errors
- 8.1.4.7 Unhandled promise rejections
- 8.1.5 JavaScript specification host hooks
- 8.1.5.1 HostEnqueuePromiseJob(job,
realm)
- 8.1.5.2 HostEnsureCanCompileStrings(callerRealm, calleeRealm)
- 8.1.5.3 HostPromiseRejectionTracker(promise, operation)
- 8.1.5.4 Module-related host hooks
- 8.1.5.4.1 HostGetImportMetaProperties(moduleRecord)
- 8.1.5.4.2 HostImportModuleDynamically(referencingScriptOrModule,
specifier, promiseCapability)
- 8.1.5.4.3 HostResolveImportedModule(referencingScriptOrModule,
specifier)
- 8.1.6 事件循环
- 8.1.6.1 定义
- 8.1.6.2 Queuing tasks
- 8.1.6.3 处理模型
- 8.1.6.4 Generic task sources
- 8.1.6.5 Dealing with the event loop from other specifications
- 8.1.7 事件
- 8.1.7.1 Event handlers
- 8.1.7.2 Event handlers on elements,
Document
objects, and Window
objects- 8.1.7.2.1 IDL definitions
- 8.1.7.3 Event firing
- 8.2 The
WindowOrWorkerGlobalScope
mixin - 8.3 Base64 utility methods
- 8.4 Dynamic markup insertion
- 8.4.1 Opening the input stream
- 8.4.2 Closing the input stream
- 8.4.3
document.write()
- 8.4.4
document.writeln()
- 8.5 DOM parsing
- 8.6 Timers
- 8.7 Microtask queuing
- 8.8 用户提示
- 8.8.1 Simple dialogs
- 8.8.2 Printing
- 8.9 System state and capabilities
- 8.9.1 The
Navigator
object- 8.9.1.1 Client identification
- 8.9.1.2 Language preferences
- 8.9.1.3 Custom scheme handlers: the
registerProtocolHandler()
method- 8.9.1.3.1 Security and privacy
- 8.9.1.4 Cookies
- 8.9.1.5 Plugins
- 8.10 Images
- 8.11 Animation frames
- 9 通信
- 9.1
MessageEvent
接口 - 9.2 服务器发送的事件
- 9.2.1 概述
- 9.2.2 The
EventSource
interface - 9.2.3 Processing model
- 9.2.4 Parsing an event stream
- 9.2.5 Interpreting an event stream
- 9.2.6 Authoring notes
- 9.2.7 无连接推送和其他特性
- 9.2.8 垃圾回收
- 9.2.9 Implementation advice
- 9.3 Web sockets
- 9.3.1 概述
- 9.3.2 The
WebSocket
interface - 9.3.3 Feedback from the protocol
- 9.3.4 Ping and Pong frames
- 9.3.5 The
CloseEvent
interface - 9.3.6 Garbage collection
- 9.4 跨文档通信
- 9.4.1 概述
- 9.4.2 安全
- 9.4.2.1 作者
- 9.4.2.2 用户代理
- 9.4.3 发布消息
- 9.5 通道
- 9.5.1 概述
- 9.5.1.1 示例
- 9.5.1.2 端口作为 Web 上对象能力模型的基础
- 9.5.1.3 端口作为抽象服务实现的基础
- 9.5.2 消息通道
- 9.5.3 消息端口
- 9.5.4 广播给多个端口
- 9.5.5 端口与垃圾回收
- 9.6 向其他浏览上下文广播
- 10 Web 工作线程
- 10.1 概述
- 10.1.1 涵盖范围
- 10.1.2 示例
- 10.1.2.1 数字密集型计算的后台 worker
- 10.1.2.2 使用 JavaScript 模块作为 worker
- 10.1.2.3 共享 worker 概述
- 10.1.2.4 通过共享 Worker 来共享状态
- 10.1.2.5 委托
- 10.1.2.6 Providing libraries
- 10.1.3 教程
- 10.1.3.1 创建专用工作线程
- 10.1.3.2 与专用 Worker 通信
- 10.1.3.3 共享工作线程
- 10.2 基础设施
- 10.2.1 全局作用域
- 10.2.1.1
WorkerGlobalScope
通用接口 - 10.2.1.2 专用 Worker 与
DedicatedWorkerGlobalScope
接口 - 10.2.1.3 共享 worker 与
SharedWorkerGlobalScope
接口
- 10.2.2 事件循环
- 10.2.3 The worker's lifetime
- 10.2.4 Processing model
- 10.2.5 Runtime script errors
- 10.2.6 创建 Worker
- 10.2.6.1 The
AbstractWorker
mixin - 10.2.6.2 Script settings for workers
- 10.2.6.3 Dedicated workers and the
Worker
interface - 10.2.6.4 Shared workers and the
SharedWorker
interface
- 10.2.7 Concurrent hardware capabilities
- 10.3 Worker 中可用的 API
- 10.3.1 Importing scripts and libraries
- 10.3.2 The
WorkerNavigator
interface - 10.3.3 The
WorkerLocation
interface
- 11 Worklets
- 11.1 Introduction
- 11.1.1 Motivations
- 11.1.2 Code idempotence
- 11.1.3 Speculative evaluation
- 11.2 Examples
- 11.2.1 Loading scripts
- 11.2.2 Registering a class and invoking its methods
- 11.3 Infrastructure
- 11.3.1 The global scope
- 11.3.1.1 Agents and event loops
- 11.3.1.2 Creation and termination
- 11.3.1.3 Script settings for worklets
- 11.3.2 The
Worklet
class - 11.3.3 The worklet's lifetime
- 12 Web 存储
- 12.1 Introduction
- 12.2 API
- 12.2.1 The
Storage
interface - 12.2.2 The
sessionStorage
getter - 12.2.3 The
localStorage
getter - 12.2.4 The
StorageEvent
interface
- 12.3 隐私
- 12.3.1 User tracking
- 12.3.2 Sensitivity of data
- 12.4 安全
- 12.4.1 DNS 欺骗攻击
- 12.4.2 Cross-directory attacks
- 12.4.3 Implementation risks
- 13 HTML 语法
- 13.1 Writing HTML documents
- 13.1.1 The DOCTYPE
- 13.1.2 Elements
- 13.1.2.1 Start tags
- 13.1.2.2 End tags
- 13.1.2.3 Attributes
- 13.1.2.4 Optional tags
- 13.1.2.5 内容模型限制
- 13.1.2.6 对原始文本和可转义的原始文本元素的内容的限制
- 13.1.3 文本
- 13.1.3.1 换行
- 13.1.4 Character references
- 13.1.5 CDATA 部分
- 13.1.6 注释
- 13.2 Parsing HTML documents
- 13.2.1 Overview of the parsing model
- 13.2.2 Parse errors
- 13.2.3 输入字节流
- 13.2.3.1 使用已知字符编码进行解析
- 13.2.3.2 Determining the character encoding
- 13.2.3.3 字符编码
- 13.2.3.4 Changing the encoding while parsing
- 13.2.3.5 Preprocessing the input stream
- 13.2.4 解析状态
- 13.2.4.1 The insertion mode
- 13.2.4.2 The stack of open elements
- 13.2.4.3 活动格式化元素列表
- 13.2.4.4 元素指针
- 13.2.4.5 其他解析状态标志
- 13.2.5 Tokenization
- 13.2.5.1 Data state
- 13.2.5.2 RCDATA state
- 13.2.5.3 RAWTEXT state
- 13.2.5.4 Script data state
- 13.2.5.5 PLAINTEXT state
- 13.2.5.6 Tag open state
- 13.2.5.7 End tag open state
- 13.2.5.8 Tag name state
- 13.2.5.9 RCDATA 小于号状态
- 13.2.5.10 RCDATA 结束标签打开状态
- 13.2.5.11 RCDATA end tag name state
- 13.2.5.12 RAWTEXT 小于号状态
- 13.2.5.13 RAWTEXT end tag open state
- 13.2.5.14 RAWTEXT end tag name state
- 13.2.5.15
- 13.2.5.16 Script data end tag open state
- 13.2.5.17 Script data end tag name state
- 13.2.5.18 脚本数据转义开始状态
- 13.2.5.19 脚本数据转义开始
- 13.2.5.20 脚本数据转义状态
- 13.2.5.21 脚本数据转义横线状态
- 13.2.5.22 Script data escaped dash dash state
- 13.2.5.23 脚本数据转义小于号状态
- 13.2.5.24 Script data escaped end tag open state
- 13.2.5.25 Script data escaped end tag name state
- 13.2.5.26 脚本数据双重转义开始状态
- 13.2.5.27 Script data double escaped state
- 13.2.5.28 脚本数据双重转义横线状态
- 13.2.5.29 Script data double escaped dash dash state
- 13.2.5.30 脚本数据双重转义小于号状态
- 13.2.5.31 脚本数据双重转义结束状态
- 13.2.5.32 Before attribute name state
- 13.2.5.33 Attribute name state
- 13.2.5.34 After attribute name state
- 13.2.5.35 Before attribute value state
- 13.2.5.36 Attribute value (double-quoted) state
- 13.2.5.37 Attribute value (single-quoted) state
- 13.2.5.38 Attribute value (unquoted) state
- 13.2.5.39 After attribute value (quoted) state
- 13.2.5.40 Self-closing start tag state
- 13.2.5.41 Bogus comment state
- 13.2.5.42 Markup declaration open state
- 13.2.5.43 Comment start state
- 13.2.5.44 Comment start dash state
- 13.2.5.45 Comment state
- 13.2.5.46 注释小于号状态
- 13.2.5.47 注释小于号感叹号状态
- 13.2.5.48 注释小于号感叹号横线状态
- 13.2.5.49 Comment less-than sign bang dash dash state
- 13.2.5.50 Comment end dash state
- 13.2.5.51 Comment end state
- 13.2.5.52 Comment end bang state
- 13.2.5.53 DOCTYPE state
- 13.2.5.54 Before DOCTYPE name state
- 13.2.5.55 DOCTYPE name state
- 13.2.5.56 After DOCTYPE name state
- 13.2.5.57 After DOCTYPE public keyword state
- 13.2.5.58 Before DOCTYPE public identifier state
- 13.2.5.59 DOCTYPE public identifier (double-quoted) state
- 13.2.5.60 DOCTYPE public identifier (single-quoted) state
- 13.2.5.61 After DOCTYPE public identifier state
- 13.2.5.62 Between DOCTYPE public and system identifiers state
- 13.2.5.63 After DOCTYPE system keyword state
- 13.2.5.64 Before DOCTYPE system identifier state
- 13.2.5.65 DOCTYPE system identifier (double-quoted) state
- 13.2.5.66 DOCTYPE system identifier (single-quoted) state
- 13.2.5.67 After DOCTYPE system identifier state
- 13.2.5.68 Bogus DOCTYPE state
- 13.2.5.69 CDATA 部分状态
- 13.2.5.70 CDATA 部分括号状态
- 13.2.5.71 CDATA 部分结束状态
- 13.2.5.72 Character reference state
- 13.2.5.73 Named character reference state
- 13.2.5.74 Ambiguous ampersand state
- 13.2.5.75 数字字符引用状态
- 13.2.5.76 Hexadecimal character reference start state
- 13.2.5.77 Decimal character reference start state
- 13.2.5.78 Hexadecimal character reference state
- 13.2.5.79 Decimal character reference state
- 13.2.5.80 数字字符引用结束状态
- 13.2.6 Tree construction
- 13.2.6.1 Creating and inserting nodes
- 13.2.6.2 解析只包含文本的元素
- 13.2.6.3 Closing elements that have implied end tags
- 13.2.6.4 解析 HTML 内容中的标记的规则
- 13.2.6.4.1 "initial" 插入模式
- 13.2.6.4.2 "before html" 插入模式
- 13.2.6.4.3 "before head" 插入模式
- 13.2.6.4.4 The "in head" insertion mode
- 13.2.6.4.5 "in head noscript" 插入模式
- 13.2.6.4.6 "after head" 插入模式
- 13.2.6.4.7 The "in body" insertion mode
- 13.2.6.4.8 The "text" insertion mode
- 13.2.6.4.9 "in table" 插入模式
- 13.2.6.4.10 The "in table text" insertion mode
- 13.2.6.4.11 The "in caption" 插入模式
- 13.2.6.4.12 "in column group" 插入模式
- 13.2.6.4.13 "in table body" 插入模式
- 13.2.6.4.14 "in row" 插入模式
- 13.2.6.4.15 "in cell" 插入模式
- 13.2.6.4.16 "in select" 插入模式
- 13.2.6.4.17 "in select in table" 插入模式
- 13.2.6.4.18 "in template" 插入模式
- 13.2.6.4.19 "after body" 插入模式
- 13.2.6.4.20 "in frameset" 插入模式
- 13.2.6.4.21 "after frameset" 插入模式
- 13.2.6.4.22 "after after body" 插入模式
- 13.2.6.4.23 "after after frameset" 插入模式
- 13.2.6.5 The rules for parsing tokens in foreign content
- 13.2.7 The end
- 13.2.8 Coercing an HTML DOM into an infoset
- 13.2.9 解析器的错误处理和奇怪的场景介绍
- 13.2.9.1 错误嵌套的标签:<b><i></b></i>
- 13.2.9.2 错误嵌套的标签:<b><p></b></p>
- 13.2.9.3 Unexpected markup in tables
- 13.2.9.4 解析时修改页面的脚本
- 13.2.9.5 在多个文档中移动的脚本的执行
- 13.2.9.6 Unclosed formatting elements
- 13.3 序列化 HTML 片段
- 13.4 解析 HTML 片段
- 13.5 Named character references
- 14 XML 语法
- 14.1 以 XML 语法编写文档
- 14.2 Parsing XML documents
- 14.3 Serializing XML fragments
- 14.4 Parsing XML fragments
- 15 渲染
- 15.1 Introduction
- 15.2 The CSS user agent style sheet and presentational hints
- 15.3 Non-replaced elements
- 15.3.1 Hidden elements
- 15.3.2 The page
- 15.3.3 Flow content
- 15.3.4 Phrasing content
- 15.3.5 Bidirectional text
- 15.3.6 Sections and headings
- 15.3.7 Lists
- 15.3.8 Tables
- 15.3.9 Margin collapsing quirks
- 15.3.10 Form controls
- 15.3.11 The
hr
element - 15.3.12 The
fieldset
and legend
elements
- 15.4 Replaced elements
- 15.4.1 Embedded content
- 15.4.2 Images
- 15.4.3 Attributes for embedded content and images
- 15.4.4 Image maps
- 15.5 微件
- 15.5.1 简介
- 15.5.2 Button layout
- 15.5.3
button
元素 - 15.5.4
details
和 summary
元素 - 15.5.5
input
元素作为文本输入微件 - 15.5.6 The
input
element as domain-specific widgets - 15.5.7 The
input
element as a range control - 15.5.8 The
input
element as a color
well - 15.5.9 The
input
element as a checkbox and radio button widgets - 15.5.10 The
input
element as a file upload control - 15.5.11 The
input
element as a button - 15.5.12 The
marquee
element - 15.5.13 The
meter
element - 15.5.14 The
progress
element - 15.5.15 The
select
element - 15.5.16 The
textarea
element
- 15.6 Frames and framesets
- 15.7 Interactive media
- 15.7.1 Links, forms, and navigation
- 15.7.2 The
title
attribute - 15.7.3 Editing hosts
- 15.7.4 Text rendered in native user interfaces
- 15.8 Print media
- 15.9 Unstyled XML documents
- 16 废弃的特性
- 16.1 Obsolete but conforming features
- 16.1.1 Warnings for obsolete but conforming features
- 16.2 Non-conforming features
- 16.3 Requirements for implementations
- 16.3.1 The
marquee
element - 16.3.2 Frames
- 16.3.3 Other elements, attributes and APIs
- 17 IANA 注意事项
- 17.1
text/html
- 17.2
multipart/x-mixed-replace
- 17.3
application/xhtml+xml
- 17.4
text/cache-manifest
- 17.5
text/ping
- 17.6
application/microdata+json
- 17.7
text/event-stream
- 17.8 `
Cross-Origin-Embedder-Policy
` - 17.9 `
Cross-Origin-Embedder-Policy-Report-Only
` - 17.10 `
Cross-Origin-Opener-Policy
` - 17.11 `
Origin-Isolation
` - 17.12 `
Ping-From
` - 17.13 `
Ping-To
` - 17.14 `
Refresh
` - 17.15 `
Last-Event-ID
` - 17.16 `
X-Frame-Options
` - 17.17
web+
scheme prefix
- 索引
- Elements
- Element content categories
- Attributes
- Element Interfaces
- 所有接口
- Events
- MIME 类型
- References
- 致谢
- Intellectual property rights