HTML4 構造木

HTMLの要素たちの関係(どの要素がどの要素に含むことが許されるか)は“HTML要素”を親とする入れ子で表すことができ、次のとおりである。

HTML === (%html.content;)



(%html.content;) --+-- HEAD ==+== (%head.content;)
                   |          |
                   |          +== +(%head.misc;)
                   |
                   +-- BODY ==+== (%block;)+
                              |
                              +== (SCRIPT)+ === %Script



(%head.content;) --+-- TITLE ==+== (#PCDATA)-(%head.misc;)
                   |
                   +-- (BASE)? === EMPTY



(%head.misc;) --+-- SCRIPT === %Script;
                |
                +-- STYLE === %Stylesheet
                |
                +-- META === (EMPTY)
                |
                +-- LINK === (EMPTY)
                |
                +-- OBJECT === OBJECT ==+== (PARAM)*
                                        |
                                        +== (%flow;)*



%flow; ---+--- %block; --+-- P === (%inline;)*
          |              |
          |              |
          |              +-- (%heading;) --- "H1 | H2 | H3 | H4 | H5 | H6" === (%inline;)*
          |              |
          |              |
          |              +-- (%list;) --+-- UL === LI+ === (%flow:)*
          |              |              |
          |              |              +-- OL === LI+ === (%flow;)*
          |              |
          |              |
          |              +-- (%preformatted;) -- PRE === (%inline;)*
          |              |
          |              |
          |              +-- DL ==+== DT+ === (%inline;)*
          |              |        |
          |              |        +== DD+ === (%flow;)*
          |              |
          |              |
          |              +-- DIV === (%flow;)*
          |              |
          |              |
          |              +-- NOSCRIPT === (%block;)+
          |              |
          |              |
          |              +-- BLOCKQUOTE ==+== (%block;)+
          |              |                |
          |              |                +== SCRIPT+ === %Script; 
          |              |
          |              |
          |              +-- FORM ==+== (%block;)+
          |              |          |
          |              |          +== SCRIPT+ === %Script;
          |              |
          |              |
          |              +-- HR === (EMPTY)
          |              |
          |              |
          |              +-- TABLE ==+== CAPTION? ==== (%inline;)*
          |              |           |
          |              |           +== COL* ======== (EMPTY)
          |              |           |
          |              |           +== COLGROUP* === COL*
          |              |           |
          |              |           +== THEAD? ====== TR+ === (TH | TD)+ === (%flow;)*
          |              |           |
          |              |           +== TFOOT? ====== TR+ === (TH | TD)+ === (%flow;)*
          |              |           |
          |              |           +== TBODY+ ====== TR+ === (TH | TD)+ === (%flow;)*
          |              |
          |              |
          |              +-- FIELDSET ==+== (#PCDATA,LEGEND,(%flow;)*)
          |              |                             |
          |              |                             +== (%inline;)* 
          |              |
          |              |
          |              +-- ADDRESS ==+== (%inline;)*
          |
          |
          |
          |
          +--- %inline; --+-- #PCDATA
                          |
                          +-- (%fontstyle;) --- "TT | I | B | BIG | SMALL" === (%inline;)*
                          |
                          |
                          +-- (%phrase;) --- "EM | STRONG | DFN | CODE |
                          |                   SAMP | KBD | VAR | CITE |
                          |                   ABBR | ACRONYM" ================ (%inline;)*
                          |
                          |
                          +--- (%special;) --+-- A === (%inline;)*
                          |                  |
                          |                  +-- IMG === (EMPTY)
                          |                  |
                          |                  +-- OBJECT ==+== (PARAM)*
                          |                  |            |
                          |                  |            +== (%flow;)*
                          |                  |
                          |                  +-- BR === (EMPTY)
                          |                  |
                          |                  +-- SCRIPT === %Script;
                          |                  |
                          |                  +-- MAP ==+== (%block;)+
                          |                  |         |
                          |                  |         +== (AREA)+ === (EMPTY)
                          |                  |
                          |                  +-- Q === (%inline;)*
                          |                  |
                          |                  +-- SUB === (%inline;)*
                          |                  |
                          |                  +-- SUP === (%inline;)*
                          |                  |
                          |                  +-- SPAN === (%inline;)*
                          |                  |
                          |                  +-- BDO === (%inline)*
                          |
                          |
                          +-- (%formctrl;) --+-- INPUT === (EMPTY)
                                             |
                                             +-- SELECT ==+== (OPTGROUP)+
                                             |            |       |
                                             |            +== (OPTION)+ === (#PCDATA)
                                             |
                                             +-- TEXTAREA === (#PCDATA)
                                             |
                                             +-- LABEL === (%inline;)*
                                             |
                                             +-- BUTTON === (%flow;)*-(A|%formctrl;|FORM|FIELDSET)

Leave a Reply