/
798.txt
215 lines (160 loc) · 10 KB
/
798.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
[5] [[HTML]] の [DFN[[CODE(HTMLe)[body]] 要素型]]の要素は、
文書の[[本体]] (本文) を表します。文書に丁度1つだけ存在します。
[6] 仕様書:
- [[HTML 2.0]]: RFC 1866 5.3. Body: BODY
- [[HTML 4]]: [CODE(HTMLe)[body]] <IW:HTML4:"struct/global.html#edef-BODY">
[4]
:[[局所名]]:[CODE(HTMLe)[body]]
:[[名前空間名]]:[CODE(URI)[[[http://www.w3.org/1999/xhtml]]]]
:[[開始タグ]]:省略可能 (HTML 4), 必須 (XHTML 1)
:[[終了タグ]]:省略可能 (HTML 4), 必須 (XHTML 1)
:[[内容模型]]:[CODE(SGML)[([VAR[%[[block]]]] | [CODE(HTMLe)[[[script]]]])+ +([CODE(HTMLe)[[[ins]]]] | [CODE(HTMLe)[[[del]]]])]] (HTML 4 厳密)
:出現できる文脈:[CODE(HTMLe)[[[html]]]] の第2子要素として。
または [CODE(HTMLe)[[[frameset]]]]
の子供たる [CODE(HTMLe)[[[noframes]]]] の子供として。
* 属性
[FIG(short list)[ [23] [CODE(HTMLe)@en[body]] [[要素]]の[[属性]]
[HISTORY[
,[CODE(HTMLa)[[[alink]]]] ,[CODE[color]] ,(自動) ,選択リンク文字色 ,"[HTML4] 非推奨, [XHTML1]"
,[CODE(XMLa)[[QN[xfa:[[APIVersion]]] [http://www.xfa.org/schema/xfa-data/1.0/]]]] ,[SAMP(XML)[Acrobat:6.0.0]] など , ,生成ソフトウェア名・版 ,Adobe 規格 ,[[PDF]]
,[CODE(HTMLa)[[[background]]]] ,[[URI]] ,(なし) ,背景画像 ,"[HTML4] 非推奨, [XHTML1]"
,[CODE(HTMLa)[[[bgcolor]]]] ,[CODE[color]] ,(自動) ,背景色 ,"[HTML4] 非推奨, [XHTML1]"
,[CODE(HTMLa)[[[bgproperties]]]] , , ,背景表現 ,非標準 ,[[WinIE]]
,[CODE(HTMLa)[[[bottommargin]]]] , , ,下余白 ,非標準 ,[[WinIE]]
,[CODE(XMLa)[[QN[xfa:[[contentType]]] [http://www.xfa.org/schema/xfa-data/1.0/]]]] ,[SAMP(MIME)[[[text/html]]]] 固定 ,== , ,Adobe 規格 ,[[PDF]]
,[CODE(HTMLa)@en[fgcolor]]
,[CODE(HTMLa)[[[leftmargin]]]] , , ,左余白 ,非標準 ,[[WinIE]]
,[CODE(HTMLa)[[[link]]]] ,[CODE[color]] ,(自動) ,未訪リンク文字色 ,"[HTML4] 非推奨, [XHTML1]"
,[CODE(HTMLa)[[[nowrap]]]] , , ,自動折返しなし ,非標準
,[CODE(HTMLa)[[[rightmargin]]]] , , ,右余白 ,非標準 ,[[WinIE]]
,[CODE(XMLa)[[QN[xfa:[[spec]]] [http://www.xfa.org/schema/xfa-data/1.0/]]]] ,[SAMP(XML)[2.0.2]] など , ,[[XFA]] の版 ,Adobe 規格 ,[[PDF]]
,[CODE(HTMLa)[[[text]]]] ,[CODE[[[color]]]] ,(自動) ,文字色 ,"[HTML4] 非推奨, [XHTML1]"
,[CODE(HTMLa)[[[tracingopacity]]]] , , , ,非標準 ,[[Dreamweaver]] 4.0
,[CODE(HTMLa)[[[tracingsrc]]]] , , , ,非標準 ,[[Dreamweaver]] 4.0
,[CODE(HTMLa)[[[vlink]]]] ,[CODE[color]] ,(自動) ,既訪リンク文字色 ,"[HTML4] 非推奨, [XHTML1]"
,[CODE(XMLa)[[[xmlns]]:xfa]] ,[CODE(URI)[[[http://www.xfa.org/schema/xfa-data/1.0/]]]] , ,[[名前空間名]] ,Adobe 規格 ,[[PDF]] TABLE 8.64
- [CODE[margintop]]
- [CODE[scroll][<body scroll>]]
- [CODE[topmargin]]
]HISTORY]
]FIG]
* 実装
[1] [[NN]] 1.2 ''より''前には animated [CODE(HTMLe)[[[title]]]]
のように [CODE(HTMLe)[body]] 要素の開始タグを何個も書くことで背景色がどんどん変えられる不具合があったらしいです。
[[#comment]]
** 例
[7] 簡単な [CODE(HTMLe)[body]] の例 [SRC[RFC 1866 5.3.]]
[PRE(HTML)[
<BODY>
<h1>Important Stuff</h1>
<p>Explanation about important stuff...
</BODY>
]PRE]
[8]
[CITE[IEは上パディングと上マージンで相殺を行っているみたい:メモランダム]] ([CODE[2007-08-04 03:44:15 +09:00]] 版) <http://mynotes.jp/blog/2007/08/ie_collapses_padding_and_margin>
([[名無しさん]])
[9]
[CITE@ja[body 要素の最初の内包要素に上マージンがある場合の body 要素デフォルトのマージン処理 - 2xup.org]] ([[Taichi Kaminogoya]] 著, [CODE[2007-08-01 18:13:03 +09:00]] 版) <http://2xup.org/log/2007/07/31-2030>
([[名無しさん]] [WEAK[2007-08-04 02:16:46 +00:00]])
[10]
[CITE[body直下要素に上マージン:メモランダム]] ([CODE[2007-08-04 03:44:15 +09:00]] 版) <http://mynotes.jp/blog/2007/07/margin-top_on_element_under_body>
([[名無しさん]] [WEAK[2007-08-04 03:48:22 +00:00]])
[11]
[CITE[body直下要素に上マージン その2:メモランダム]] ([CODE[2007-08-04 03:44:15 +09:00]] 版) <http://mynotes.jp/blog/2007/08/margin-top_on_element_under_body2>
([[名無しさん]])
[12]
[CITE[IEは上パディングと上マージンで相殺を行っているみたい:メモランダム]] ([TIME[2007-08-04 03:44:15 +09:00]] 版) <http://mynotes.jp/blog/2007/08/ie_collapses_padding_and_margin>
[17] [[IE]] の[[ヘルプ]]より:
>
[PRE(HTML code)[
<BODY helptype="topic" helpurl="mshelp://windows/?id=8f2c3a40-b8f6-46b7-b5f9-13c99ed70b2c" helpsource="online" helptopictype="tutorial" LANG="ja">
]PRE]
* 歴史
[2] [[JIS X 4151]]‐1992 参考3 4.2.1 の例で「本体」を表す
[CODE(SGMLe)[body]] 要素型が登場してます。
[13] [CITE[Synchronized Multimedia Integration Language]] ([TIME[1998-06-16 04:11:22 +09:00]] 版) <http://www.w3.org/TR/1998/REC-smil-19980615/#body>
[14] [[WordprocessingML]] も[[要素型]] [CODE(XMLe)@en[w:[[body]]]] を使っています。
** [CODE[BODY]] 要素 (DjVu XML)
[273]
[[DjVu XML]]
には
[[HTML]]
の
[CODE[body]]
[[要素]]から派生した
[DFN[[CODE[BODY]]]]
[[要素]]がありました。
**
[15] [CITE[''''''[''''''whatwg'''''']'''''' Specification unclear about how HTMLElement.prototype.onscroll's getter/setter should behave for "body" elements]]
( ([TIME[2012-12-04 06:17:20 +09:00]] 版))
<http://lists.whatwg.org/pipermail/whatwg-whatwg.org/2012-December/038221.html>
[16] [CODE(HTMLe)@en[[[body]]]] [[終了タグ]]は、
[CODE(HTML)@en[<marquee></body>]],
[CODE(HTML)@en[<svg><foreignobject></body>]]
のような場合や、 [CODE(HTMLa)@en[[[innerHTML]]]] の場合
([CODE(HTMLe)@en[[[html]]]] 以外) には無視されます。
[FIG(quote)[
[FIGCAPTION[
[3] [CITE[XEP-0071: XHTML-IM]]
([TIME[2014-04-09 01:56:46 +09:00]] 版)
<http://www.xmpp.org/extensions/xep-0071.html#wrapper>
]FIGCAPTION]
> The root element for including XHTML content within XMPP stanzas is <html/>. This element is qualified by the 'http://jabber.org/protocol/xhtml-im' namespace. From the perspective of XMPP, the wrapper element functions as an XMPP extension element; from the perspective of XHTML, it functions as a wrapper for XHTML 1.0 content qualified by the 'http://www.w3.org/1999/xhtml' namespace. Such XHTML content MUST be contained in one or more <body/> elements qualified by the 'http://www.w3.org/1999/xhtml' namespace and MUST conform to the XHTML-IM Integration Set defined in the following section. If more than one <body/> element is included in the <html/> wrapper element, each <body/> element MUST possess an 'xml:lang' attribute with a distinct value, where the value of that attribute MUST adhere to the rules defined in RFC 5646 '''['''18''']'''.
]FIG]
[18] [CITE@en[Remove <iframe seamless> · whatwg/html@1490eba]]
([TIME[2016-02-04 19:23:06 +09:00]] 版)
<https://github.com/whatwg/html/commit/1490eba4dba5ab476f0981443a86c01acae01311>
[FIG(quote)[
[FIGCAPTION[
[19] [CITE@ja[民泊のエアビーアンドビー、苦情サイト新設 - WSJ]]
( ([[NATHAN OLIVAREZ-GILES]]著, [TIME[2016-06-03 19:07:49 +09:00]]))
<http://jp.wsj.com/articles/SB10513819889225894892604582103810164964978>
]FIGCAPTION]
> <body
> id="article_body"
> class="pageFrame subType-unsubscribed edition-japan logged-out"
> intent
> in-width="*"
> in-interaction="*"
> itemscope
> itemtype="//schema.org/NewsArticle">
]FIG]
[20] [CITE@en[Fix typo: remove a 'not' in body fills the viewport quirk]]
([[zcorpan]]著, [TIME[2016-06-30 17:49:41 +09:00]])
<https://github.com/whatwg/quirks/commit/0e348be84e29e4fd1812128d6ca85f3b247e5dfc>
[21] [CITE@en[Editorial: Cross-reference DOM "child" where appropriate in rendering]]
([[zcorpan]]著, [TIME[2016-09-20 20:16:41 +09:00]])
<https://github.com/whatwg/html/commit/e8c91c05edc8d6cdb33fdd5452e052359d40490b>
[22] [CITE@en[Editorial: add a note about the 'document's body element']]
([[zcorpan]]著, [TIME[2016-11-24 19:22:14 +09:00]])
<https://github.com/whatwg/quirks/commit/c82f966a8de5be77879a7c8a1b314925cee3b566>
[24] [CITE@en['''['''css-overflow''']''' body overflow propagation is less defined than it was in CSS 2.1 · Issue #1905 · w3c/csswg-drafts]]
([TIME[2018-01-04 15:17:41 +09:00]])
<https://github.com/w3c/csswg-drafts/issues/1905>
[25] [CITE@en[Restrict the main element to be used once per document]]
([[annevk]]著, [TIME[2018-01-23 17:10:16 +09:00]])
<https://github.com/whatwg/html/commit/1dec930b3df93c799d5f3f685a46940913476086>
[26] [CITE@en[Restrict the main element to be used once per document by annevk · Pull Request #3354 · whatwg/html]]
([TIME[2018-01-24 12:52:17 +09:00]])
<https://github.com/whatwg/html/pull/3354>
[27] [CITE@en[update <body> mappings / issue #117]]
([[jasonkiss]]著, [TIME[2018-02-07 05:08:33 +09:00]])
<https://github.com/w3c/html-aam/commit/724677bc4d14eefb30b207ab5f580a85477a0b19>
[28] [CITE@en[Body element likely should not map to ARIA document role · Issue #117 · w3c/html-aam]]
([TIME[2018-02-07 13:27:42 +09:00]])
<https://github.com/w3c/html-aam/issues/117>
[29] [CITE@en[leverage CORE mappings / issue #119]]
([[jasonkiss]]著, [TIME[2018-02-07 07:29:32 +09:00]])
<https://github.com/w3c/html-aam/commit/a1a661d9874e2674cd99b7dda1cf6962dc91df1b>
[30] [CITE@en[Should header, footer have "Use WAI-ARIA mapping" when scoped to the body element? · Issue #119 · w3c/html-aam]]
([TIME[2018-02-07 13:32:35 +09:00]])
<https://github.com/w3c/html-aam/issues/119>
[31] [CITE@en[update <body> mappings / issue #117]]
([[jasonkiss]]著, [TIME[2018-02-07 05:08:33 +09:00]])
<https://github.com/w3c/html-aam/commit/724677bc4d14eefb30b207ab5f580a85477a0b19>
[32] [CITE@en[Body element likely should not map to ARIA document role · Issue #117 · w3c/html-aam]]
([TIME[2018-05-08 21:18:08 +09:00]])
<https://github.com/w3c/html-aam/issues/117>
[33] [CITE@en[leverage CORE mappings / issue #119]]
([[jasonkiss]]著, [TIME[2018-02-07 07:29:32 +09:00]])
<https://github.com/w3c/html-aam/commit/a1a661d9874e2674cd99b7dda1cf6962dc91df1b>