| 31 |
任意選択で、1つの U+FEFF BYTE ORDER MARK (BOM) 文字。 |
任意選択で、1つの U+FEFF BYTE ORDER MARK (BOM) 文字。 |
| 32 |
|
|
| 33 |
#en |
#en |
| 34 |
Any number of <a href="#comments0" title=syntax-comments>comments</a> |
Any number of <a href=#syntax-comments title=syntax-comments>comments</a> |
| 35 |
and <a href="#space" title="space character">space characters</a>. |
and <a href=#space-character title="space character">space characters</a>. |
| 36 |
#ja |
#ja |
| 37 |
任意の個数の<a href="#comments0" title=syntax-comments>注釈</a>と<a href="#space" title="space character">間隔文字</a>。 |
任意の個数の<a href=#syntax-comments title=syntax-comments>注釈</a>と<a href=#space-character title="space character">間隔文字</a>。 |
| 38 |
|
|
| 39 |
#en |
#en |
| 40 |
A <a href="#doctype5" title=syntax-doctype>DOCTYPE</a>. |
A <a href=#syntax-doctype title=syntax-doctype>DOCTYPE</a>. |
| 41 |
#ja |
#ja |
| 42 |
<a href="#doctype5" title=syntax-doctype>DOCTYPE</a>。 |
<a href=#syntax-doctype title=syntax-doctype>DOCTYPE</a>。 |
| 43 |
|
|
| 44 |
#en |
#en |
| 45 |
The root element, in the form of an <code><a |
The root element, in the form of an <code><a |
| 46 |
href="#html">html</a></code> <a href="#elements3" |
href=#the-html-element>html</a></code> <a href=#dom-form-elements |
| 47 |
title=syntax-elements>element</a>. |
title=syntax-elements>element</a>. |
| 48 |
#ja |
#ja |
| 49 |
根要素を <code><a |
根要素を <code><a |
| 50 |
href="#html">html</a></code> <a href="#elements3" |
href=#the-html-element>html</a></code> <a href=#dom-form-elements |
| 51 |
title=syntax-elements>要素</a>の形で。 |
title=syntax-elements>要素</a>の形で。 |
| 52 |
|
|
| 53 |
#en |
#en |
| 65 |
それに関する節で説明した通り、いくつかの制限があります。 |
それに関する節で説明した通り、いくつかの制限があります。 |
| 66 |
|
|
| 67 |
#en |
#en |
| 68 |
Space characters before the root <code><a href="#html">html</a></code> |
Space characters before the root <code><a href=#the-html-element>html</a></code> |
| 69 |
element, and space characters at the start of the <code><a |
element, and space characters at the start of the <code><a |
| 70 |
href="#html">html</a></code> element and before the <code><a |
href=#the-html-element>html</a></code> element and before the <code><a |
| 71 |
href="#head">head</a></code> element, will be dropped when the document |
href=#the-head-element>head</a></code> element, will be dropped when the document |
| 72 |
is parsed; space characters <em>after</em> the root <code><a |
is parsed; space characters <em>after</em> the root <code><a |
| 73 |
href="#html">html</a></code> element will be parsed as if they were at |
href=#the-html-element>html</a></code> element will be parsed as if they were at |
| 74 |
the end of the <code><a href="#body0">body</a></code> element. Thus, |
the end of the <code><a href=#the-body-element>body</a></code> element. Thus, |
| 75 |
space characters around the root element do not round-trip. |
space characters around the root element do not round-trip. |
| 76 |
#ja |
#ja |
| 77 |
根 <code><a href="#html">html</a></code> 要素の前の間隔文字や、 |
根 <code><a href=#the-html-element>html</a></code> 要素の前の間隔文字や、 |
| 78 |
<code><a |
<code><a |
| 79 |
href="#html">html</a></code> 要素のはじめで <code><a |
href=#the-html-element>html</a></code> 要素のはじめで <code><a |
| 80 |
href="#head">head</a></code> 要素の前の間隔文字は、 |
href=#the-head-element>head</a></code> 要素の前の間隔文字は、 |
| 81 |
文書が構文解析される時に除去されます。根 <code><a |
文書が構文解析される時に除去されます。根 <code><a |
| 82 |
href="#html">html</a></code> 要素の<em>後</em>の間隔文字は、 |
href=#the-html-element>html</a></code> 要素の<em>後</em>の間隔文字は、 |
| 83 |
<code><a href="#body0">body</a></code> 要素の終わりにあったものとして構文解析されます。 |
<code><a href=#the-body-element>body</a></code> 要素の終わりにあったものとして構文解析されます。 |
| 84 |
従って、根要素の近辺の間隔文字は往復しません。 |
従って、根要素の近辺の間隔文字は往復しません。 |
| 85 |
|
|
| 86 |
|
|
| 87 |
#en |
#en |
| 88 |
It is suggested that newlines be inserted after the DOCTYPE, after any |
It is suggested that newlines be inserted after the DOCTYPE, after any |
| 89 |
comments that are before the root element, after the <code><a |
comments that are before the root element, after the <code><a |
| 90 |
href="#html">html</a></code> element's start tag (if it is not <a |
href=#the-html-element>html</a></code> element's start tag (if it is not <a |
| 91 |
href="#omitted" title=syntax-tag-omission>omitted</a>), and after any |
href=#syntax-tag-omission title=syntax-tag-omission>omitted</a>), and after any |
| 92 |
comments that are inside the <code><a href="#html">html</a></code> |
comments that are inside the <code><a href=#the-html-element>html</a></code> |
| 93 |
element but before the <code><a href="#head">head</a></code> element. |
element but before the <code><a href=#the-head-element>head</a></code> element. |
| 94 |
#ja |
#ja |
| 95 |
DOCTYPE の後、 |
DOCTYPE の後、 |
| 96 |
根要素の前の注釈がある場合はその後、 |
根要素の前の注釈がある場合はその後、 |
| 97 |
<code><a |
<code><a |
| 98 |
href="#html">html</a></code> 要素の開始タグの後 |
href=#the-html-element>html</a></code> 要素の開始タグの後 |
| 99 |
(<a |
(<a |
| 100 |
href="#omitted" title=syntax-tag-omission>省略</a>しない場合)、 |
href=#syntax-tag-omission title=syntax-tag-omission>省略</a>しない場合)、 |
| 101 |
<code><a href="#html">html</a></code> 要素中で |
<code><a href=#the-html-element>html</a></code> 要素中で |
| 102 |
<code><a href="#head">head</a></code> 要素の前に注釈がある場合にはその後には、 |
<code><a href=#the-head-element>head</a></code> 要素の前に注釈がある場合にはその後には、 |
| 103 |
改行を挿入することをおすすめします。 |
改行を挿入することをおすすめします。 |
| 104 |
|
|
| 105 |
#en |
#en |
| 123 |
<span class=secno>$1 </span>DOCTYPE |
<span class=secno>$1 </span>DOCTYPE |
| 124 |
|
|
| 125 |
#en |
#en |
| 126 |
A <dfn id=doctype5 title=syntax-doctype>DOCTYPE</dfn> is a mostly |
A <dfn id=syntax-doctype title=syntax-doctype>DOCTYPE</dfn> is a mostly |
| 127 |
useless, but required, header. |
useless, but required, header. |
| 128 |
#ja |
#ja |
| 129 |
<dfn id=doctype5 title=syntax-doctype>DOCTYPE</dfn> はほとんど無意味ですが、 |
<dfn id=syntax-doctype title=syntax-doctype>DOCTYPE</dfn> はほとんど無意味ですが、 |
| 130 |
[[REQUIRED:必須]]の頭部です。 |
[[REQUIRED:必須]]の頭部です。 |
| 131 |
|
|
| 132 |
#en |
#en |
| 199 |
U+0045 LATIN CAPITAL LETTER E 文字か U+0065 LATIN SMALL LETTER E 文字。 |
U+0045 LATIN CAPITAL LETTER E 文字か U+0065 LATIN SMALL LETTER E 文字。 |
| 200 |
|
|
| 201 |
#en |
#en |
| 202 |
One or more <a href="#space" title="space character">space |
One or more <a href=#space-character title="space character">space |
| 203 |
characters</a>. |
characters</a>. |
| 204 |
#ja |
#ja |
| 205 |
1つ以上の<a href="#space" title="space character">間隔文字</a>。 |
1つ以上の<a href=#space-character title="space character">間隔文字</a>。 |
| 206 |
|
|
| 207 |
#en |
#en |
| 208 |
A U+0048 LATIN CAPITAL LETTER H or U+0068 LATIN SMALL LETTER H |
A U+0048 LATIN CAPITAL LETTER H or U+0068 LATIN SMALL LETTER H |
| 224 |
U+004C LATIN CAPITAL LETTER L 文字か U+006C LATIN SMALL LETTER L 文字。 |
U+004C LATIN CAPITAL LETTER L 文字か U+006C LATIN SMALL LETTER L 文字。 |
| 225 |
|
|
| 226 |
#en |
#en |
| 227 |
Zero or more <a href="#space" title="space character">space |
Zero or more <a href=#space-character title="space character">space |
| 228 |
characters</a>. |
characters</a>. |
| 229 |
#ja |
#ja |
| 230 |
零個以上の<a href="#space" title="space character">間隔文字</a>。 |
零個以上の<a href=#space-character title="space character">間隔文字</a>。 |
| 231 |
|
|
| 232 |
#en |
#en |
| 233 |
A U+003E GREATER-THAN SIGN (<code>></code>) character. |
A U+003E GREATER-THAN SIGN (<code>></code>) character. |
| 246 |
<span class=secno>$1 </span>要素 |
<span class=secno>$1 </span>要素 |
| 247 |
|
|
| 248 |
#en |
#en |
| 249 |
There are five different kinds of <dfn id=elements3 |
There are five different kinds of <dfn id=dom-form-elements |
| 250 |
title=syntax-elements>elements</dfn>: void elements, CDATA elements, |
title=syntax-elements>elements</dfn>: void elements, CDATA elements, |
| 251 |
RCDATA elements, foreign elements, and normal elements. |
RCDATA elements, foreign elements, and normal elements. |
| 252 |
#ja |
#ja |
| 253 |
<dfn id=elements3 |
<dfn id=dom-form-elements |
| 254 |
title=syntax-elements>要素</dfn>には5種類あります。 |
title=syntax-elements>要素</dfn>には5種類あります。 |
| 255 |
空隙要素、 CDATA 要素、 RCDATA 要素、外来要素、通常要素です。 |
空隙要素、 CDATA 要素、 RCDATA 要素、外来要素、通常要素です。 |
| 256 |
|
|
| 272 |
#en |
#en |
| 273 |
Foreign elements |
Foreign elements |
| 274 |
#ja |
#ja |
|
外来要素 |
|
| 275 |
|
外来要素 |
| 276 |
|
|
| 277 |
|
#en |
| 278 |
|
Elements from the <a href=#mathml-namespace>MathML namespace</a> <!--XXXSVG |
| 279 |
|
and the <span>SVG namespace</span>. |
| 280 |
|
#ja |
| 281 |
|
<a href=#mathml-namespace>MathML 名前空間</a>からの要素。<!--XXXSVG |
| 282 |
|
and the <span>SVG namespace</span>. |
| 283 |
|
|
| 284 |
|
#en |
| 285 |
|
Normal elements |
| 286 |
|
#ja |
| 287 |
|
通常要素 |
| 288 |
|
|
| 289 |
|
#en |
| 290 |
|
All other allowed <a href=#html-elements>HTML elements</a> are |
| 291 |
|
normal elements. |
| 292 |
|
#ja |
| 293 |
|
他の全ての認められている<a href=#html-elements>HTML 要素</a>は通常要素です。 |
| 294 |
|
|
| 295 |
|
#en |
| 296 |
|
The root element, in the form of an <code><a href=#the-html-element>html</a></code> <a href=#syntax-elements title=syntax-elements>element</a>. |
| 297 |
|
#ja |
| 298 |
|
根要素を、 <code><a href=#the-html-element>html</a></code> <a href=#syntax-elements title=syntax-elements>要素</a>として。 |
| 299 |
|
|
| 300 |
|
#en |
| 301 |
|
Optionally, a <a href=#doctype-legacy-string>DOCTYPE legacy string</a> (defined below). |
| 302 |
|
#ja |
| 303 |
|
任意選択で、 <a href=#doctype-legacy-string>DOCTYPE 遺物文字列</a> (後で定義します)。 |
| 304 |
|
|
| 305 |
|
#en |
| 306 |
|
In other words, <code><!DOCTYPE HTML></code>, |
| 307 |
|
case-insensitively. |
| 308 |
|
#ja |
| 309 |
|
すなわち、大文字または小文字の <code><!DOCTYPE HTML></code>。 |
| 310 |
|
|
| 311 |
|
#en |
| 312 |
|
For the purposes of XSLT generators that cannot output HTML |
| 313 |
|
markup without a DOCTYPE, a <dfn id=doctype-legacy-string>DOCTYPE legacy string</dfn> may be |
| 314 |
|
inserted into the DOCTYPE (in the position defined above). This |
| 315 |
|
string must consist of: |
| 316 |
|
#ja |
| 317 |
|
DOCTYPE なしの HTML マーク付けを出力できない XSLT 生成器のため、 |
| 318 |
|
<dfn id=doctype-legacy-string>DOCTYPE 遺物文字列</dfn>を |
| 319 |
|
DOCTYPE (の前述の位置) に挿入して[[MAY:構いません]]。 |
| 320 |
|
この文字列は次のものから構成されなければ[[MUST:なりません]]。 |
| 321 |
|
|
| 322 |
|
#pattern |
| 323 |
|
A * or * character. |
| 324 |
|
#ja |
| 325 |
|
$1 文字または * 文字。 |
| 326 |
|
|
| 327 |
|
#en |
| 328 |
|
The literal string "<code title="">XSLT-compat</code>". |
| 329 |
|
#ja |
| 330 |
|
生の文字列「<code title="">XSLT-compat</code>」。 |
| 331 |
|
|
| 332 |
|
#en |
| 333 |
|
The same character as in item 9 (a matching U+0022 QUOTATION MARK or U+0027 APOSTROPHE character). |
| 334 |
|
#ja |
| 335 |
|
項目9と同じ文字 (U+0022 QUOTATION MARK 文字または U+0027 APOSTROPHE 文字の一致する方)。 |
| 336 |
|
|
| 337 |
|
#en |
| 338 |
|
In other words, <code><!DOCTYPE HTML PUBLIC |
| 339 |
|
"XSLT-compat"></code> or <code><!DOCTYPE HTML PUBLIC |
| 340 |
|
'XSLT-compat'></code>, case-insensitively except for the bit in |
| 341 |
|
quotes. |
| 342 |
|
#ja |
| 343 |
|
すなわち、引用符内以外は大文字か小文字の <code><!DOCTYPE HTML PUBLIC |
| 344 |
|
"XSLT-compat"></code> または <code><!DOCTYPE HTML PUBLIC |
| 345 |
|
'XSLT-compat'></code>。 |
| 346 |
|
|
| 347 |
|
#en |
| 348 |
|
The <a href=#doctype-legacy-string>DOCTYPE legacy string</a> should not be used unless |
| 349 |
|
the document is generated from XSLT. |
| 350 |
|
#ja |
| 351 |
|
<a href=#doctype-legacy-string>DOCTYPE 遺物文字列</a>は XSLT |
| 352 |
|
で生成された文書を除き使用する[[SHOULD NOT:べきではありません]]。 |
| 353 |
|
|
| 354 |
|
#en |
| 355 |
|
There are five different kinds of <dfn id=syntax-elements title=syntax-elements>elements</dfn>: void elements, CDATA |
| 356 |
|
elements, RCDATA elements, foreign elements, and normal |
| 357 |
|
elements. |
| 358 |
|
#ja |
| 359 |
|
<dfn id=syntax-elements title=syntax-elements>要素</dfn>には、 |
| 360 |
|
空隙要素、 CDATA 要素、 RCDATA 要素、外来要素、通常要素の5つの異なる種類があります。 |
| 361 |
|
|
| 362 |
|
#en |
| 363 |
|
<dfn id=syntax-tags title=syntax-tags>Tags</dfn> are used to delimit the start |
| 364 |
|
and end of elements in the markup. CDATA, RCDATA, and normal |
| 365 |
|
elements have a <a href=#syntax-start-tags title=syntax-start-tags>start tag</a> to |
| 366 |
|
indicate where they begin, and an <a href=#syntax-end-tags title=syntax-end-tags>end |
| 367 |
|
tag</a> to indicate where they end. The start and end tags of |
| 368 |
|
certain normal elements can be <a href=#syntax-tag-omission title=syntax-tag-omission>omitted</a>, as described |
| 369 |
|
later. Those that cannot be omitted must not be omitted. <a href=#void-elements>Void |
| 370 |
|
elements</a> only have a start tag; end tags must not be |
| 371 |
|
specified for void elements. Foreign elements must either have a |
| 372 |
|
start tag and an end tag, or a start tag that is marked as |
| 373 |
|
self-closing, in which case they must not have an end tag. |
| 374 |
|
#ja |
| 375 |
|
<dfn id=syntax-tags title=syntax-tags>タグ</dfn>は、 |
| 376 |
|
マーク付けにおいて要素の開始と終了を区切るために使います。 |
| 377 |
|
CDATA 要素、 RCDATA 要素、通常要素は、 |
| 378 |
|
その始まる位置を示す<a href=#syntax-start-tags title=syntax-start-tags>開始タグ</a>と、 |
| 379 |
|
その終わる位置を示す<a href=#syntax-end-tags title=syntax-end-tags>終了タグ</a>を持ちます。 |
| 380 |
|
特定の通常要素の開始タグと終了タグは、 |
| 381 |
|
後述の通り<a href=#syntax-tag-omission title=syntax-tag-omission>省略</a>することができます。 |
| 382 |
|
省略できないものは省略しては[[MUST NOT:なりません]]。 |
| 383 |
|
<a href=#void-elements>空隙要素</a>は開始タグのみを持ちます。 |
| 384 |
|
空隙要素に終了タグを指定しては[[MUST NOT:なりません]]。 |
| 385 |
|
外来要素は開始タグと終了タグを持つか、または開始タグを自己閉塞と印付けするかのいずれかで[[MUST:なければなりらず]]、 |
| 386 |
|
後者の場合終了タグを持っては[[MUST NOT:なりません]]。 |
| 387 |
|
|
| 388 |
|
|
| 389 |
|
#en |
| 390 |
|
The contents of the element must be placed between just after the |
| 391 |
|
start tag (which <a href=#syntax-tag-omission title=syntax-tag-omission>might be implied, |
| 392 |
|
in certain cases</a>) and just before the end tag (which again, |
| 393 |
|
<a href=#syntax-tag-omission title=syntax-tag-omission>might be implied in certain |
| 394 |
|
cases</a>). The exact allowed contents of each individual element |
| 395 |
|
depends on the content model of that element, as described earlier |
| 396 |
|
in this specification. Elements must not contain content that their |
| 397 |
|
content model disallows. In addition to the restrictions placed on |
| 398 |
|
the contents by those content models, however, the five types of |
| 399 |
|
elements have additional <em>syntactic</em> requirements. |
| 400 |
|
#ja |
| 401 |
|
要素の内容は開始タグ (これは<a href=#syntax-tag-omission title=syntax-tag-omission>場合によっては暗示的なものかもしれません</a>。) |
| 402 |
|
の直後と終了タグ (これも<a href=#syntax-tag-omission title=syntax-tag-omission>場合によっては暗示的なものかもしれません</a>。) |
| 403 |
|
の直前の間に配置しなければ[[MUST:なりません]]。 |
| 404 |
|
各要素それぞれで認められる内容は正確には、この仕様書の先の方で説明した当該要素の内容モデルに依存します。 |
| 405 |
|
要素はその内容モデルが禁じた内容を含んではなりません。しかも、 |
| 406 |
|
各要素の内容モデルによって内容に課した制約に加えて、5種類の要素には追加の<em>構文的</em>要件があります。 |
| 407 |
|
|
| 408 |
|
#en |
| 409 |
|
<a href=#void-elements>Void elements</a> can't have any contents (since there's |
| 410 |
|
no end tag, no content can be put between the start tag and the end |
| 411 |
|
tag). |
| 412 |
|
#ja |
| 413 |
|
<a href=#void-elements>空隙要素</a>は内容を持つことができません |
| 414 |
|
(終了タグがないので、内容を開始タグと終了タグの間に置くことができません)。 |
| 415 |
|
|
| 416 |
|
#en |
| 417 |
|
CDATA elements can have <a href=#syntax-text title=syntax-text>text</a>, |
| 418 |
|
though it has <a href=#cdata-rcdata-restrictions>restrictions</a> |
| 419 |
|
described below. |
| 420 |
|
#ja |
| 421 |
|
CDATA 要素は<a href=#syntax-text title=syntax-text>テキスト</a>を持つことができますが、 |
| 422 |
|
後述の<a href=#cdata-rcdata-restrictions>制約</a>があります。 |
| 423 |
|
|
| 424 |
|
#en |
| 425 |
|
RCDATA elements can have <a href=#syntax-text title=syntax-text>text</a> |
| 426 |
|
and <a href=#syntax-charref title=syntax-charref>character references</a>, but |
| 427 |
|
the text must not contain an <a href=#syntax-ambiguous-ampersand title=syntax-ambiguous-ampersand>ambiguous ampersand</a>. |
| 428 |
|
There are also <a href=#cdata-rcdata-restrictions>further |
| 429 |
|
restrictions</a> described below. |
| 430 |
|
#ja |
| 431 |
|
RCDATA 要素は<a href=#syntax-text title=syntax-text>テキスト</a>と<a href=#syntax-charref title=syntax-charref>文字参照</a>を持つことができますが、 |
| 432 |
|
テキストは<a href=#syntax-ambiguous-ampersand title=syntax-ambiguous-ampersand>曖昧アンド記号</a>を含んでは[[MUST NOT:なりません]]。 |
| 433 |
|
後述の<a href=#cdata-rcdata-restrictions>追加制約</a>もあります。 |
| 434 |
|
|
| 435 |
|
#en |
| 436 |
|
Foreign elements whose start tag is marked as self-closing can't |
| 437 |
|
have any contents (since, again, as there's no end tag, no content |
| 438 |
|
can be put between the start tag and the end tag). Foreign elements |
| 439 |
|
whose start tag is <em>not</em> marked as self-closing can have |
| 440 |
|
<a href=#syntax-text title=syntax-text>text</a>, <a href=#syntax-charref title=syntax-charref>character references</a>, <a href=#syntax-cdata title=syntax-cdata>CDATA sections</a>, other <a href=#syntax-elements title=syntax-elements>elements</a>, and <a href=#syntax-comments title=syntax-comments>comments</a>, but the text must not |
| 441 |
|
contain the character U+003C LESS-THAN SIGN (<code><</code>) or |
| 442 |
|
an <a href=#syntax-ambiguous-ampersand title=syntax-ambiguous-ampersand>ambiguous |
| 443 |
|
ampersand</a>. |
| 444 |
|
#ja |
| 445 |
|
開始タグが自己閉塞と印付けされた外来要素は内容を持つことができません |
| 446 |
|
(やはり、終了タグがないため、内容を開始タグと終了タグの間に置くことができないからです)。 |
| 447 |
|
開始タグが自己閉塞と印付けされて<em>いない</em>外来要素は<a href=#syntax-text title=syntax-text>テキスト</a>、 |
| 448 |
|
<a href=#syntax-charref title=syntax-charref>文字参照</a>、 |
| 449 |
|
<a href=#syntax-cdata title=syntax-cdata>CDATA 区間</a>、 |
| 450 |
|
他の<a href=#syntax-elements title=syntax-elements>要素</a>、 |
| 451 |
|
<a href=#syntax-comments title=syntax-comments>注釈</a>を持つことができますが、 |
| 452 |
|
テキストは文字 U+003C LESS-THAN SIGN (<code><</code>) |
| 453 |
|
や<a href=#syntax-ambiguous-ampersand title=syntax-ambiguous-ampersand>曖昧アンド記号</a>を含んでは[[MUST NOT:なりません]]。 |
| 454 |
|
|
| 455 |
|
#en |
| 456 |
|
Normal elements can have <a href=#syntax-text title=syntax-text>text</a>, |
| 457 |
|
<a href=#syntax-charref title=syntax-charref>character references</a>, other |
| 458 |
|
<a href=#syntax-elements title=syntax-elements>elements</a>, and <a href=#syntax-comments title=syntax-comments>comments</a>, but the text must not |
| 459 |
|
contain the character U+003C LESS-THAN SIGN (<code><</code>) or |
| 460 |
|
an <a href=#syntax-ambiguous-ampersand title=syntax-ambiguous-ampersand>ambiguous |
| 461 |
|
ampersand</a>. Some normal elements also have <a href=#element-restrictions>yet more restrictions</a> on what |
| 462 |
|
content they are allowed to hold, beyond the restrictions imposed by |
| 463 |
|
the content model and those described in this paragraph. Those |
| 464 |
|
restrictions are described below. |
| 465 |
|
#ja |
| 466 |
|
通常要素は<a href=#syntax-text title=syntax-text>テキスト</a>、 |
| 467 |
|
<a href=#syntax-charref title=syntax-charref>文字参照</a>、 |
| 468 |
|
他の<a href=#syntax-elements title=syntax-elements>要素</a>、 |
| 469 |
|
<a href=#syntax-comments title=syntax-comments>注釈</a>を持つことができますが、 |
| 470 |
|
テキストは文字 U+003C LESS-THAN SIGN (<code><</code>) |
| 471 |
|
や<a href=#syntax-ambiguous-ampersand title=syntax-ambiguous-ampersand>曖昧アンド記号</a>を含んでは[[MUST NOT:なりません]]。 |
| 472 |
|
いくつかの通常要素は、保持することが認められる内容に関して、 |
| 473 |
|
内容モデルにより課される制約やこの段落で説明した制約に加え、 |
| 474 |
|
<a href=#element-restrictions>更に追加の制約</a>をも有します。 |
| 475 |
|
その制約については後述します。 |
| 476 |
|
|
| 477 |
|
#en |
| 478 |
|
Tags contain a <dfn id=syntax-tag-name title=syntax-tag-name>tag name</dfn>, |
| 479 |
|
giving the element's name. HTML elements all have names that only |
| 480 |
|
use characters in the range U+0030 DIGIT ZERO .. U+0039 DIGIT NINE, |
| 481 |
|
U+0061 LATIN SMALL LETTER A .. U+007A LATIN SMALL LETTER Z, U+0041 |
| 482 |
|
LATIN CAPITAL LETTER A .. U+005A LATIN CAPITAL LETTER Z, and U+002D |
| 483 |
|
HYPHEN-MINUS (<code>-</code>). In the HTML syntax, tag names may be |
| 484 |
|
written with any mix of lower- and uppercase letters that, when |
| 485 |
|
converted to all-lowercase, matches the element's tag name; tag |
| 486 |
|
names are case-insensitive. |
| 487 |
|
#ja |
| 488 |
|
タグは<dfn id=syntax-tag-name title=syntax-tag-name>タグ名</dfn>を持ち、 |
| 489 |
|
これが要素の名前を与えます。 |
| 490 |
|
HTML 要素はすべて、範囲 U+0030 DIGIT ZERO ~ U+0039 DIGIT NINE、 |
| 491 |
|
U+0061 LATIN SMALL LETTER A ~ U+007A LATIN SMALL LETTER Z、U+0041 |
| 492 |
|
LATIN CAPITAL LETTER A ~ U+005A LATIN CAPITAL LETTER Z、 U+002D |
| 493 |
|
HYPHEN-MINUS (<code>-</code>) の文字のみを使った名前を持ちます。 |
| 494 |
|
HTML 構文では、タグ名はすべて小文字に変換した時に要素のタグ名に一致するような任意の小文字と大文字の組み合わせで書いて[[MAY:構いません]]。 |
| 495 |
|
つまり、タグ名は大文字・小文字を区別しません。 |
| 496 |
|
|
| 497 |
|
|
| 498 |
|
#pattern |
| 499 |
|
<span class=secno>* </span>Start tags |
| 500 |
|
#ja |
| 501 |
|
<span class=secno>$1 </span>開始タグ |
| 502 |
|
|
| 503 |
|
#en |
| 504 |
|
<dfn id=syntax-start-tags title=syntax-start-tags>Start tags</dfn> must have the |
| 505 |
|
following format: |
| 506 |
|
#ja |
| 507 |
|
<dfn id=syntax-start-tags title=syntax-start-tags>開始タグ</dfn>は次の書式でなければ[[MUST:なりません]]。 |
| 508 |
|
|
| 509 |
|
#en |
| 510 |
|
The first character of a start tag must be a U+003C LESS-THAN |
| 511 |
|
SIGN (<code><</code>). |
| 512 |
|
#ja |
| 513 |
|
開始タグの最初の文字は U+003C LESS-THAN |
| 514 |
|
SIGN (<code><</code>) でなければ[[MUST:なりません]]。 |
| 515 |
|
|
| 516 |
|
#en |
| 517 |
|
The next few characters of a start tag must be the element's |
| 518 |
|
<a href=#syntax-tag-name title=syntax-tag-name>tag name</a>. |
| 519 |
|
#ja |
| 520 |
|
開始タグの次の数文字は要素の<a href=#syntax-tag-name title=syntax-tag-name>タグ名</a>でなければ[[MUST:なりません]]。 |
| 521 |
|
|
| 522 |
|
#en |
| 523 |
|
If there are to be any attributes in the next step, there must |
| 524 |
|
first be one or more <a href=#space-character title="space character">space |
| 525 |
|
characters</a>. |
| 526 |
|
#ja |
| 527 |
|
次の段階で属性が存在する場合には、まず1文字以上の<a href=#space-character title="space character">間隔文字</a>がなければ[[MUST:なりません]]。 |
| 528 |
|
|
| 529 |
|
#en |
| 530 |
|
Then, the start tag may have a number of attributes, the <a href=#syntax-attributes title=syntax-attributes>syntax for which</a> is described |
| 531 |
|
below. Attributes may be separated from each other by one or more |
| 532 |
|
<a href=#space-character title="space character">space characters</a>. |
| 533 |
|
#ja |
| 534 |
|
その後、開始タグは後述の<a href=#syntax-attributes title=syntax-attributes>構文</a>に沿った数々の属性を持って[[MAY:構いません]]。 |
| 535 |
|
属性は1つ以上の<a href=#space-character title="space character">間隔文字</a>で互いに分離して[[MAY:構いません]]。 |
| 536 |
|
|
| 537 |
|
#en |
| 538 |
|
After the attributes, there may be one or more <a href=#space-character title="space character">space characters</a>. (Some attributes |
| 539 |
|
are required to be followed by a space. See the <a href=#syntax-attributes title=syntax-attributes>attributes section</a> below.) |
| 540 |
|
#ja |
| 541 |
|
属性の後に、1文字以上の<a href=#space-character title="space character">間隔文字</a>があって[[MAY:構いません]]。 |
| 542 |
|
(いくつかの属性の後には間隔が[[REQUIRED:必須]]です。後述の<a href=#syntax-attributes title=syntax-attributes>属性の節</a>をご覧ください。) |
| 543 |
|
|
| 544 |
|
#en |
| 545 |
|
Then, if the element is one of the <a href=#void-elements>void elements</a>, |
| 546 |
|
or if the element is a foreign element, then there may be a single |
| 547 |
|
U+002F SOLIDUS (<code>/</code>) character. This character has no |
| 548 |
|
effect on void elements, but on foreign elements it marks the start |
| 549 |
|
tag as self-closing. |
| 550 |
|
#ja |
| 551 |
|
要素が<a href=#void-elements>空隙要素</a>の1つである場合や、 |
| 552 |
|
要素が外来要素である場合、 U+002F SOLIDUS (<code>/</code>) 文字が1つあっても[[MAY:構いません]]。 |
| 553 |
|
この文字は空隙要素にあっては何の効果もありませんが、 |
| 554 |
|
外来要素にあっては開始タグを自己閉塞と印付けします。 |
| 555 |
|
|
| 556 |
|
#en |
| 557 |
|
Finally, start tags must be closed by a U+003E GREATER-THAN |
| 558 |
|
SIGN (<code>></code>) character. |
| 559 |
|
#ja |
| 560 |
|
最後に、開始タグは U+003E GREATER-THAN |
| 561 |
|
SIGN (<code>></code>) もjいで閉じなければ[[MUST:なりません]]。 |
| 562 |
|
|
| 563 |
|
#pattern |
| 564 |
|
<span class=secno>* </span>End tags |
| 565 |
|
#ja |
| 566 |
|
<span class=secno>$1 </span>終了タグ |
| 567 |
|
|
| 568 |
|
#en |
| 569 |
|
<dfn id=syntax-end-tags title=syntax-end-tags>End tags</dfn> must have the |
| 570 |
|
following format: |
| 571 |
|
#ja |
| 572 |
|
<dfn id=syntax-end-tags title=syntax-end-tags>終了タグ</dfn>は次の書式でなければ[[MUST:なりません]]。 |
| 573 |
|
|
| 574 |
|
#en |
| 575 |
|
The first character of an end tag must be a U+003C LESS-THAN |
| 576 |
|
SIGN (<code><</code>). |
| 577 |
|
#ja |
| 578 |
|
終了タグの最初の文字は U+003C LESS-THAN |
| 579 |
|
SIGN (<code><</code>) でなければ[[MUST:なりません]]。 |
| 580 |
|
|
| 581 |
|
#en |
| 582 |
|
The second character of an end tag must be a U+002F SOLIDUS |
| 583 |
|
(<code>/</code>). |
| 584 |
|
#ja |
| 585 |
|
終了タグの2番目の文字は U+002F SOLIDUS |
| 586 |
|
(<code>/</code>) でなければ[[MUST:なりません]]。 |
| 587 |
|
|
| 588 |
|
#en |
| 589 |
|
The next few characters of an end tag must be the element's |
| 590 |
|
<a href=#syntax-tag-name title=syntax-tag-name>tag name</a>. |
| 591 |
|
#ja |
| 592 |
|
終了タグの次の数文字は要素の<a href=#syntax-tag-name title=syntax-tag-name>タグ名</a>でなければ[[MUST:なりません]]。 |