HTML The Definitive Guide (147 page)

Read HTML The Definitive Guide Online

Authors: Chuck Musciano Bill Kennedy

BOOK: HTML The Definitive Guide
6.84Mb size Format: txt, pdf, ePub

Appendix A

HTML Grammar

 

A.2 The Grammar

The grammar is a composite of the HTML 4.0 standard tags and special extensions to the language as enabled by the latest versions of NCSA Mosaic, Netscape Communication's Netscape Navigator, and Microsoft's Internet Explorer.

The rules are in alphabetical order. The starting rule for an entire document is named
html_document
.

a_tag

::=

{
a_content
}0


a_content
[
1
]

::=
heading

|

text

abbr_tag

::=
text

acronym_tag

::=
text

address_tag

::=


{
address_content
}0


address_content

::=
p_tag

|

text

applet_content

::= {}0

body_content

applet_tag

::=

applet_content


b_tag

::=
text

basefont_tag

::=

body_content


bdo_tag

::=
text

big_tag

::=
text

blink_tag

::=
text

block

::= {
block_content
}0

block_content

::=

|

basefont_tag

|

blockquote_tag

|

center_tag

|

dir_tag

|

div_tag

|

dl_tag

|

form_tag

|

listing_tag

|

menu_tag

|

multicol_tag

|

nobr_tag

|

ol_tag

|

p_tag

|

pre_tag

|

table_tag

|

ul_tag

|

xmp_tag

blockquote_tag

::=


body_content


body_content

::=

|



|

address_tag

|

block

|

del_tag

|

heading

|

ins_tag

|

layer_tag

|

map_tag

|

marquee_tag

|

text

body_tag

::=

{
body_content
}0


caption_tag

::=

body_content


center_tag

::=


body_content


cite_tag

::=
text

code_tag

::=
text

colgroup_content
::= {}0

colgroup_tag

::=

colgroup_content

content_style

::=
abbr_tag

|

acronym_tag

|

cite_tag

|

code_tag

|

dfn_tag

|

em_tag

|

kbd_tag

|

kbd_tag

|

q_tag

|

strong_tag

|

var_tag

dd_tag

::=


flow


del_tag

::=

flow


dfn_tag

::=
text

dir_tag
[
2
]

::=


{
li_tag
}


div_tag

::=


body_content


dl_content

::=
dt_tag
dd_tag

dl_tag

::=


{
dl_content
}


dt_tag

::=


text


em_tag

::=
text

fieldset_tag

::=


[ legend_tag ]

{
form_content
}0


flow

::= {
flow_content
}0

flow_content

::=
block

|

text

font_tag

::=
style_text

form_content
[
3
]

::=

|


|

body_content

|

fieldset_tag

|

label_tag

|

select_tag

|

textarea_tag

form_tag

::=


{
form_content
}0


frameset_content
::= |

noframes_tag

frameset_tag

::=

{
frameset_content
}0


h1_tag

::=
text

h2_tag

::=
text

h3_tag

::=
text

h4_tag

::=
text

h5_tag

::=
text

h6_tag

::=
text

head_content

::=

|


|


|


|


|

style_tag

|

title_tag

head_tag

::=

{
head_content
}0


heading

::=
h1_tag

|

h2_tag

|

h3_tag

|

h4_tag

|

h5_tag

|

h6_tag

html_content

::=
head_tag body_tag

|

head_tag frameset_tag

html_document

::=
html_tag

html_tag

::=

html_content


i_tag

::=
text

ilayer_tag

::=

body_content


ins_tag

::=

flow


kbd_tag

::=
text

label_content
[4]

::=

|

body_content

|

select_tag

|

textarea_tag

form_tag

::=


{
form_content
}0


layer_tag

::=

body_content


legend_tag

::=
text

li_tag

::=


  • flow


  • listing_tag

    ::=


    literal_text


    map_content

    ::= {}0

    map_tag

    ::=

    map_content


    marquee_tag

    ::=

    style_text


    menu_tag
    [
    5
    ]

    ::=


    {
    li_tag
    }0


    multicol_tag

    ::=

    body_content


    nobr_tag

    ::=
    text

    noembed_tag

    ::= <br/><i>text<br/></i>
    noframes_tag

    ::= <br/></p><p>{<br/><i>body_content<br/></i>}0<br/></p><p>

    noscript_tag

    ::=
    object_content

    ::= {}0

    body_content

    object_tag

    ::=

    object_content


    ol_tag

    ::=


      {
      li_tag
      }


    optgroup_tag

    ::=

    {
    option_tag
    }0


    option_tag

    ::=

    plain_text


    p_tag

    ::=


    text


    physical_style

    ::=
    b_tag

    |

    bdo_tag

    |

    big_tag

    |

    blink_tag

    |

    font_tag

    |

    i_tag

    |

    s_tag

    |

    small_tag

    |

    span_tag

    |

    strike_tag

    |

    sub_tag

    |

    sup_tag

    |

    tt_tag

    |

    u_tag

    pre_content

    ::=

    |



    |

    a_tag

    |

    style_text

    pre_tag

    ::=


    {
    pre_content
    }0


    q_tag

    ::=
    text

    s_tag

    ::=
    text

    samp_tag

    ::=
    text

    script_tag
    [6]

    ::=
    select_content

    ::=
    optgroup_tag

    |

    option_tag

    select_tag

    ::=

    server_tag
    [
    7
    ]

    ::=
    plain_text

    small_tag

    ::=
    text

    span_tag

    ::=
    text

    strike_tag

    ::=
    text

    strong_tag

    ::=
    text

    style_tag

    ::=
    sub_tag

    ::=
    text

    sup_tag

    ::=
    text

    table_cell

    ::=
    td_tag

    |

    th_tag

    table_content

    ::=

    |


    |


    |

    tr_tag

    table_tag

    ::=


    [
    caption_tag
    ]

    {
    colgroup_tag
    }0

    {
    table_content
    }0


    td_tag

    ::=

    body_content


    text

    ::= {
    text_content
    }0

    text_content

    ::=

    |


    |