×

[PR]この広告は3ヶ月以上更新がないため表示されています。
ホームページを更新後24時間以内に表示されなくなります。

14. DTDの読み方(要素編の復習)

これまで出て来た要素のDTD(要素部分のみ)を示す。頑張って読んでみよう。

<!--=================== Text Elements ====================================-->

<!ENTITY % special.pre "br | span | bdo | map">
<!ENTITY % special "%special.pre; | object | img ">
<!ENTITY % fontstyle "tt | i | b | big | small ">
<!ENTITY % phrase "em | strong | dfn | code | q |
                   samp | kbd | var | cite | abbr | acronym | sub | sup ">
<!ENTITY % inline "a | %special; | %fontstyle; | %phrase; | %inline.forms;">
<!ENTITY % Inline "(#PCDATA | %inline; | %misc.inline;)*">

<!--================== Block level elements ==============================-->
<!ENTITY % heading "h1|h2|h3|h4|h5|h6">
<!ENTITY % block
     "p | %heading; | div | %lists; | %blocktext; | fieldset | table">
<!ENTITY % Block "(%block; | form | %misc;)*">

<!--================ Document Structure ==================================-->
<!ELEMENT html (head, body)>

<!--================ Document Head =======================================-->
<!ENTITY % head.misc "(script | style | meta | link | object)*">

<!ELEMENT head (%head.misc;,
                ((title, %head.misc;, (base, %head.misc;)?) |
                (base, %head.misc;, (title, %head.misc;))))>
<!ELEMENT title (#PCDATA)>
<!ELEMENT meta EMPTY>

<!--=================== Document Body ====================================-->
<!ELEMENT body %Block;>

<!--=================== Paragraphs =======================================-->
<!ELEMENT p %Inline;>

<!--=================== Headings =========================================-->
<!ELEMENT h1  %Inline;>
<!ELEMENT h2 %Inline;>
<!ELEMENT h3 %Inline;>
<!ELEMENT h4 %Inline;>
<!ELEMENT h5 %Inline;>
<!ELEMENT h6 %Inline;>

<!--===================== Inline Elements ================================-->
<!ELEMENT br EMPTY>   <!-- forced line break -->
<!ELEMENT em %Inline;>   <!-- emphasis -->
<!ELEMENT strong %Inline;>   <!-- strong emphasis -->
<!ELEMENT dfn %Inline;>   <!-- definitional -->
<!ELEMENT code %Inline;>   <!-- program code -->
<!ELEMENT samp %Inline;>   <!-- sample -->
<!ELEMENT kbd %Inline;>  <!-- something user would type -->
<!ELEMENT var %Inline;>   <!-- variable -->
<!ELEMENT cite %Inline;>   <!-- citation -->
<!ELEMENT abbr %Inline;>   <!-- abbreviation -->
<!ELEMENT acronym %Inline;>   <!-- acronym -->
<!ELEMENT q %Inline;>   <!-- inlined quote -->
<!ELEMENT sub %Inline;> <!-- subscript -->
<!ELEMENT sup %Inline;> <!-- superscript -->

ページの先頭に戻る


Copyright © 2006 御隠居 (滄洲). All Rights Reserved.