W3CNOTE-html-970421

HTML DTD with support for Style Sheets

W3C NOTE 21-April-1997

This version:
http://www.w3.org/pub/WWW/TR/NOTE-html-970324
Editor:
Dave Raggett, W3C

Status of this document

This document is a NOTE made available by the W3 Consortium as a small service to the community. This indicates no endorsement of its content, nor that the Consortium has, is, or will be allocating any resources to the issues addressed by the NOTE.

This document provides a document type definition (DTD) and accompanying resources for validating HTML documents conforming to the HTML 3.2 specification together with extensions for style sheets. It is offered in response to demands for help from the public, and provides an interim solution for people who want to use the existing HTML 3.2 and CSS1 Recommendations together. It will not become a Proposed Recomendation.

This document builds upon the HTML 3.2 specification [1], and WD-style [2] which specifies mechanisms for attaching style information to HTML documents in notations such as CSS1 [3]. W3C is continuing work on drafting a proposed recommendation for a new version of HTML, code named Cougar [4].


Introduction

This NOTE has been produced in response to people calling for way to validate documents that use style sheets but which otherwise conform to the HTML 3.2 specification. Enclosed are four components which you can extract for use with tools such as James Clark's nsgmls[5]:

html-970421.cat
An SGML Open catalog file that binds public and system identifiers to local file names.
html-970421.decl
The SGML Declaration defining the document character set etc.
html-970421.dtd
Document Type Definition that defines the syntax of HTML documents.
HTMLlat1.ent
Defines the Latin-1 named character entities imported by the DTD.

Validating HTML documents

This sections shows you how to use nsgmls. Another possibility would be to use one of the public validation services over the Web, or downloadable validation tools [6].

First create your HTML file which must start with the <!DOCTYPE> declaration, e.g.

<!DOCTYPE HTML PUBLIC
  "-//W3C//DTD HTML Experimental 970421//EN">
<title>A title</title>
<Para style="color: red">Hi Mom!

With the test file in the same directory as the four files named above, you can then validate your file as follows:

nsgmls -s -m htmls.cat htmls.decl test.html

 test.html:3:13:E: there is no attribute `STYLE'
 test.html:3:25:E: element `PARA' not allowed here
 test.html:3:25:E: element `PARA' undefined
 test.html:3:34:E: `HTML' not finished but document ended

This shows the output when you've absent mindedly typed "para" in place of "p" for a paragraph start tag. The "-s" option shows only the error messages, suppressing normal ouput. Correcting the above error then produces no output.

Note that it is unnecessary to include the HTML, HEAD or BODY elements as these can be safely omitted. The <!DOCTYPE> and TITLE on the otherhand are essential.


The Catalog file (html-970421.cat)

PUBLIC "ISO 8879-1986//ENTITIES Added Latin 1//EN//HTML" HTMLlat1.ent
PUBLIC "-//W3C//DTD HTML Experimental 970421//EN" html-970421.dtd

The SGML Declaration (html-970421.decl)

<!SGML  "ISO 8879:1986"
   --
        SGML Declaration for HTML 3.2 + style

        With support for ISO Latin-1 and increased limits
        for tag and literal lengths etc.
   --

   CHARSET
         BASESET  "ISO 646:1983//CHARSET
                   International Reference Version
                   (IRV)//ESC 2/5 4/0"
         DESCSET  0   9   UNUSED
                  9   2   9
                  11  2   UNUSED
                  13  1   13
                  14  18  UNUSED
                  32  95  32
                  127 1   UNUSED
         BASESET  "ISO Registration Number 100//CHARSET
                   ECMA-94 Right Part of
                   Latin Alphabet Nr. 1//ESC 2/13 4/1"
         DESCSET  128  32   UNUSED
                  160  96    32

   CAPACITY   SGMLREF
              TOTALCAP        200000
              GRPCAP          150000
              ENTCAP          150000

   SCOPE    DOCUMENT
   SYNTAX
      SHUNCHAR CONTROLS 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
              17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 127
      BASESET  "ISO 646:1983//CHARSET
                International Reference Version
                (IRV)//ESC 2/5 4/0"
      DESCSET  0 128 0

      FUNCTION
              RE            13
              RS            10
              SPACE         32
              TAB SEPCHAR    9

      NAMING   LCNMSTRT ""
               UCNMSTRT ""
               LCNMCHAR ".-"
               UCNMCHAR ".-"
               NAMECASE GENERAL YES
                        ENTITY  NO
      DELIM    GENERAL  SGMLREF
               SHORTREF SGMLREF
      NAMES    SGMLREF
      QUANTITY SGMLREF
               ATTSPLEN 30000
               LITLEN   30000
               NAMELEN  239
               PILEN    30000
               TAGLVL   100
               TAGLEN   30000
               GRPGTCNT 150
               GRPCNT   64

   FEATURES
     MINIMIZE
       DATATAG  NO
       OMITTAG  YES
       RANK     NO
       SHORTTAG YES
     LINK
       SIMPLE   NO
       IMPLICIT NO
       EXPLICIT NO
     OTHER
       CONCUR   NO
       SUBDOC   NO
       FORMAL   YES
   APPINFO      NONE
>

The HTML 3.2 + Style DTD (html-970421.dtd)

<!--
      W3C Document Type Definition for the HyperText Markup Language
      This version is code named Wilbur with Style

          Draft: April 21st 1997

      Author of original HTML 3.2 DTD: Dave Raggett <dsr@w3.org>

      WD-style updates by:
                Chris Lilley <chris@w3.org>
                Dave Raggett <dsr@w3.org>

      This Experimental HTML DTD adds support for Style Sheets,
      as defined in WD-Style, to the HTML 3.2 DTD: ID, CLASS and
      STYLE attributes on most elements, and the SPAN element.
  -->

  <!ENTITY % HTML.Version
      "-//W3C//DTD HTML Experimental 970421//EN"

      -- Typical usage:

      <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML Experimental 970421//EN">
      <html>
      ...
      </html>
      --
  >

  <!--================== Deprecated Features Switch ======================-->

  <!ENTITY % HTML.Deprecated "INCLUDE">

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

  <!ENTITY % Content-Type "CDATA"
      -- meaning a MIME content type, as per RFC1521
      -->

  <!ENTITY % HTTP-Method "GET | POST"
      -- as per HTTP specification
      -->

  <!ENTITY % URL "CDATA"
      -- The term URL means a CDATA attribute
         whose value is a Uniform Resource Locator,
         See RFC1808 (June 95) and RFC1738 (Dec 94).
      -->

  <!-- Parameter Entities -->

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

  <!ENTITY % heading "H1|H2|H3|H4|H5|H6">

  <!ENTITY % list "UL | OL |  DIR | MENU">

  <![ %HTML.Deprecated [
      <!ENTITY % preformatted "PRE | XMP | LISTING">
  ]]>

  <!ENTITY % preformatted "PRE">

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

  <!ENTITY % ISOlat1 PUBLIC
         "ISO 8879-1986//ENTITIES Added Latin 1//EN//HTML">
  %ISOlat1;

  <!--================ Entities for special symbols ======================-->
  <!-- &trade and &cbsp are not widely deployed and so not included here -->

  <!ENTITY copy   CDATA "&#169"   -- copyright sign     -->
  <!ENTITY reg    CDATA "&#174"   -- registered sign    -->
  <!ENTITY amp    CDATA "&#38;"   -- ampersand      -->
  <!ENTITY gt     CDATA "&#62;"   -- greater than       -->
  <!ENTITY lt     CDATA "&#60;"   -- less than      -->
  <!ENTITY quot   CDATA "&#34;"   -- double quote       -->
  <!ENTITY nbsp   CDATA "&#160;"  -- non breaking space -->

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

  <!ENTITY % font "TT | I | B  | U | STRIKE | BIG | SMALL | SUB | SUP">

  <!ENTITY % phrase "EM | STRONG | DFN | CODE | SAMP | KBD | VAR | CITE">

  <!ENTITY % special "A|IMG|APPLET|BASEFONT|FONT|BR|SCRIPT|MAP|SPAN">

  <!ENTITY % form "INPUT | SELECT | TEXTAREA">

  <!ENTITY % text "#PCDATA | %font | %phrase | %special | %form">

  <!ENTITY % style
     "id      ID       #IMPLIED  -- document wide unique id --
      class   CDATA    #IMPLIED  -- comma list of class values --
      style   CDATA    #IMPLIED  -- associated style info --">

  <!ELEMENT (%font|%phrase) - - (%text)*>
  <!ATTLIST (%font|%phrase) %style;>

  <!-- there are also 16 widely known color names although
    the resulting colors are implementation dependent:

     aqua, black, blue, fuchsia, gray, green, lime, maroon,
     navy, olive, purple, red, silver, teal, white, and yellow

   These colors were originally picked as being the standard
   16 colors supported with the Windows VGA palette.
   -->

  <!-- use span when other text-level elements are inappropriate -->
  <!ELEMENT SPAN - - (%text)*     -- generic language/style container -->
  <!ATTLIST SPAN %style; >

  <!ELEMENT FONT - - (%text)*     -- 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: color="#FF0000" --
      %style;
      >

  <!ELEMENT BASEFONT - O EMPTY    -- base font size (1 to 7)-->
  <!ATTLIST BASEFONT
      size    CDATA   #IMPLIED    -- e.g. size=3 --
      >

  <!ELEMENT BR    - O EMPTY   -- forced line break -->
  <!ATTLIST BR
      clear (left|all|right|none) none -- control of text flow --
      %style;
      >

  <!--================== HTML content models =============================-->
  <!--
      HTML has three basic content models:

      %text       character level elements and text strings
      %flow       block-like elements e.g. paragraphs and lists
      %bodytext   as %flow plus headers and ADDRESS
  -->

  <!ENTITY % block
       "P | %list | %preformatted | DL | DIV | CENTER |
        BLOCKQUOTE | FORM | ISINDEX | HR | TABLE">

  <!-- %flow is used for DD and LI -->

  <!ENTITY % flow "(%text | %block)*">

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

  <!ENTITY % body.content "(%heading | %text | %block | ADDRESS)*">

  <!ENTITY % color "CDATA" -- a color specification: #RRGGBB in hex -->

  <!ENTITY % body-color-attrs "
      bgcolor %color #IMPLIED
      text %color #IMPLIED
      link %color #IMPLIED
      vlink %color #IMPLIED
      alink %color #IMPLIED
      ">

  <!ELEMENT BODY O O  %body.content>
  <!ATTLIST BODY
      background %URL #IMPLIED  -- texture tile for document background --
      %body-color-attrs;  -- bgcolor, text, link, vlink, alink --
      %style;
      >

  <!ENTITY % address.content "((%text;) | P)*">

  <!ELEMENT ADDRESS - - %address.content>
  <!ATTLIST ADDRESS %style; >

  <!ELEMENT DIV - - %body.content>
  <!ATTLIST DIV
      align   (left|center|right) #IMPLIED -- alignment of following text --
      %style;
      >

  <!-- CENTER is a shorthand for DIV with ALIGN=CENTER -->
  <!ELEMENT center - - %body.content>

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

  <!ELEMENT A - - (%text)* -(A)>
  <!ATTLIST A
      name    CDATA   #IMPLIED    -- named link end --
      href    %URL    #IMPLIED    -- URL for linked resource --
      rel     CDATA   #IMPLIED    -- forward link types --
      rev     CDATA   #IMPLIED    -- reverse link types --
      title   CDATA   #IMPLIED    -- advisory title string --
      %style;
      >

  <!--================== 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 -->

  <!ENTITY % SHAPE "(rect|circle|poly)">
  <!ENTITY % COORDS "CDATA" -- comma separated list of numbers -->

  <!ELEMENT MAP - - (AREA)*>
  <!ATTLIST MAP
      name    CDATA   #IMPLIED
      >

  <!ELEMENT AREA - O EMPTY>
  <!ATTLIST AREA
      shape   %SHAPE  rect
      coords  %COORDS #IMPLIED  -- defines coordinates for shape --
      href    %URL    #IMPLIED  -- this region acts as hypertext link --
      nohref (nohref) #IMPLIED  -- this region has no action --
      alt     CDATA   #REQUIRED -- needed for non-graphical user agents --
      >

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

  <!ENTITY % Types "CDATA"
      -- LINK has been part of HTML since the early days
         although few browsers as yet take advantage of it.

         Relationship values can be used in principle:

          a) for document specific toolbars/menus when used
             with the LINK element in document head:
          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/pdf version (rel=alternate media=print)
  -->
  <!ENTITY % MEDIA
          "(print|screen|projection|braille|aural|all)"
    --
    Media values define the intended rendering medium for a style
    sheet or other resource. It shouldn't be confused with the data
    format used to encode that resource.
    -->

  <!ELEMENT LINK - O EMPTY>
  <!ATTLIST LINK
      href    %URL    #IMPLIED    -- URL for linked resource --
      rel     %Types  #IMPLIED    -- forward link types --
      rev     %Types  #IMPLIED    -- reverse link types --
      media   %MEDIA  all         -- intended rendering medium --
      title   CDATA   #IMPLIED    -- advisory title string --
      >

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

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

  <!-- Suggested widths are used for negotiating image size
       with the module responsible for painting the image.
       align=left or right cause image to float to margin
       and for subsequent text to wrap around image -->

  <!ENTITY % IAlign "(top|middle|bottom|left|right)">

  <!ELEMENT IMG    - O EMPTY --  Embedded image -->
  <!ATTLIST IMG
      src     %URL     #REQUIRED  -- URL of image to embed --
      alt     CDATA    #IMPLIED   -- for display in place of image --
      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 image map --
      %style;
      >

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

  <!--=================== Java APPLET tag ================================-->
  <!--
    This tag is supported by all Java enabled browsers. CODEBASE specifies
    the base URL of the applet - the directory that contains the applet's
    code. If this attribute is missing the documents base URL is used
    instead. One of CODE or OBJECT must be present. Archive files speed
    loading of applets through a compressed wrapper for applet resources.
    The ALT attribute gives text to display if the browser understands
    the APPLET tag but can't run Java applets. WIDTH, HEIGHT, ALIGN,
    HSPACE and VSPACE are defined in the same way as for IMG elements.
  -->
  <!ELEMENT APPLET - - (PARAM | %text)*>
  <!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   -- for display in place of applet --
      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 --
      >

  <!ELEMENT PARAM - O EMPTY>
  <!ATTLIST PARAM
      name    NMTOKEN   #REQUIRED  -- The name of the parameter --
      value   CDATA     #IMPLIED   -- The value of the parameter --
      >

  <!--
  Here is an example:

      <applet codebase="applets/NervousText"
      code=NervousText.class
      width=300
      height=50>
      <param name=text value="Java is Cool!">
      <img src=sorry.gif alt="This looks better with Java support">
      </applet>
  -->

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

  <!ELEMENT HR    - O EMPTY>
  <!ATTLIST HR
      align (left|right|center) #IMPLIED
      noshade (noshade) #IMPLIED
      size  %Pixels #IMPLIED
      width %Length #IMPLIED
      %style;
      >
  <!--=================== Paragraphs======================================-->

  <!ELEMENT P     - O (%text)*>
  <!ATTLIST P
      align  (left|center|right) #IMPLIED
      %style;
      >

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

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

  <!ELEMENT ( %heading )  - -  (%text;)*>
  <!ATTLIST ( %heading )
      align  (left|center|right) #IMPLIED
      %style;
      >

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

  <!-- excludes images and changes in font size to preserve column alignment -->

  <!ENTITY % pre.exclusion "IMG|BIG|SMALL|SUB|SUP|FONT">

  <!ELEMENT PRE - - (%text)* -(%pre.exclusion)>
  <!ATTLIST PRE
      width NUMBER #implied -- is this widely supported? --
      %style;
      >

  <![ %HTML.Deprecated [

  <!ENTITY % literal "CDATA"
      -- historical, non-conforming parsing mode where
         the only markup signal is the end tag
         in full
      -->

  <!ELEMENT (XMP|LISTING) - -  %literal>
  <!ELEMENT PLAINTEXT - O %literal>

  ]]>

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

  <!ELEMENT BLOCKQUOTE - - %body.content>
  <!ATTLIST BLOCKQUOTE     %style;>
  <!--=================== Lists ==========================================-->

  <!--
      HTML 3.2 allows you to control the sequence number for ordered lists.
      You can set the sequence number with the START and VALUE attributes.
      The TYPE attribute may be used to specify the rendering of ordered
      and unordered lists.
  -->

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

  <!ELEMENT DL    - -  (DT|DD)+>
  <!ATTLIST DL
      compact (compact) #IMPLIED -- more compact style --
      %style;
      >

  <!ELEMENT DT - O  (%text)*>
  <!ATTLIST DT     %style;>
  <!ELEMENT DD - O  %flow;>
  <!ATTLIST DD     %style;>

  <!-- Ordered lists OL, and unordered lists UL -->
  <!ELEMENT (OL|UL) - -  (LI)+>

  <!--
         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 % OLStyle "CDATA" -- constrained to: [1|a|A|i|I] -->

  <!ATTLIST OL -- ordered lists --
      type      %OLStyle   #IMPLIED   -- numbering style --
      start     NUMBER     #IMPLIED   -- starting sequence number --
      compact  (compact)   #IMPLIED   -- reduced interitem spacing --
      %style;
      >

  <!-- bullet styles -->

  <!ENTITY % ULStyle "disc|square|circle">

  <!ATTLIST UL -- unordered lists --
      type    (%ULStyle)   #IMPLIED   -- bullet style --
      compact (compact)    #IMPLIED   -- reduced interitem spacing --
      %style;
      >

  <!ELEMENT (DIR|MENU) - -  (LI)+ -(%block)>
  <!ATTLIST DIR
      compact (compact) #IMPLIED
      %style;
      >
  <!ATTLIST MENU
      compact (compact) #IMPLIED
      %style;
      >

  <!-- <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 % LIStyle "CDATA" -- constrained to: "(%ULStyle|%OLStyle)" -->

  <!ELEMENT LI - O %flow -- list item -->
  <!ATTLIST LI
      type    %LIStyle     #IMPLIED   -- list item style --
      value    NUMBER      #IMPLIED   -- reset sequence number --
      %style;
      >

  <!--================ Forms ============================================-->

  <!ELEMENT FORM - - %body.content -(FORM)>
  <!ATTLIST FORM
      action %URL #IMPLIED      -- server-side form handler --
      method (%HTTP-Method) GET -- see HTTP specification --
      enctype %Content-Type; "application/x-www-form-urlencoded"
      %style;
      >

  <!ENTITY % InputType
      "(TEXT | PASSWORD | CHECKBOX | RADIO | SUBMIT
          | RESET | FILE | HIDDEN | IMAGE)">

  <!ELEMENT INPUT - O EMPTY>
  <!ATTLIST INPUT
      type %InputType TEXT       -- what kind of widget is needed --
      name  CDATA   #IMPLIED     -- required for all but submit and reset --
      value CDATA   #IMPLIED     -- required for radio and checkboxes --
      checked (checked) #IMPLIED -- for radio buttons and check boxes --
      size CDATA    #IMPLIED     -- specific to each type of field --
      maxlength NUMBER #IMPLIED  -- max chars allowed in text fields --
      src   %URL    #IMPLIED     -- for fields with background images --
      align %IAlign #IMPLIED     -- image alignment --
      usemap  %URL  #IMPLIED     -- use client-side image map --
      hspace %Pixels #IMPLIED    -- suggested horizontal gutter --
      vspace %Pixels #IMPLIED    -- suggested vertical gutter --
      %style;
      >

  <!ELEMENT SELECT - - (OPTION+)>
  <!ATTLIST SELECT
      name CDATA #REQUIRED
      size NUMBER #IMPLIED
      multiple (multiple) #IMPLIED
      %style;
      >

  <!ELEMENT OPTION - O (#PCDATA)*>
  <!ATTLIST OPTION
      selected (selected) #IMPLIED
      value  CDATA  #IMPLIED -- defaults to element content --
      %style;
      >

  <!-- Multi-line text input field. -->

  <!ELEMENT TEXTAREA - - (#PCDATA)*>
  <!ATTLIST TEXTAREA
      name CDATA #REQUIRED
      rows NUMBER #REQUIRED
      cols NUMBER #REQUIRED
      %style;
      >

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

  <!-- Widely deployed subset of the full table standard, see RFC 1942
       e.g. at http://www.ics.uci.edu/pub/ietf/html/rfc1942.txt -->

  <!-- horizontal placement of table relative to window -->
  <!ENTITY % Where "(left|center|right)">

  <!-- horizontal alignment attributes for cell contents -->
  <!ENTITY % cell.halign
      "align  (left|center|right) #IMPLIED"
      >

  <!-- vertical alignment attributes for cell contents -->
  <!ENTITY % cell.valign
      "valign  (top|middle|bottom)  #IMPLIED"
      >

  <!ELEMENT TABLE - - (CAPTION?, TR+)>
  <!ELEMENT TR - O (TH|TD)*>
  <!ELEMENT (TH|TD) - O %body.content>

  <!ATTLIST TABLE               -- table element --
      align     %Where    #IMPLIED  -- table position relative to window --
      width     %Length   #IMPLIED  -- table width relative to window --
      border    %Pixels   #IMPLIED  -- controls frame width around table --
      cellspacing %Pixels #IMPLIED  -- spacing between cells --
      cellpadding %Pixels #IMPLIED  -- spacing within cells --
      %style;
      >

  <!ELEMENT CAPTION - - (%text;)* -- table or figure caption -->
  <!ATTLIST CAPTION
      align (top|bottom) #IMPLIED
      %style;
      >

  <!ATTLIST TR               -- table row --
      %cell.halign;          -- horizontal alignment in cells --
      %cell.valign;          -- vertical alignment in cells --
      %style;
      >

  <!ATTLIST (TH|TD)          -- header or data cell --
      nowrap (nowrap)  #IMPLIED  -- suppress word wrap --
      rowspan NUMBER   1     -- number of rows spanned by cell --
      colspan NUMBER   1     -- number of cols spanned by cell --
      %cell.halign;          -- horizontal alignment in cells --
      %cell.valign;          -- vertical alignment in cells --
      width   %Pixels  #IMPLIED  -- suggested width for cell --
      height  %Pixels  #IMPLIED  -- suggested height for cell --
      %style;
      >

  <!--================ Document Head =====================================-->

  <!-- %head.misc defined earlier on as "SCRIPT|STYLE|META|LINK" -->

  <!ENTITY % head.content "TITLE & ISINDEX? & BASE?">

  <!ELEMENT HEAD O O  (%head.content) +(%head.misc)>

  <!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.
        -->

  <!ELEMENT ISINDEX - O EMPTY>
  <!ATTLIST ISINDEX
      prompt CDATA #IMPLIED -- prompt message --
      %style;
      >

  <!--
      The BASE element gives an absolute URL for dereferencing relative
      URLs, e.g.

       <BASE href="http://foo.com/index.html">
       ...
       <IMG SRC="images/bar.gif">

      The image is deferenced to

       http://foo.com/images/bar.gif

     In the absence of a BASE element the document URL should be used.
     Note that this is not necessarily the same as the URL used to
     request the document, as the base URL may be overridden by an HTTP
     header accompanying the document.
  -->

  <!ELEMENT BASE - O EMPTY>
  <!ATTLIST BASE
      href %URL  #REQUIRED
      >

  <!ELEMENT META - O EMPTY -- Generic Metainformation -->
  <!ATTLIST META
      http-equiv  NAME    #IMPLIED  -- HTTP response header name  --
      name    NAME    #IMPLIED  -- metainformation name       --
      content     CDATA   #REQUIRED -- associated information     --
      >

  <!ELEMENT STYLE  - - CDATA -- style info -->
  <!ATTLIST STYLE
      type     CDATA    #IMPLIED  -- Internet media type for style --
      title    CDATA    #IMPLIED  -- advisory title for this style --
      media    %MEDIA   ALL       -- intended rendering medium --
      >

  <!-- SCRIPT is a place holder for transition to next version of HTML -->
  <!ELEMENT SCRIPT - - CDATA -- script statements -->

  <!--================ Document Structure ================================-->

  <!ENTITY % version.attr "VERSION CDATA #FIXED '%HTML.Version;'">

  <![ %HTML.Deprecated [
      <!ENTITY % html.content "HEAD, BODY, PLAINTEXT?">
  ]]>
  <!ENTITY % html.content "HEAD, BODY">

  <!ELEMENT HTML O O  (%html.content)>
  <!ATTLIST HTML
      %version.attr;
      %style;
      >

The Latin-1 Character Entities (HTMLlat1.ent)

<!ENTITY nbsp   CDATA "&#160;" -- no-break space -->
<!ENTITY iexcl  CDATA "&#161;" -- inverted exclamation mark -->
<!ENTITY cent   CDATA "&#162;" -- cent sign -->
<!ENTITY pound  CDATA "&#163;" -- pound sterling sign -->
<!ENTITY curren CDATA "&#164;" -- general currency sign -->
<!ENTITY yen    CDATA "&#165;" -- yen sign -->
<!ENTITY brvbar CDATA "&#166;" -- broken (vertical) bar -->
<!ENTITY sect   CDATA "&#167;" -- section sign -->
<!ENTITY uml    CDATA "&#168;" -- umlaut (dieresis) -->
<!ENTITY copy   CDATA "&#169;" -- copyright sign -->
<!ENTITY ordf   CDATA "&#170;" -- ordinal indicator, feminine -->
<!ENTITY laquo  CDATA "&#171;" -- angle quotation mark, left -->
<!ENTITY not    CDATA "&#172;" -- not sign -->
<!ENTITY shy    CDATA "&#173;" -- soft hyphen -->
<!ENTITY reg    CDATA "&#174;" -- registered sign -->
<!ENTITY macr   CDATA "&#175;" -- macron -->
<!ENTITY deg    CDATA "&#176;" -- degree sign -->
<!ENTITY plusmn CDATA "&#177;" -- plus-or-minus sign -->
<!ENTITY sup2   CDATA "&#178;" -- superscript two -->
<!ENTITY sup3   CDATA "&#179;" -- superscript three -->
<!ENTITY acute  CDATA "&#180;" -- acute accent -->
<!ENTITY micro  CDATA "&#181;" -- micro sign -->
<!ENTITY para   CDATA "&#182;" -- pilcrow (paragraph sign) -->
<!ENTITY middot CDATA "&#183;" -- middle dot -->
<!ENTITY cedil  CDATA "&#184;" -- cedilla -->
<!ENTITY sup1   CDATA "&#185;" -- superscript one -->
<!ENTITY ordm   CDATA "&#186;" -- ordinal indicator, masculine -->
<!ENTITY raquo  CDATA "&#187;" -- angle quotation mark, right -->
<!ENTITY frac14 CDATA "&#188;" -- fraction one-quarter -->
<!ENTITY frac12 CDATA "&#189;" -- fraction one-half -->
<!ENTITY frac34 CDATA "&#190;" -- fraction three-quarters -->
<!ENTITY iquest CDATA "&#191;" -- inverted question mark -->
<!ENTITY Agrave CDATA "&#192;" -- capital A, grave accent -->
<!ENTITY Aacute CDATA "&#193;" -- capital A, acute accent -->
<!ENTITY Acirc  CDATA "&#194;" -- capital A, circumflex accent -->
<!ENTITY Atilde CDATA "&#195;" -- capital A, tilde -->
<!ENTITY Auml   CDATA "&#196;" -- capital A, dieresis or umlaut mark -->
<!ENTITY Aring  CDATA "&#197;" -- capital A, ring -->
<!ENTITY AElig  CDATA "&#198;" -- capital AE diphthong (ligature) -->
<!ENTITY Ccedil CDATA "&#199;" -- capital C, cedilla -->
<!ENTITY Egrave CDATA "&#200;" -- capital E, grave accent -->
<!ENTITY Eacute CDATA "&#201;" -- capital E, acute accent -->
<!ENTITY Ecirc  CDATA "&#202;" -- capital E, circumflex accent -->
<!ENTITY Euml   CDATA "&#203;" -- capital E, dieresis or umlaut mark -->
<!ENTITY Igrave CDATA "&#204;" -- capital I, grave accent -->
<!ENTITY Iacute CDATA "&#205;" -- capital I, acute accent -->
<!ENTITY Icirc  CDATA "&#206;" -- capital I, circumflex accent -->
<!ENTITY Iuml   CDATA "&#207;" -- capital I, dieresis or umlaut mark -->
<!ENTITY ETH    CDATA "&#208;" -- capital Eth, Icelandic -->
<!ENTITY Ntilde CDATA "&#209;" -- capital N, tilde -->
<!ENTITY Ograve CDATA "&#210;" -- capital O, grave accent -->
<!ENTITY Oacute CDATA "&#211;" -- capital O, acute accent -->
<!ENTITY Ocirc  CDATA "&#212;" -- capital O, circumflex accent -->
<!ENTITY Otilde CDATA "&#213;" -- capital O, tilde -->
<!ENTITY Ouml   CDATA "&#214;" -- capital O, dieresis or umlaut mark -->
<!ENTITY times  CDATA "&#215;" -- multiply sign -->
<!ENTITY Oslash CDATA "&#216;" -- capital O, slash -->
<!ENTITY Ugrave CDATA "&#217;" -- capital U, grave accent -->
<!ENTITY Uacute CDATA "&#218;" -- capital U, acute accent -->
<!ENTITY Ucirc  CDATA "&#219;" -- capital U, circumflex accent -->
<!ENTITY Uuml   CDATA "&#220;" -- capital U, dieresis or umlaut mark -->
<!ENTITY Yacute CDATA "&#221;" -- capital Y, acute accent -->
<!ENTITY THORN  CDATA "&#222;" -- capital THORN, Icelandic -->
<!ENTITY szlig  CDATA "&#223;" -- small sharp s, German (sz ligature) -->
<!ENTITY agrave CDATA "&#224;" -- small a, grave accent -->
<!ENTITY aacute CDATA "&#225;" -- small a, acute accent -->
<!ENTITY acirc  CDATA "&#226;" -- small a, circumflex accent -->
<!ENTITY atilde CDATA "&#227;" -- small a, tilde -->
<!ENTITY auml   CDATA "&#228;" -- small a, dieresis or umlaut mark -->
<!ENTITY aring  CDATA "&#229;" -- small a, ring -->
<!ENTITY aelig  CDATA "&#230;" -- small ae diphthong (ligature) -->
<!ENTITY ccedil CDATA "&#231;" -- small c, cedilla -->
<!ENTITY egrave CDATA "&#232;" -- small e, grave accent -->
<!ENTITY eacute CDATA "&#233;" -- small e, acute accent -->
<!ENTITY ecirc  CDATA "&#234;" -- small e, circumflex accent -->
<!ENTITY euml   CDATA "&#235;" -- small e, dieresis or umlaut mark -->
<!ENTITY igrave CDATA "&#236;" -- small i, grave accent -->
<!ENTITY iacute CDATA "&#237;" -- small i, acute accent -->
<!ENTITY icirc  CDATA "&#238;" -- small i, circumflex accent -->
<!ENTITY iuml   CDATA "&#239;" -- small i, dieresis or umlaut mark -->
<!ENTITY eth    CDATA "&#240;" -- small eth, Icelandic -->
<!ENTITY ntilde CDATA "&#241;" -- small n, tilde -->
<!ENTITY ograve CDATA "&#242;" -- small o, grave accent -->
<!ENTITY oacute CDATA "&#243;" -- small o, acute accent -->
<!ENTITY ocirc  CDATA "&#244;" -- small o, circumflex accent -->
<!ENTITY otilde CDATA "&#245;" -- small o, tilde -->
<!ENTITY ouml   CDATA "&#246;" -- small o, dieresis or umlaut mark -->
<!ENTITY divide CDATA "&#247;" -- divide sign -->
<!ENTITY oslash CDATA "&#248;" -- small o, slash -->
<!ENTITY ugrave CDATA "&#249;" -- small u, grave accent -->
<!ENTITY uacute CDATA "&#250;" -- small u, acute accent -->
<!ENTITY ucirc  CDATA "&#251;" -- small u, circumflex accent -->
<!ENTITY uuml   CDATA "&#252;" -- small u, dieresis or umlaut mark -->
<!ENTITY yacute CDATA "&#253;" -- small y, acute accent -->
<!ENTITY thorn  CDATA "&#254;" -- small thorn, Icelandic -->
<!ENTITY yuml   CDATA "&#255;" -- small y, dieresis or umlaut mark -->

References

[1] HTML 3.2
available from http://www.w3.org/pub/WWW/TR/REC-html32
[2] WD-style
available from http://www.w3.org/pub/WWW/TR/WD-style
[3] CSS1
available from http://www.w3.org/pub/WWW/TR/REC-CSS1-961217.html
[4] Cougar
the Cougar page is at http://www.w3.org/pub/WWW/MarkUp/Cougar
[5] nsgmls
available as part of the SP package from http://www.jclark.com/sp/index.htm
[6] HTML Testing http://www.w3.org/pub/WWW/MarkUp/html-test/

Dave Raggett (editor)
Created: 21-Apr-1997