#pattern
* The HTML syntax
#ja
$1 HTML 構文
#pattern
* Writing HTML documents
#ja
$1 HTML 文書を書く
#en
This section only applies to documents, authoring tools, and markup
generators. In particular, it does not apply to conformance checkers;
conformance checkers must use the requirements given in the next section
("parsing HTML documents").
#ja
この節は文書、著述ツール、マーク付け生成器にのみ適用されます。
特に、適合性検査器には適用されません。
適合性検査器は次の節 (「HTML 文書の構文解析」) で与えられる要件を用いなければ[[MUST:なりません]]。
#en
Documents must consist of the following parts, in the given order:
#ja
文書は、次に示す部分により、次の順序で構成されなければ[[MUST:なりません]]。
#en
Optionally, a single U+FEFF BYTE ORDER MARK (BOM) character.
#ja
任意選択で、1つの U+FEFF BYTE ORDER MARK (BOM) 文字。
#en
Any number of comments
and space characters.
#ja
任意の個数の注釈と間隔文字。
#en
A DOCTYPE.
#ja
DOCTYPE。
#en
The root element, in the form of an html element.
#ja
根要素を html 要素の形で。
#en
The various types of content mentioned above are described in the next
few sections.
#ja
前述の各種の内容は、次の数個の節で説明します。
#en
In addition, there are some restrictions on how character encoding
declarations are to be serialized, as discussed in the section on
that topic.
#ja
加えて、文字符号化宣言をどう直列化するかについても、
それに関する節で説明した通り、いくつかの制限があります。
#en
Space characters before the root html
element, and space characters at the start of the html element and before the head element, will be dropped when the document
is parsed; space characters after the root html element will be parsed as if they were at
the end of the body element. Thus,
space characters around the root element do not round-trip.
#ja
根 html 要素の前の間隔文字や、
html 要素のはじめで head 要素の前の間隔文字は、
文書が構文解析される時に除去されます。根 html 要素の後の間隔文字は、
body 要素の終わりにあったものとして構文解析されます。
従って、根要素の近辺の間隔文字は往復しません。
#en
It is suggested that newlines be inserted after the DOCTYPE, after any
comments that are before the root element, after the html element's start tag (if it is not omitted), and after any
comments that are inside the html
element but before the head element.
#ja
DOCTYPE の後、
根要素の前の注釈がある場合はその後、
html 要素の開始タグの後
(省略しない場合)、
html 要素中で
head 要素の前に注釈がある場合にはその後には、
改行を挿入することをおすすめします。
#en
Many strings in the HTML syntax (e.g. the names of elements and their
attributes) are case-insensitive, but only for characters in the ranges
U+0041 .. U+005A (LATIN CAPITAL LETTER A to LATIN CAPITAL LETTER Z) and
U+0061 .. U+007A (LATIN SMALL LETTER A to LATIN SMALL LETTER Z). For
convenience, in this section this is just referred to as
"case-insensitive".
#ja
HTML 構文中の多くの文字列 (例えば要素や属性の名前) は大文字と小文字を区別しませんが、
区別しないのは範囲
U+0041 ~ U+005A (LATIN CAPITAL LETTER A ~ LATIN CAPITAL LETTER Z) と
範囲 U+0061 ~ U+007A (LATIN SMALL LETTER A ~ LATIN SMALL LETTER Z)
の文字についてのみです。便宜上、この節ではこれを単に「大文字・小文字を区別しない」と呼びます。
#pattern
* The DOCTYPE
#ja
$1 DOCTYPE
#en
A DOCTYPE is a mostly
useless, but required, header.
#ja
DOCTYPE はほとんど無意味ですが、
[[REQUIRED:必須]]の頭部です。
#en
DOCTYPEs are required for legacy reasons. When omitted,
browsers tend to use a different rendering mode that is incompatible with
some specifications. Including the DOCTYPE in a document ensures that the
browser makes a best-effort attempt at following the relevant
specifications.
#ja
DOCTYPE は遺物的な理由で[[REQUIRED:必須]]です。
省略すると、ブラウザはいくつかの仕様書と非互換な異なるレンダリング・モードを使おうとします。
DOCTYPE を文書に含めることによってブラウザに関係する仕様書に従うよう最善の努力を試みさせるようにします。
#en
A DOCTYPE must consist of the following characters, in this order:
#ja
DOCTYPE は、次の文字により次の順序で構成されなければ[[MUST:なりません]]。
#en
A U+003C LESS-THAN SIGN (<) character.
#ja
U+003C LESS-THAN SIGN (<) 文字。
#en
A U+0021 EXCLAMATION MARK (!) character.
#ja
U+0021 EXCLAMATION MARK (!) 文字。
#en
A U+0044 LATIN CAPITAL LETTER D or U+0064 LATIN SMALL LETTER D
character.
#ja
U+0044 LATIN CAPITAL LETTER D 文字か U+0064 LATIN SMALL LETTER D 文字。
#en
A U+004F LATIN CAPITAL LETTER O or U+006F LATIN SMALL LETTER O
character.
#ja
U+004F LATIN CAPITAL LETTER O 文字か U+006F LATIN SMALL LETTER O 文字。
#en
A U+0043 LATIN CAPITAL LETTER C or U+0063 LATIN SMALL LETTER C
character.
#ja
U+0043 LATIN CAPITAL LETTER C 文字か U+0063 LATIN SMALL LETTER C 文字。
#en
A U+0054 LATIN CAPITAL LETTER T or U+0074 LATIN SMALL LETTER T
character.
#ja
U+0054 LATIN CAPITAL LETTER T 文字か U+0074 LATIN SMALL LETTER T 文字。
#en
A U+0059 LATIN CAPITAL LETTER Y or U+0079 LATIN SMALL LETTER Y
character.
#ja
U+0059 LATIN CAPITAL LETTER Y 文字か U+0079 LATIN SMALL LETTER Y 文字。
#en
A U+0050 LATIN CAPITAL LETTER P or U+0070 LATIN SMALL LETTER P
character.
#ja
U+0050 LATIN CAPITAL LETTER P 文字か U+0070 LATIN SMALL LETTER P 文字。
#en
A U+0045 LATIN CAPITAL LETTER E or U+0065 LATIN SMALL LETTER E
character.
#ja
U+0045 LATIN CAPITAL LETTER E 文字か U+0065 LATIN SMALL LETTER E 文字。