您的位置:寻梦网首页编程乐园HTML园地HTML 4.0 参考文献

前页 | 后页 | 目录 | 元素 | 特性

文档类型定义

<!--
   ?This is an EXPERIMENTAL version of HTML 4.0 that
   ?extends HTML 3.2 to add support for proposals under review by
   ?the W3C HTML Working Group, including style sheets, scripting,
   ?the object tag, internationalization and some extensions to
   ?forms for improved accessibility by people with disabilities.
   ?The frame tags have been added in acknowledgement of their
   ?widespread deployment.

    牋?Draft: $Date: 1998/07/08 10:47:55 $

    牋?Authors:
       ?Dave Raggett <dsr@w3.org>
       ?Arnaud Le Hors <lehors@w3.org>

   ?This is work in progress, subject to change at any time.
   ?It does not imply endorsement by, or the consensus of,
   ?either W3C or members of the HTML working group. Further
   ?information about HTML 4.0 is available at:

    牋?http://www.w3.org/TR/WD-html40-970708/.
-->
<!ENTITY %?A NAME="HTML.Version">HTML.Version "http://www.w3.org/TR/WD-html40-970708/HTML4.dtd"
?-- Typical usage:



牋?<!DOCTYPE HTML SYSTEM "http://www.w3.org/TR/WD-html40-970708/HTML4.dtd">
牋?<html>
牋?...
牋?</html>
?--
>

<!--================== Imported Names ====================================-->

<!ENTITY %?A NAME="ContentType">ContentType "CDATA"
牋?-- an Internet media type, as per [RFC2045]
 |?-->

<!ENTITY %?A NAME="URL">URL "CDATA"
牋?-- a Uniform Resource Locator,
    see [RFC1808] and [RFC1738]
 |?-->

<!ENTITY %?A NAME="Script">Script "CDATA" -- scriptlet -->

<!-- Parameter Entities -->

<!ENTITY %?A NAME="head.misc">head.misc "SCRIPT|STYLE|META|LINK" -- repeatable head elements -->

<!ENTITY %?A NAME="heading">heading "H1|H2|H3|H4|H5|H6">

<!ENTITY %?A NAME="list">list "UL | OL |?DIR | MENU">

<!ENTITY %?A NAME="preformatted">preformatted "PRE">

<!--================ Character mnemonic entities =========================-->

<!ENTITY %?A NAME="HTMLlat1">HTMLlat1 PUBLIC
牋 "-//W3C//ENTITIES Latin1//EN//HTML">
%HTMLlat1;

<!ENTITY %?A NAME="HTMLsymbol">HTMLsymbol PUBLIC
牋 "-//W3C//ENTITIES Symbols//EN//HTML">
%HTMLsymbol;

<!ENTITY %?A NAME="HTMLspecial">HTMLspecial PUBLIC
牋 "-//W3C//ENTITIES Special//EN//HTML">
%HTMLspecial;

<!--=================== Generic Attributes ===============================-->

<!ENTITY %?A NAME="coreattrs">coreattrs
?id    ?ID     #IMPLIED?-- document-wide unique id --
?class    CDATA牋牋?#IMPLIED?-- space separated list of classes --
?style    CDATA牋牋?#IMPLIED?-- associated style info --
?title    CDATA牋牋?#IMPLIED?-- advisory title/amplification --"
?>

<!ENTITY %?A NAME="i18n">i18n
?lang   ?NAME    #IMPLIED?-- [RFC1766] language value --
?dir     (ltr|rtl)?#IMPLIED?-- direction for weak/neutral text --"
?>

<!ENTITY %?A NAME="events">events
?onclick牋牋 %Script |?#IMPLIED?-- the pointing device button was clicked --
?ondblclick?%Script |?#IMPLIED?-- the pointing device button was double clicked --
?onmousedown %Script |?#IMPLIED?-- the pointing device button was pressed down --
?onmouseup%Script |?#IMPLIED?-- the pointing device button was released --
?onmouseover %Script |?#IMPLIED?-- the pointing device was moved over --
?onmousemove %Script |?#IMPLIED?-- the pointing device was moved --
?onmouseout?%Script |?#IMPLIED?-- the pointing device was moved away --

?onkeypress?%Script |?#IMPLIED?-- a key was pressed and released --
?onkeydown%Script |?#IMPLIED?-- a key was pressed down --
?onkeyup牋牋 %Script |?#IMPLIED?-- a key was released --"
?>


<!ENTITY %?A NAME="attrs">attrs "%coreattrs %i18n %events">

<!ENTITY %?A NAME="align">align "align (left|center|right|justify)?#IMPLIED"
        牋 -- default is left for ltr paragraphs, right for rtl --
?>

<!--=================== Text Markup ======================================-->

<!ENTITY %?A NAME="font">font
?TT | I | B | U | S | STRIKE | BIG | SMALL">

<!ENTITY %?A NAME="phrase">phrase "EM | STRONG | DFN | CODE |
        牋 SAMP | KBD | VAR | CITE | ACRONYM">

<!ENTITY %?A NAME="special">special
牋 "A | IMG | APPLET | OBJECT | FONT | BASEFONT | BR | SCRIPT |
牋?MAP | Q | SUB | SUP | SPAN | BDO | IFRAME">

<!ENTITY %?A NAME="formctrl">formctrl "INPUT | SELECT | TEXTAREA | LABEL | BUTTON">

<!-- %inline covers inline or "text-level" elements -->
<!ENTITY %?A NAME="inline">inline "#PCDATA | %font | %phrase | %special | %formctrl">

<!ELEMENT (%font|%phrase) - - (%inline)*>
<!ATTLIST (%font|%phrase)
?%attrs; |           ?-- %coreattrs, %i18n, %events --
?>

<!-- subscripts and superscripts -->
<!ELEMENT (SUB|SUP) - - (%inline)*>
<!ATTLIST (SUB|SUP)
?%attrs; |           ?-- %coreattrs, %i18n, %events --
?>

<!ELEMENT SPAN - - (%inline)*牋牋 -- generic language/style container -->
<!ATTLIST SPAN
?%attrs; |           ?-- %coreattrs, %i18n, %events --
?>

<!-- INS/DEL are handled by inclusion on BODY -->
<!ELEMENT (INS|DEL) - - (%inline)* -- inserted/deleted text -->
<!ATTLIST (INS|DEL)
?%attrs |             -- %coreattrs, %i18n, %events --
?cite   ?%URL |牋?#IMPLIED牋 -- info on reason for change --
?datetime牋?CDATA牋牋 #IMPLIED牋 -- when changed: ISO date format --
?>

<!ELEMENT BDO - - (%inline)*牋牋?-- I18N BiDi over-ride -->
<!ATTLIST BDO
?lang   ?NAME    #IMPLIED?-- [RFC1766] language value --
?dir     (ltr|rtl)?#REQUIRED -- directionality --
?>

<!ELEMENT BASEFONT - O EMPTY>
<!ATTLIST BASEFONT
?size?/TT>    CDATA牋牋?#REQUIRED -- base font size for FONT elements --
?color    CDATA牋牋?#IMPLIED?-- #RRGGBB in hex, e.g. red: "#FF0000" --
?face   ?CDATA牋牋?#IMPLIED?-- comma separated list of font names --
?>

<!ELEMENT FONT - - (%inline)*牋 -- local change to font -->
<!ATTLIST FONT
?size   ?CDATA牋牋?#IMPLIED?-- [+]nn e.g. size="+1", size=4 --
?color    CDATA牋牋?#IMPLIED?-- #RRGGBB in hex, e.g. red: "#FF0000" --
?face   ?CDATA牋牋?#IMPLIED?-- comma separated list of font names --
?>

<!ELEMENT BR - O EMPTY    ?-- forced line break -->
<!ATTLIST BR
?%coreattrs; |        牋?-- id, class, style, title --
?clear (left|all|right|none) none -- control of text flow --
?>

<!--================== HTML content models ===============================-->

<!--
牋?HTML has two basic content models:

   ?%inline |牋 character level elements and text strings
   ?%block |牋?block-like elements e.g. paragraphs and lists
-->

<!ENTITY %?A NAME="blocklevel">blocklevel
牋牋 "P | %heading | %list | %preformatted | DL | DIV | CENTER |
牋牋?NOSCRIPT | NOFRAMES | BLOCKQUOTE | FORM | ISINDEX | HR |
牋牋?TABLE | FIELDSET | ADDRESS">

<!--=================== Document Body ====================================-->

<!ENTITY %?A NAME="block">block "(%blocklevel | %inline)*">

<!ENTITY %?A NAME="Color">Color "CDATA" -- a color using sRGB: #RRGGBB as Hex values -->

<!-- There are also 16 widely known color names with their sRGB values:

牋?Black?= #000000牋?Green?= #008000
牋?Silver = #C0C0C0牋?Lime牋 = #00FF00
牋?Gray牋 = #808080牋?Olive?= #808000
牋?White?= #FFFFFF牋?Yellow = #FFFF00
牋?Maroon = #800000牋?Navy牋 = #000080
牋?Red牋?= #FF0000牋?Blue牋 = #0000FF
牋?Purple = #800080牋?Teal牋 = #008080
牋?Fuchsia= #FF00FF牋?Aqua牋 = #00FFFF
?->

<!ENTITY %?A NAME="bodycolors">bodycolors "
?bgcolor %Color #IMPLIED
?text?%Color | #IMPLIED
?link?%Color | #IMPLIED
?vlink %Color | #IMPLIED
?alink %Color | #IMPLIED
?">

<!ELEMENT BODY O O?(%block) -(BODY) +(INS|DEL)>
<!ATTLIST BODY
?%attrs; |           ?-- %coreattrs, %i18n, %events --
?background?%URL |牋牋 #IMPLIED?-- texture tile for document background --
?%bodycolors; |        牋 -- bgcolor, text, link, vlink, alink --
?onload牋牋?%Script |?#IMPLIED?-- the document has been loaded --
?onunload牋?%Script |?#IMPLIED?-- the document has been removed --
?>

<!ELEMENT ADDRESS - - ((%inline;) | P)*>
<!ATTLIST ADDRESS
?%attrs; |           ?-- %coreattrs, %i18n, %events --
?>

<!ELEMENT DIV - - %block>
<!ATTLIST DIV
?%attrs; |           ?-- %coreattrs, %i18n, %events --
?%align; |           ?-- align, text alignment --
?>

<!-- CENTER is a shorthand for DIV with ALIGN=CENTER -->
<!ELEMENT CENTER - - %block>
<!ATTLIST CENTER
?%attrs; |           ?-- %coreattrs, %i18n, %events --
?>

<!--================== The Anchor Element ================================-->

<!ENTITY %?A NAME="Shape">Shape "(rect|circle|poly|default)">
<!ENTITY %?A NAME="Coords">Coords "CDATA" -- comma separated list of numbers -->

<!ELEMENT A - - (%inline)* -(A)>
<!ATTLIST A
?%attrs; |           ?-- %coreattrs, %i18n, %events --
?charset牋牋 CDATA牋牋?#IMPLIED?-- char encoding of linked resource --
?name   ?CDATA牋牋?#IMPLIED?-- named link end --
?href   ?%URL |牋牋 #IMPLIED?-- URL for linked resource --
?target牋牋?CDATA牋牋?#IMPLIED?-- where to render resource --
?rel     CDATA牋牋?#IMPLIED?-- forward link types --
?rev     CDATA牋牋?#IMPLIED?-- reverse link types --
?accesskey牋 CDATA牋牋?#IMPLIED?-- accessibility key character --
?shape    %Shape |牋 rect牋牋?-- for use with OBJECT SHAPES --
?coords牋牋?%Coords |?#IMPLIED?-- for use with OBJECT SHAPES --
?tabindex牋?NUMBER牋牋 #IMPLIED?-- position in tabbing order --
?>

<!--================== Client-side image maps ============================-->

<!-- These can be placed in the same document or grouped in a
牋牋 separate document although this isn't yet widely supported -->

<!ELEMENT MAP - - (AREA)*>
<!ATTLIST MAP
?%coreattrs; |        牋?-- id, class, style, title --
?name   ?CDATA牋牋 #IMPLIED
?>

<!ELEMENT AREA - O EMPTY>
<!ATTLIST AREA
?shape    %Shape |?rect牋牋?-- controls interpretation of coords --
?coords牋牋?%Coords | #IMPLIED?-- comma separated list of values --
?href   ?%URL |牋?#IMPLIED?-- this region acts as hypertext link --
?target牋牋?CDATA牋牋 #IMPLIED?-- where to render linked resource --?
?nohref牋牋?(nohref)?#IMPLIED?-- this region has no action --
?alt     CDATA牋牋 #REQUIRED -- description for text only browsers --
?tabindex牋?NUMBER牋?#IMPLIED?-- position in tabbing order --
?>

<!--================== The LINK Element ==================================-->

<!--
?Relationship values can be used in principle:

牋 a) for document specific toolbars/menus when used
牋牋?with the LINK element in document head e.g.
   ?start, contents, previous, next, index, end, help
牋 b) to link to a separate style sheet (rel=stylesheet)
牋 c) to make a link to a script (rel=script)
牋 d) by stylesheets to control how collections of
牋牋?html nodes are rendered into printed documents
牋 e) to make a link to a printable version of this document
牋牋?e.g. a postscript or pdf version (rel=print)
-->

<!ELEMENT LINK - O EMPTY>
<!ATTLIST LINK
?%attrs; |           ?-- %coreattrs, %i18n, %events --
?href   ?%URL |牋牋 #IMPLIED?-- URL for linked resource --
?rel     CDATA牋牋?#IMPLIED?-- forward link types --
?rev     CDATA牋牋?#IMPLIED?-- reverse link types --
?type牋?%ContentType?#IMPLIED?-- advisory Internet content type --
?media    CDATA牋牋?#IMPLIED?-- for rendering on these media --
?target牋牋?CDATA牋牋?#IMPLIED?-- where to render linked resource --
?>

<!--=================== Images ===========================================-->

<!ENTITY %?A NAME="Length">Length "CDATA" -- nn for pixels or nn% for percentage length -->
<!ENTITY %?A NAME="Pixels">Pixels "CDATA" -- integer representing length in pixels -->

<!ENTITY %?A NAME="IAlign">IAlign "(top|middle|bottom|left|right)"?-- center? -->

<!-- To avoid problems with text-only UAs you need to provide
牋牋 a description with ALT, and avoid server-side image maps -->
<!ELEMENT IMG - O EMPTY牋牋?--?Embedded image -->
<!ATTLIST IMG
?%attrs; |           ?-- %coreattrs, %i18n, %events --
?src     %URL |牋牋 #REQUIRED -- URL of image to embed --
?alt     CDATA牋牋?#IMPLIED?-- description for text only browsers --
?align    %IAlign |?#IMPLIED?-- vertical or horizontal alignment --
?height牋牋?%Pixels |?#IMPLIED?-- suggested height in pixels --
?width    %Pixels |?#IMPLIED?-- suggested width in pixels --
?border牋牋?%Pixels |?#IMPLIED?-- suggested link border width --
?hspace牋牋?%Pixels |?#IMPLIED?-- suggested horizontal gutter --
?vspace牋牋?%Pixels |?#IMPLIED?-- suggested vertical gutter --
?usemap牋牋?%URL |牋牋 #IMPLIED?-- use client-side image map --
?ismap    (ismap)牋?#IMPLIED?-- use server-side image map --
?>

<!-- USEMAP points to a MAP element which may be in this document
?or an external document, although the latter is not widely supported -->

<!--==================== OBJECT tag ======================================-->
<!-- PARAM elements should precede other content. SGML mixed content model
?technicality precludes specifying this formally ...
-->

<!ENTITY %?A NAME="OAlign">OAlign "(texttop|middle|textmiddle|baseline|
            牋牋 textbottom|left|center|right)">

<!ELEMENT OBJECT - - (PARAM | %block)*>
<!ATTLIST OBJECT
?%attrs |             -- %coreattrs, %i18n, %events --
?declare牋牋 (declare)?#IMPLIED?-- declare but don't instantiate flag --
?classid牋牋 %URL |牋牋 #IMPLIED?-- identifies an implementation --
?codebase牋?%URL |牋牋 #IMPLIED?-- some systems need an additional URL --
?data   ?%URL |牋牋 #IMPLIED?-- reference to object's data --
?type牋牋 %ContentType #IMPLIED?-- Internet content type for data --
?codetype %ContentType #IMPLIED?-- Internet content type for code --
?standby牋牋 CDATA牋牋?#IMPLIED?-- message to show while loading --
?align    %OAlign |?#IMPLIED?-- positioning inside document --
?height牋牋?%Length |?#IMPLIED?-- suggested height --
?width    %Length |?#IMPLIED?-- suggested width --
?border牋牋?%Length |?#IMPLIED?-- suggested link border width --
?hspace牋牋?%Length |?#IMPLIED?-- suggested horizontal gutter --
?vspace牋牋?%Length |?#IMPLIED?-- suggested vertical gutter --
?usemap牋牋?%URL |牋牋 #IMPLIED?-- reference to image map --
?shapes牋牋?(shapes)牋 #IMPLIED?-- object has shaped hypertext links --
?name   ?%URL |牋牋 #IMPLIED?-- submit as part of form --
?tabindex牋?NUMBER牋牋 #IMPLIED?-- position in tabbing order --
?>

<!ELEMENT PARAM - O EMPTY    -- named property value -->
<!ATTLIST PARAM
?name   ?CDATA牋牋?#REQUIRED -- property name --
?value    CDATA牋牋?#IMPLIED?-- property value --
?valuetype (DATA|REF|OBJECT) DATA -- How to interpret value --
?type   ?CDATA牋牋?#IMPLIED?-- Internet media type --
?>

<!--=================== Java APPLET tag ==================================-->
<!--
?One of code or object attributes must be present.
?Place PARAM elements before other content.
-->
<!ELEMENT APPLET - - (PARAM | %inline)*>
<!ATTLIST APPLET
?codebase牋?%URL |牋牋 #IMPLIED牋 -- optional base URL for applet --
?archive牋牋 CDATA牋牋?#IMPLIED牋 -- comma separated archive list --
?code   ?CDATA牋牋?#IMPLIED牋 -- applet class file --
?object牋牋?CDATA牋牋?#IMPLIED牋 -- serialized applet file --
?alt     CDATA牋牋?#IMPLIED牋 -- description for text only browsers --
?name   ?CDATA牋牋?#IMPLIED牋 -- allows applets to find each other --
?width    %Pixels |?#REQUIRED?-- suggested width in pixels --
?height牋牋?%Pixels |?#REQUIRED?-- suggested height in pixels --
?align    %IAlign |?#IMPLIED牋 -- vertical or horizontal alignment --
?hspace牋牋?%Pixels |?#IMPLIED牋 -- suggested horizontal gutter --
?vspace牋牋?%Pixels |?#IMPLIED牋 -- suggested vertical gutter --
?>

<!--=================== Horizontal Rule ==================================-->

<!ELEMENT HR - O EMPTY>
<!ATTLIST HR
?%coreattrs; |        牋?-- id, class, style, title --
?%events;
?align (left|right|center) #IMPLIED
?noshade牋牋 (noshade)?#IMPLIED
?size   ?%Pixels |?#IMPLIED
?width    %Length |?#IMPLIED
?>

<!--=================== Paragraphs =======================================-->

<!ELEMENT P - O (%inline)*>
<!ATTLIST P
?%attrs; |           ?-- %coreattrs, %i18n, %events --
?%align; |           ?-- align, text alignment --
?>

<!--=================== Headings =========================================-->

<!--
?There are six levels of headings from H1 (the most important)
?to H6 (the least important).
-->

<!ELEMENT (%heading)?- -?(%inline;)*>
<!ATTLIST (%heading)
?%attrs; |           ?-- %coreattrs, %i18n, %events --
?%align; |           ?-- align, text alignment --
?>

<!--=================== Preformatted Text ================================-->

<!-- excludes markup for images and changes in font size -->
<!ENTITY %?A NAME="pre.exclusion">pre.exclusion "IMG|BIG|SMALL|SUB|SUP|FONT">

<!ELEMENT PRE - - (%inline)* -(%pre.exclusion)>
<!ATTLIST PRE
?%attrs; |           ?-- %coreattrs, %i18n, %events --
?width    NUMBER牋牋 #IMPLIED
?>

<!--===================== Inline Quotes ==================================-->

<!ELEMENT Q - - (%inline)*>
<!ATTLIST Q
?%attrs; |           ?-- %coreattrs, %i18n, %events --
?cite   ?%URL |牋牋 #IMPLIED?-- URL for source document or msg --
?>

<!--=================== Block-like Quotes ================================-->

<!ELEMENT BLOCKQUOTE - - %block>
<!ATTLIST BLOCKQUOTE
?%attrs; |           ?-- %coreattrs, %i18n, %events --
?cite   ?%URL |牋牋 #IMPLIED?-- URL for source document or msg --
?>

<!--=================== Lists ============================================-->

<!-- definition lists - DT for term, DD for its definition -->

<!ELEMENT DL - -?(DT|DD)+>
<!ATTLIST DL
?%attrs; |           ?-- %coreattrs, %i18n, %events --
?compact牋牋 (compact)?#IMPLIED?-- reduced interitem spacing --
?>

<!ELEMENT DT - O?(%inline)*>
<!ELEMENT DD - O?%block>
<!ATTLIST (DT|DD)
?%attrs |           ?-- %coreattrs, %i18n, %events --
?>

<!-- Ordered lists (OL) Numbering style

牋?1牋 arablic numbers牋牋 1, 2, 3, ...
牋?a牋 lower alpha     a, b, c, ...
牋?A牋 upper alpha     A, B, C, ...
牋?i牋 lower roman     i, ii, iii, ...
牋?I牋 upper roman     I, II, III, ...

牋?The style is applied to the sequence number which by default
牋?is reset to 1 for the first list item in an ordered list.

牋?This can't be expressed directly in SGML due to case folding.
-->

<!ENTITY %?A NAME="OLStyle">OLStyle "CDATA"牋牋?-- constrained to: [1|a|A|i|I] -->

<!ELEMENT OL - -?(LI)+>
<!ATTLIST OL -- ordered lists --
?%attrs; |           ?-- %coreattrs, %i18n, %events --
?type   ?%OLStyle | #IMPLIED?-- numbering style --
?compact牋牋 (compact)?#IMPLIED?-- reduced interitem spacing --
?start    NUMBER牋牋 #IMPLIED?-- starting sequence number --
?>

<!-- Unordered Lists (UL) bullet styles -->
<!ENTITY %?A NAME="ULStyle">ULStyle "disc|square|circle">

<!ELEMENT UL - -?(LI)+>
<!ATTLIST UL        牋?-- unordered lists --
?%attrs; |           ?-- %coreattrs, %i18n, %events --
?type   ?(%ULStyle) #IMPLIED?-- bullet style --
?compact牋牋 (compact)?#IMPLIED?-- reduced interitem spacing --
?>

<!ELEMENT (DIR|MENU) - -?(LI)+ -(%blocklevel)>
<!ATTLIST DIR
?%attrs; |           ?-- %coreattrs, %i18n, %events --
?compact牋牋 (compact)?#IMPLIED
?>
<!ATTLIST MENU
?%attrs; |           ?-- %coreattrs, %i18n, %events --
?compact牋牋 (compact)?#IMPLIED
?>

<!-- <DIR>    牋牋?Directory list        ?-->
<!-- <DIR COMPACT>牋牋?Compact list style    牋牋?-->
<!-- <MENU>    牋牋 Menu list            -->
<!-- <MENU COMPACT>牋牋 Compact list style    牋牋?-->

<!-- The type attribute can be used to change the bullet style
牋牋 in unordered lists and the numbering style in ordered lists -->

<!ENTITY %?A NAME="LIStyle">LIStyle "CDATA" -- constrained to: "(%ULStyle|%OLStyle)" -->

<!ELEMENT LI - O %block -- list item -->
<!ATTLIST LI
?%attrs; |           ?-- %coreattrs, %i18n, %events --
?type   ?%LIStyle | #IMPLIED?-- list item style --
?value    NUMBER牋牋 #IMPLIED?-- reset sequence number --
?>


<!--================ Forms ===============================================-->
<!ELEMENT FORM - - %block -(FORM)>
<!ATTLIST FORM
?%attrs; |           ?-- %coreattrs, %i18n, %events --
?action牋牋?%URL |牋牋 #REQUIRED -- server-side form handler --
?method牋牋?(GET|POST) GET    -- HTTP method used to submit the form --
?enctype牋牋 %ContentType; "application/x-www-form-urlencoded"
?onsubmit牋?%Script |?#IMPLIED?-- the form was submitted --
?onreset牋牋 %Script |?#IMPLIED?-- the form was reset --
?target牋牋?CDATA牋牋?#IMPLIED?-- where to render result --
?accept-charset CDATA牋 #IMPLIED?-- list of supported charsets --
?>

<!-- Each label must not contain more than ONE field -->
<!ELEMENT LABEL - - (%inline)* -(LABEL) -- field label text -->
<!ATTLIST LABEL
?%attrs; |           ?-- %coreattrs, %i18n, %events --
?for     IDREF牋牋?#IMPLIED?-- matches field ID value --
?disabled牋?(disabled) #IMPLIED?-- control is unavailable in this context --
?accesskey牋 CDATA牋牋?#IMPLIED?-- accessibility key character --
?onfocus牋牋 %Script |?#IMPLIED?-- the element got the focus --
?onblur牋牋?%Script |?#IMPLIED?-- the element lost the focus --
?>

<!ENTITY %?A NAME="InputType">InputType
?"(TEXT | PASSWORD | CHECKBOX |
牋?RADIO | SUBMIT | RESET |
牋?FILE | HIDDEN | IMAGE | BUTTON)"
牋 >

<!-- HSPACE and VSPACE missing due to lack of widespread support -->
<!ELEMENT INPUT - O EMPTY>
<!ATTLIST INPUT
?%attrs; |           ?-- %coreattrs, %i18n, %events --
?type牋牋?%InputType | TEXT牋牋?-- what kind of widget is needed --
?name   ?CDATA牋牋?#IMPLIED?-- required for all but submit & reset --
?value    CDATA牋牋?#IMPLIED?-- required for radio and checkboxes --
?checked牋 (checked)牋?#IMPLIED?-- for radio buttons and check boxes --
?disabled?(disabled)牋 #IMPLIED?-- control is unavailable in this context --
?readonly?(readonly)牋 #IMPLIED?-- for text and passwd --
?size   ?CDATA牋牋?#IMPLIED?-- specific to each type of field --
?maxlength牋 NUMBER牋牋 #IMPLIED?-- max chars for text fields --
?src     %URL |牋牋 #IMPLIED?-- for fields with images --
?alt     CDATA牋牋?#IMPLIED?-- description for text only browsers --
?usemap牋牋?%URL |牋牋 #IMPLIED?-- use client-side image map --
?align    %IAlign |?#IMPLIED?-- vertical or horizontal alignment --
?tabindex牋?NUMBER牋牋 #IMPLIED?-- position in tabbing order --
?onfocus牋牋 %Script |?#IMPLIED?-- the element got the focus --
?onblur牋牋?%Script |?#IMPLIED?-- the element lost the focus --
?onselect牋?%Script |?#IMPLIED?-- some text was selected --
?onchange牋?%Script |?#IMPLIED?-- the element value was changed --
?accept牋牋?CDATA牋牋?#IMPLIED?-- list of MIME types for file upload --
?>

<!ELEMENT SELECT - - (OPTION+)>
<!ATTLIST SELECT
?%attrs; |           ?-- %coreattrs, %i18n, %events --
?name   ?CDATA牋牋?#REQUIRED -- field name --
?size   ?NUMBER牋牋 #IMPLIED?-- rows visible --
?multiple?(multiple)牋 #IMPLIED?-- default is single selection --
?disabled?(disabled)牋 #IMPLIED?-- control is unavailable in this context --
?tabindex牋?NUMBER牋牋 #IMPLIED?-- position in tabbing order --
?onfocus牋牋 %Script |?#IMPLIED?-- the element got the focus --
?onblur牋牋?%Script |?#IMPLIED?-- the element lost the focus --
?onselect牋?%Script |?#IMPLIED?-- some text was selected --
?onchange牋?%Script |?#IMPLIED?-- the element value was changed --
?>

<!ELEMENT OPTION - O (#PCDATA)*>
<!ATTLIST OPTION
?%attrs; |           ?-- %coreattrs, %i18n, %events --
?selected?(selected)牋 #IMPLIED
?disabled?(disabled)牋 #IMPLIED?-- control is unavailable in this context --
?value    CDATA牋牋?#IMPLIED?-- defaults to element content --
?>

<!-- Multi-line text input field. -->
<!ELEMENT TEXTAREA - - (#PCDATA)*>
<!ATTLIST TEXTAREA
?%attrs; |           ?-- %coreattrs, %i18n, %events --
?name   ?CDATA牋牋?#REQUIRED
?rows   ?NUMBER牋牋 #REQUIRED
?cols   ?NUMBER牋牋 #REQUIRED
?disabled?(disabled)牋 #IMPLIED?-- control is unavailable in this context --
?readonly?(readonly)牋 #IMPLIED
?tabindex牋?NUMBER牋牋 #IMPLIED?-- position in tabbing order --
?onfocus牋牋 %Script |?#IMPLIED?-- the element got the focus --
?onblur牋牋?%Script |?#IMPLIED?-- the element lost the focus --
?onselect牋?%Script |?#IMPLIED?-- some text was selected --
?onchange牋?%Script |?#IMPLIED?-- the element value was changed --
?>

<!--
?#PCDATA is to solve the mixed content problem,
?per specification only whitespace is allowed there!
?->
<!ELEMENT FIELDSET - - (#PCDATA,LEGEND,%block)>
<!ATTLIST FIELDSET
?%attrs; |           ?-- %coreattrs, %i18n, %events --
?>

<!ELEMENT LEGEND - - (%inline;)+>
<!ENTITY %?A NAME="LAlign">LAlign "(top|bottom|left|right)">

<!ATTLIST LEGEND    牋?-- fieldset legend --
?%attrs; |           ?-- %coreattrs, %i18n, %events --
?align    %LAlign; | #IMPLIED?-- relative to fieldset --
?accesskey牋 CDATA牋牋?#IMPLIED?-- accessibility key character --
?>

<!ELEMENT BUTTON - -
牋牋 (%inline | %blocklevel)* -(A | %formctrl | FORM | ISINDEX | FIELDSET)>
<!ATTLIST BUTTON
?%attrs; |           ?-- %coreattrs, %i18n, %events --
?name   ?CDATA牋牋?#IMPLIED?-- for scripting/forms as submit button --
?value    CDATA牋牋?#IMPLIED?-- gets passed to server when submitted --
?type牋?(submit|reset) #IMPLIED?-- for use as form submit/reset button --
?disabled牋 (disabled)?#IMPLIED?-- control is unavailable in this context --
?tabindex牋?NUMBER牋牋 #IMPLIED?-- position in tabbing order --
?onfocus牋牋 %Script |?#IMPLIED?-- the element got the focus --
?onblur牋牋?%Script |?#IMPLIED?-- the element lost the focus --
?>


<!--======================= Tables =======================================-->

<!-- IETF HTML table standard, see [RFC1942] -->

<!--
燭he BORDER attribute sets the thickness of the frame around the
爐able. The default units are screen pixels.

燭he FRAME attribute specifies which parts of the frame around
爐he table should be rendered. The values are not the same as
燙ALS to avoid a name clash with the VALIGN attribute.

燭he value "border" is included for backwards compatibility with
?lt;TABLE BORDER> which yields frame=border and border=implied
燜or <TABLE BORDER=1> you get border=1 and frame=implied. In this
燾ase, it is appropriate to treat this as frame=border for backwards
燾ompatibility with deployed browsers.
-->
<!ENTITY %?A NAME="TFrame">TFrame "(void|above|below|hsides|lhs|rhs|vsides|box|border)">

<!--
燭he RULES attribute defines which rules to draw between cells:

營f RULES is absent then assume:
牋牋 "none" if BORDER is absent or BORDER=0 otherwise "all"
-->

<!ENTITY %?A NAME="TRules">TRules "(none | groups | rows | cols | all)">
牋
<!-- horizontal placement of table relative to document -->
<!ENTITY %?A NAME="TAlign">TAlign "(left|center|right)">

<!-- horizontal alignment attributes for cell contents -->
<!ENTITY %?A NAME="cellhalign">cellhalign
?"align (left|center|right|justify|char) #IMPLIED
牋 char    CDATA牋牋?#IMPLIED?-- alignment char, e.g. char=':' --
牋 charoff牋?CDATA牋牋?#IMPLIED?-- offset for alignment char --"
?>

<!-- vertical alignment attributes for cell contents -->
<!ENTITY %?A NAME="cellvalign">cellvalign
?"valign (top|middle|bottom|baseline) #IMPLIED"
?>

<!ELEMENT TABLE - - (CAPTION?, (COL*|COLGROUP*), THEAD?, TFOOT?, TBODY+)>
<!ELEMENT CAPTION - - (%inline;)+>
<!ELEMENT THEAD - O (TR+)>
<!ELEMENT TFOOT - O (TR+)>
<!ELEMENT TBODY O O (TR+)>
<!ELEMENT COLGROUP - O (col*)>

<!ELEMENT COL - O EMPTY>
<!ELEMENT TR - O (TH|TD)+>
<!ELEMENT (TH|TD) - O %block>

<!ATTLIST TABLE         -- table element --
?%attrs; |           ?-- %coreattrs, %i18n, %events --
?align    %TAlign; | #IMPLIED?-- table position relative to window --
?bgcolor牋牋 %Color |牋 #IMPLIED?-- background color for cells --
?width    CDATA牋牋?#IMPLIED?-- table width relative to window --
?cols   ?NUMBER牋牋 #IMPLIED?-- used for immediate display mode --
?border牋牋?CDATA牋牋?#IMPLIED?-- controls frame width around table --
?frame    %TFrame; | #IMPLIED?-- which parts of table frame to include --
?rules    %TRules; | #IMPLIED?-- rulings between rows and cols --
?cellspacing CDATA牋牋?#IMPLIED?-- spacing between cells --
?cellpadding CDATA牋牋?#IMPLIED?-- spacing within cells --
?>

<!ENTITY %?A NAME="CAlign">CAlign "(top|bottom|left|right)">

<!ATTLIST CAPTION        -- table caption --
?%attrs; |           ?-- %coreattrs, %i18n, %events --
?align    %CAlign; | #IMPLIED?-- relative to table --
?>

<!--
COLGROUP groups a set of COL elements. It allows you to group
several columns together.
-->
<!ATTLIST COLGROUP
?%attrs; |           ?-- %coreattrs, %i18n, %events --
?span   ?NUMBER牋牋 1     -- default number of columns in group --
?width    CDATA牋牋?#IMPLIED?-- default width for enclosed COLs --
?%cellhalign; |        牋 -- horizontal alignment in cells --
?%cellvalign; |        牋 -- vertical alignment in cells --
?>

<!--
燙OL elements define the alignment properties for cells in a given
燾olumn or spanned columns. The WIDTH attribute specifies the
爓idth of the columns, e.g.

牋牋 width=64   ?width in screen pixels
牋牋 width=0.5*牋牋?relative width of 0.5
-->
<!ATTLIST COL        牋 -- column groups and properties --
?%attrs; |           ?-- %coreattrs, %i18n, %events --
?span   ?NUMBER牋牋 1     -- number of columns spanned by group --
?width    CDATA牋牋?#IMPLIED?-- column width specification --
?%cellhalign; |        牋 -- horizontal alignment in cells --
?%cellvalign; |        牋 -- vertical alignment in cells --
?>

<!--
牋?Use THEAD to duplicate headers when breaking table
牋?across page boundaries, or for static headers when
牋?TBODY sections are rendered in scrolling panel.

牋?Use TFOOT to duplicate footers when breaking table
牋?across page boundaries, or for static footers when
牋?TBODY sections are rendered in scrolling panel.

牋?Use multiple TBODY sections when rules are needed
牋?between groups of table rows.
-->
<!ATTLIST (THEAD|TBODY|TFOOT)牋 -- table section --
?%attrs; |           ?-- %coreattrs, %i18n, %events --
?%cellhalign; |        牋 -- horizontal alignment in cells --
?%cellvalign; |        牋 -- vertical alignment in cells --
?>

<!ATTLIST TR        牋?-- table row --
?%attrs; |           ?-- %coreattrs, %i18n, %events --
?%cellhalign; |        牋 -- horizontal alignment in cells --
?%cellvalign; |        牋 -- vertical alignment in cells --
?bgcolor牋牋 %Color |牋 #IMPLIED?-- background color for row --
?>

<!ATTLIST (TH|TD)        -- header or data cell --
?%attrs; |           ?-- %coreattrs, %i18n, %events --
?axis   ?CDATA牋牋?#IMPLIED?-- defaults to cell content --
?axes   ?CDATA牋牋?#IMPLIED?-- list of axis names --
?nowrap牋牋?(nowrap)牋 #IMPLIED?-- suppress word wrap --
?bgcolor牋牋 %Color |牋 #IMPLIED?-- cell background color --
?rowspan牋牋 NUMBER牋牋 1     -- number of rows spanned by cell --
?colspan牋牋 NUMBER牋牋 1     -- number of cols spanned by cell --
?%cellhalign; |        牋 -- horizontal alignment in cells --
?%cellvalign; |        牋 -- vertical alignment in cells --
?>

<!--================== Document Frames ===================================-->

<!ELEMENT FRAMESET - - ((FRAMESET|FRAME)+ & NOFRAMES?)>
<!ATTLIST FRAMESET
?-- absolute pixel values, percentages or relative scales. --
?rows   ?CDATA牋牋?#IMPLIED?-- if not given, default is 1 row --
?cols   ?CDATA牋牋?#IMPLIED?-- if not given, default is 1 column --
?onload牋牋?%Script |?#IMPLIED?-- all the frames have been loaded?--?
?onunload牋?%Script |?#IMPLIED?-- all the frames have been removed --?
?>

<!-- reserved frame names start with "_" otherwise starts with letter -->
<!ELEMENT FRAME - O EMPTY>
<!ATTLIST FRAME
?name   ?CDATA牋牋?#IMPLIED?-- name of frame for targetting --
?src     %URL |牋牋 #IMPLIED?-- source of frame content --
?frameborder (1|0)牋牋?1     -- request frame borders? --
?marginwidth %Pixels |?#IMPLIED?-- margin widths in pixels --
?marginheight %Pixels | #IMPLIED?-- margin height in pixels --
?noresize牋?(noresize) #IMPLIED?-- allow users to resize frames? --
?scrolling (yes|no|auto) auto牋牋 -- scrollbar or none --
?>

<!ELEMENT IFRAME - - %block>
<!ATTLIST IFRAME
?name   ?CDATA牋牋?#IMPLIED?-- name of frame for targetting --
?src     %URL |牋牋 #IMPLIED?-- source of frame content --
?frameborder (1|0)牋牋?1     -- request frame borders? --
?marginwidth %Pixels |?#IMPLIED?-- margin widths in pixels --
?marginheight %Pixels | #IMPLIED?-- margin height in pixels --
?scrolling (yes|no|auto) auto牋牋 -- scrollbar or none --
?align    %IAlign |?#IMPLIED?-- vertical or horizontal alignment --
?height牋牋?%Length |?#IMPLIED?-- suggested height --
?width    %Length |?#IMPLIED?-- suggested width --
?>

<!--
燭he following is quite complicated because of the mixed
燾ontent model. However it's actually only meant to contain
爀ither BODY or %block.
?->
<!ELEMENT NOFRAMES - -
?#PCDATA,((BODY,#PCDATA)|
    牋 (((%blocklevel)|%font|%phrase|%special|%formctrl),%block)))>

<!--================ Document Head =======================================-->
<!-- %head.misc defined earlier on as "SCRIPT | STYLE | META | LINK" -->
<!ENTITY %?A NAME="head.content">head.content "TITLE & ISINDEX? & BASE?">

<!ELEMENT HEAD O O?(%head.content) +(%head.misc)>
<!ATTLIST HEAD
?%i18n; |             -- lang, dir --
?profile牋牋 %URL |牋牋 #IMPLIED?-- named dictionary of meta info --
?>

<!ELEMENT TITLE - -?(#PCDATA)* -(%head.misc)
牋?-- The TITLE element is not considered part of the flow of text.
    It should be displayed, for example as the page header or
    window title. Exactly one title is required per document.
牋?-->
<!ATTLIST TITLE %i18n>

<!ELEMENT ISINDEX - O EMPTY>
<!ATTLIST ISINDEX
?%coreattrs; |        牋?-- id, class, style, title --
?%i18n; |             -- lang, dir --
?prompt牋牋?CDATA牋牋?#IMPLIED?-- prompt message -->

<!ELEMENT BASE - O EMPTY>
<!ATTLIST BASE
?href   ?%URL |牋牋 #REQUIRED
?target牋牋?CDATA牋牋?#IMPLIED?-- where to render linked resource --
?>

<!ELEMENT META - O EMPTY   ?-- Generic Metainformation -->
<!ATTLIST META
?%i18n; |             -- lang, dir, for use with content string --
?http-equiv?NAME    #IMPLIED?-- HTTP response header name?--
?name   ?NAME    #IMPLIED?-- metainformation name --
?content牋牋 CDATA牋牋?#REQUIRED -- associated information --
?scheme牋牋?CDATA牋牋?#IMPLIED?-- select form of content --
?>

<!ELEMENT STYLE - - CDATA牋牋?-- style info -->
<!ATTLIST STYLE
?%i18n; |             -- lang, dir, for use with title --
?type   ?CDATA牋牋?#REQUIRED -- Internet content type
                牋牋?for style language --
?media    CDATA牋牋?#IMPLIED?-- designed for use with these media --
?title    CDATA牋牋?#IMPLIED?-- advisory title --
?>

牋牋
<!ELEMENT SCRIPT - - CDATA牋牋?-- script statements -->
<!ATTLIST SCRIPT
?type   ?CDATA牋牋?#IMPLIED?-- Internet content type for
                牋牋?script language --
?language牋?CDATA牋牋?#IMPLIED?-- predefined script language name --
?src     %URL |牋牋 #IMPLIED?-- URL for an external script --
?>

<!ELEMENT NOSCRIPT - - (%block)>

<!--================ Document Structure ==================================-->
<!ENTITY %?A NAME="version">version "version CDATA #FIXED '%HTML.Version;>

<!ENTITY %?A NAME="html.content">html.content "HEAD, (FRAMESET|BODY)">

<!ELEMENT HTML O O (%html.content)>
<!ATTLIST HTML
?%version;
?%i18n; |             -- lang, dir --
?>

?前页 | 后页 | 目录 | 元素 | 特性