home *** CD-ROM | disk | FTP | other *** search
/ Chip 1997 October / Chip_1997-10_cd.bin / tema / _tipy / html40 / html40.txt next >
Text File  |  1997-08-11  |  552KB  |  12,954 lines

  1.  
  2.  
  3. [W3C]                                                          HTML40-970708
  4.  
  5.                            HTML 4.0 Specification
  6.  
  7.                         W3C Working Draft 8-July-1997
  8.  
  9. This is: http://www.w3.org/TR/WD-html40-970708/
  10.  
  11. Abstract
  12.  
  13. This specification defines the HyperText Markup Language (HTML), version
  14. 4.0, the publishing language of the World Wide Web. In addition to the text,
  15. multimedia, and hyperlink features of the previous versions of HTML, HTML
  16. 4.0 supports more multimedia options, scripting languages, style sheets,
  17. better printing facilities, and documents that are more accessible to users
  18. with disabilities. HTML 4.0 also takes great strides towards the
  19. internationalization of documents, with the goal of making the Web truly
  20. World Wide.
  21.  
  22. Status of this document
  23.  
  24. This is a W3C Working Draft for review by W3C members and other interested
  25. parties. It is a draft document and may be updated, replaced or obsoleted by
  26. other documents at any time. It is inappropriate to use W3C Working Drafts
  27. as reference material or to cite them as other than "work in progress". This
  28. is work in progress and does not imply endorsement by, or the consensus of,
  29. either W3C or members of the HTML working group.
  30.  
  31. This document has been produced as part of the W3C HTML Activity, and is
  32. intended as a draft of a proposed recommendation for HTML.
  33.  
  34. The latest version of this document can be retrieved from the list of W3C
  35. technical reports at <http://www.w3.org/TR/> and is available as a gzip'ed
  36. tar file, a zip file, as well as a postscript (about 200 pages).
  37.  
  38. We also plan to provide translations in other languages, although the
  39. English version provides the normative specification.
  40.  
  41. HTML 4.0 replaces HTML 3.2, specified in http://www.w3.org/TR/REC-html32.
  42.  
  43. Editors
  44.  
  45.    * Dave Raggett <dsr@w3.org>
  46.    * Arnaud Le Hors <lehors@w3.org>
  47.    * Ian Jacobs <ij@w3.org>
  48.  
  49. Comments
  50.  
  51. Please send detailed comments on this document to www-html-editor@w3.org. We
  52. cannot garantee a personal response but we will try when it is appropriate.
  53. Public discussion on HTML features takes place on www-html@w3.org.
  54.  
  55.                               Table of Contents
  56.  
  57.   1. About the HTML 4.0 Specification
  58.   2. Introduction to HTML 4.0
  59.        1. Design principles of HTML 4.0
  60.        2. Designing documents with HTML 4.0
  61.        3. A brief SGML tutorial
  62.   3. Definitions and Conventions
  63.   4. HTML and URLs - Locating resources on the Web
  64.   5. HTML Document Character Set -Character sets, character encodings, and
  65.      entities
  66.   6. Basic HTML data types -Character data, colors, and lengths
  67.   7. Structure of HTML documents - Detailed Table of Contents
  68.        1. Global structure - The HEAD and BODY of a document
  69.        2. Language information and text direction - International
  70.           considerations for text
  71.        3. Text - Paragraphs, Lines, and Phrases
  72.        4. Lists - Unordered, Ordered, and Definition Lists
  73.        5. Tables
  74.        6. Links - Hypertext and Media-Independent Links
  75.        7. Inclusions - Objects, Images, and Applets in HTML documents
  76.   8. Presentation of HTML documents - Detailed Table of Contents
  77.        1. Style Sheets - Controlling the presentation of an HTML document
  78.        2. Alignment, font styles, and horizontal rules
  79.        3. Frames - Multi-view presentation of documents
  80.   9. Interactive HTML documents - Detailed Table of Contents
  81.        1. Forms - User-input Forms: Text Fields, Buttons, Menus, and more
  82.        2. Scripts - Animated Documents and Smart Forms
  83.  10. SGML reference information for HTML - Formal definition of HTML and
  84.      validation
  85.        1. SGML Declaration
  86.        2. Document Type Definition
  87.        3. Named character entities
  88.  11. References
  89.  12. Indexes
  90.        1. Index of Elements
  91.        2. Index of Attributes
  92.  13. Appendixes
  93.        1. Changes between HTML 3.2 and HTML 4.0
  94.        2. Performance, Implementation, and Design Notes
  95.        3. HTML and Organizations (W3C, IETF, ISO)
  96.  
  97. About the HTML 4.0 Specification
  98.  
  99. Contents
  100.  
  101.   1. How to read the specification
  102.   2. How the specification is organized
  103.   3. Acknowledgments
  104.  
  105. This document has been written with two types of readers in mind: HTML
  106. authors and HTML implementors. We hope the specification will provide
  107. authors with the tools they need to write efficient, attractive, and
  108. accessible documents, without overexposing them to HTML's implementation
  109. details. Implementors, however, should find all they need to build user
  110. agents that interpret HTML correctly.
  111.  
  112. The specification has been written with two modes of presentation in mind:
  113. electronic and printed. Although the two presentations will no doubt be
  114. similar, readers will find some differences. For example, links will not
  115. work in the printed version (obviously), and page numbers will not appear in
  116. the electronic version. In case of a discrepancy, the electronic version is
  117. considered the authoritative version of the document.
  118.  
  119. How to read the specification
  120.  
  121. The specification may be approached in several ways:
  122.  
  123.    * Read from beginning to end. The specification begins with a general
  124.      presentation of HTML and becomes more and more technical and specific
  125.      towards the end. This is reflected in the specification's main table of
  126.      contents, which presents topical information, and the indexes, which
  127.      present lower level information in alphabetical order.
  128.  
  129.    * Quick access to information. In order to get information about syntax
  130.      and semantics as quickly as possible, the electronic version of the
  131.      specification includes the following features:
  132.        1. Every reference to an element or attribute is linked to its
  133.           definition in the specification.
  134.        2. Every page will include links to the indexes, so you will never be
  135.           more than two links away from finding the definition of an element
  136.           or attribute.
  137.        3. The front pages of the three sections of the language reference
  138.           manual extend the initial table of contents with more detail about
  139.           each section.
  140.  
  141. How the specification is organized
  142.  
  143. This specification includes the following sections:
  144.  
  145. Section 2: Introduction to HTML 4.0.
  146.      The introduction gives an overview of what can be done with HTML 4.0.
  147.      It also provides some design tips for developing good HTML habits.
  148. Sections 3 - 11: HTML 4.0 reference manual.
  149.      The bulk of the reference manual consists of the HTML language
  150.      reference, which defines all elements and attributes of the language.
  151.  
  152.      This document has been organized by topic rather than by the grammar of
  153.      HTML. Topics are grouped into three categories: structure,
  154.      presentation, and interactivity. Although it is not easy to divide HTML
  155.      constructs perfectly into these three categories, the model reflects
  156.      the designers' experience that separating a document's structure from
  157.      its presentation produces more effective and maintainable documents.
  158.  
  159.      The language reference consists of the following information:
  160.  
  161.         o Conventions used by the editors of this specification.
  162.  
  163.         o How HTML fits into the World Wide Web and an introduction to
  164.           related Web languages and protocols such as URLs.
  165.  
  166.         o What characters may appear in an HTML document.
  167.  
  168.         o Basic data types of an HTML document.
  169.  
  170.         o Elements that pertain to the structure of an HTML document,
  171.           including text, lists, tables, links, and included objects,
  172.           images, and applets.
  173.  
  174.         o Elements that pertain to the presentation of an HTML document,
  175.           including style sheets, fonts, colors, rules, and other visual
  176.           presentation, and frames for multi-windowed presentations.
  177.  
  178.         o Elements that pertain to interactivity with an HTML document,
  179.           including forms for user input and scripts for active documents.
  180.  
  181.         o The SGML definition of HTML, including the SGML declaration of
  182.           HTML, the HTML DTD, and the list of character entities.
  183.  
  184.         o References.
  185.  
  186. Section 12: Quick reference indexes.
  187.      Two indexes give readers rapid access to the definition of all elements
  188.      and attributes The indexes also summarize some key characteristics of
  189.      each element and attribute.
  190. Section 13: Appendixes.
  191.      The appendix contains information about changes from HTML 3.2,
  192.      performance and implementation notes, and how W3C and other
  193.      organizations interact with respect to HTML.
  194.  
  195. Acknowledgments
  196.  
  197. Thanks to everyone who has helped to author the working drafts that went
  198. into the HTML 4.0 specification, and all those who have sent suggestions and
  199. corrections. A particular thanks to T.V. Raman for his work on improving the
  200. accessibility of HTML forms for people with disabilities.
  201.  
  202. The authors of this specification, the members of the W3C HTML Working
  203. Group, deserve much applause for their diligent review of this document,
  204. their constructive comments, and their hard work: John D. Burger, Steve
  205. Byrne, Martin J. Dⁿrst, Daniel Glazman, Scott Isaacs, Murray Maloney, Steven
  206. Pemberton, Jared Sorensen, Powell Smith, Robert Stevahn, Ed Tecot, Jeffrey
  207. Veen, Mike Wexler, Misha Wolf, and Lauren Wood.
  208.  
  209. Thank you Dan Connolly for thoughtful input and guidance as chairman of the
  210. HTML working group. Thank you Sally Khudairi for your indispensible work on
  211. the press release.
  212.  
  213. Of particular help from the Inria at Sophia-Antipolis were Janet Bertot,
  214. Bert Bos, Stephane Boyera, Daniel Dardailler, Yves Lafon, Hσkon Lie, Chris
  215. Lilley, and Colas Nahaboo.
  216.  
  217. Lastly, thanks to Tim Berners-Lee without whom none of this would have been
  218. possible.
  219.  
  220.                           Introduction to HTML 4.0
  221.  
  222. Contents
  223.  
  224. This is being written ...
  225.  
  226.                        Design principles of HTML 4.0
  227.  
  228. As you read the specification, you may find it enlightening to keep in mind
  229. the following principles that guided the design of HTML 4.0.
  230.  
  231.    * Interoperability
  232.  
  233.      While most people agree that HTML documents should work well across
  234.      different browsers and platforms, achieving interoperability implies
  235.      higher costs to content providers since they must develop different
  236.      versions of documents. If the effort is not made, however, there is
  237.      much greater risk that the Web will devolve into a proprietary world of
  238.      incompatible formats, ultimately reducing the Web's commercial
  239.      potential for all participants.
  240.  
  241.      Each version of HTML attempts to reach greater consensus among industry
  242.      players so that the investment made by content providers will not be
  243.      wasted and that their documents will not become unreadable in a short
  244.      period of time.
  245.  
  246.      HTML has been developed with the vision that all manner of devices
  247.      should be able to use information on the Web: PCs with graphics
  248.      displays of varying resolution and color depths, cellular telephones,
  249.      hand held devices, devices for speech for output and input, computers
  250.      with high or low bandwidth, and so on.
  251.  
  252.    * Internationalization
  253.  
  254.      This version of HTML has been designed with the help of experts in the
  255.      field of internationalization, so that documents may be written in
  256.      every language and be transported easily around the world. This has
  257.      been accomplished by incorporating [RFC2070], which deals with the
  258.      internationalization of HTML.
  259.  
  260.      One important step has been the adoption of the ISO/IEC:10646 standard
  261.      (see [ISO10646]) as the document character set for HTML. This is the
  262.      world's most inclusive standard dealing with issues of the
  263.      representation of international characters, text direction,
  264.      punctuation, and other world language issues.
  265.  
  266.      HTML now offers greater support for diverse human languages within a
  267.      document. This allows for more effective indexing of documents for
  268.      search engines, higher-quality typography, better text-to-speech
  269.      conversion, correct hyphening, etc.
  270.  
  271.    * Accessibility
  272.  
  273.      As the Web community grows and its members diversify in their abilities
  274.      and skills, it is crucial that the underlying technologies be
  275.      appropriate to their specific needs. HTML has been designed to make Web
  276.      pages more accessible to those with physical limitations. HTML 4.0
  277.      developments in the area of accessibility include:
  278.  
  279.         o Encouraging the use of style sheets (rather than tables) to
  280.           achieve layout effect.
  281.         o Making it easier to provided alternate (textual and aural)
  282.           descriptions of images for non-visual browsers.
  283.         o Providing active labels for form fields
  284.         o Providing labeled hierarchical groupings for form fields.
  285.         o Providing the ability to associate a longer text description with
  286.           an HTML element.
  287.  
  288.      Authors who design pages with accessibility issues in mind will not
  289.      only receive the blessings of the accessbility community, but will
  290.      benefit in other ways as well: well-designed HTML documents that
  291.      distinguish structure and presentation will adapt more easily to new
  292.      technologies.
  293.  
  294.    * Tables
  295.  
  296.      The new table model in HTML is based on [RFC1942]. Authors now have
  297.      greater control over structure and layout (e.g., column groups). The
  298.      ability of designers to recommend column widths allows user agents to
  299.      display table data incrementally (as it arrives) rather than waiting
  300.      for the entire table before rendering.
  301.  
  302.    * Compound documents
  303.  
  304.      HTML now offers a standard mechanism for embedding generic media
  305.      objects and applications in HTML documents. The OBJECT element
  306.      (together with its more specific ancestor elements IMG and APPLET)
  307.      provides a mechanism for including images, video, sound, mathematics,
  308.      specialized applications, and other objects in a document. It also
  309.      allows authors to specify a hierarchy of alternate renderings for user
  310.      agents that don't support a specific rendering.
  311.  
  312.    * Style sheets
  313.  
  314.      Style sheets simplify HTML markup and largely relieve HTML of the
  315.      responsibilities of presentation. They give both authors and users
  316.      control over the presentation of documents --- font information,
  317.      alignment, colors, etc.
  318.  
  319.      Stylistic information can be:
  320.  
  321.         o Attached to a specific element to affect, say the color or font of
  322.           its content.
  323.         o Placed in the document header as a series of styles comprising a
  324.           style sheet
  325.         o Linked to an HTML from an external style sheet.
  326.  
  327.      The mechanism for associating a style sheet with a document is
  328.      independent of the style sheet language.
  329.  
  330.    * Scripting
  331.  
  332.      Through scripts, authors may create "smart forms" that react as users
  333.      fill them out. Scripting allows designers to create dynamic Web pages,
  334.      and to use HTML as a means to build networked applications. The
  335.      mechanisms provided to associate HTML with scripts are independent of
  336.      particular scripting languages.
  337.  
  338.    * Printing
  339.  
  340.      HTML features allow user agents to print a collection of documents in
  341.      an intelligent manner based on descriptions of the relationships among
  342.      documents acting as parts of a larger work.
  343.  
  344.    * Ease of use
  345.  
  346.      This version of HTML has been designed to remain easy to learn and
  347.      adequate for many common publishing needs. The language offers more
  348.      complex constructs (e.g., forms, scripting) for more sophisticated
  349.      tasks, but even these mechanisms will become easier to use as powerful
  350.      HTML authoring tools flourish.
  351.  
  352.      Beware - at the time of writing, some HTML authoring tools rely
  353.      extensively on tables for formatting, which may easily cause
  354.      accessibility problems.
  355.  
  356.                      Designing documents with HTML 4.0
  357.  
  358. General principles for good HTML design and implementation include:
  359.  
  360.    * Separate structure and presentation
  361.  
  362.      HTML has its roots in SGML which has always been a language for the
  363.      specification of structural markup. As HTML matures, more and more of
  364.      its presentational elements and attributes are being replaced by other
  365.      mechanisms, in particular style sheets. Experience has shown that
  366.      separating the structure of a document from its presentational aspects
  367.      reduces the cost of serving a wide range of platforms, media, etc., and
  368.      facilitates document revisions.
  369.  
  370.    * Consider universal accessibility to the Web
  371.  
  372.      To make the Web more accessible to everyone, notably those with
  373.      disabilities, authors should consider how their documents may be
  374.      rendered on a variety of platforms: speech-based browsers,
  375.      braille-readers, etc. We do not recommend that designers limit their
  376.      creativity, only that they consider alternate renderings in their
  377.      design. HTML offers a number of mechanisms to this end (e.g., the alt
  378.      attribute, the accesskey attribute, etc.)
  379.  
  380.      Furthermore, authors should keep in mind that their documents may be
  381.      reaching a far-off audience with different computer configurations. In
  382.      order for documents to be interpreted correctly, designers should
  383.      include in their documents information about the language and direction
  384.      of the text, how the document is encoded, and other issues related to
  385.      internationalization.
  386.    * Help user agents with incremental rendering
  387.  
  388.      By carefully designing their tables and making use of new table
  389.      features in HTML 4.0, designers can help user agents render documents
  390.      more quickly.
  391.  
  392.                            A brief SGML tutorial
  393.  
  394. Contents
  395.  
  396.   1. About SGML
  397.   2. HTML syntax
  398.        1. Entities
  399.        2. Elements
  400.        3. Attributes
  401.        4. HTML comments
  402.   3. How to read the HTML DTD
  403.        1. Block level and Inline elements
  404.        2. DTD Comments
  405.        3. Entity Definitions
  406.        4. Element definitions
  407.        5. Attribute definitions
  408.  
  409. This section of the document presents introductory information about SGML
  410. and its relationship to HTML. It discusses:
  411.  
  412.    * HTML syntax: How to write elements, attributes, and comments.
  413.    * The HTML DTD: How to read the HTML DTD.
  414.  
  415. About SGML
  416.  
  417. The Standard Generalized Markup Language (SGML, defined in [ISO8879]), is a
  418. language for defining markup languages. HTML is one such "application" of
  419. SGML.
  420.  
  421. An SGML application consists of several parts:
  422.  
  423.   1. The SGML declaration. The SGML declaration specifies which characters
  424.      and delimiters may appear in the application.
  425.   2. The document type definition (DTD). The DTD defines the syntax of
  426.      markup constructs. The DTD may include additional definitions such as
  427.      numeric and named character entities.
  428.   3. A specification that describes the semantics to be ascribed to the
  429.      markup. This specification also imposes syntax restrictions that cannot
  430.      be expressed within the DTD.
  431.   4. Document instances containing data (contents) and markup. Each instance
  432.      contains a reference to the DTD to be used to interpret it.
  433.  
  434. The SGML declaration for HTML 4.0 and the DTD for HTML 4.0 are included in
  435. this reference manual, along with the entity sets referenced by the DTD.
  436.  
  437. HTML syntax
  438.  
  439. In this section, we discuss the syntax of HTML elements, attributes, and
  440. comments.
  441.  
  442. Entities
  443.  
  444. Character entities are numeric or symbolic names for characters that may be
  445. included in an HTML document. They are useful when your authoring tools make
  446. it difficult or impossible to enter a character you may not enter often. You
  447. will see character entities throughout this document; they begin with a "&"
  448. sign and end with a semi-colon (;).
  449.  
  450. We discuss HTML character entities in detail later in the section on the
  451. HTML document character set.
  452.  
  453. Elements
  454.  
  455. An SGML application defines elements that represent structures or desired
  456. behavior. An element typically consists of three parts: a start tag,
  457. content, and an end tag.
  458.  
  459. A element's start tag is written <element-name>, where element-name is the
  460. name of the element. An element's end tag is written with a slash before the
  461. element name: </element-name>. For example,
  462.  
  463. <pre>The content of the PRE element is preformatted text.</pre>
  464.  
  465. The SGML definition of HTML specifies that some HTML elements are not
  466. required to have end tags. The definition of each element in the reference
  467. manual indicates whether it requires an end tag.
  468.  
  469. Some HTML elements have no content. For example, the line break element BR
  470. has no content; its only role is to terminate a line of text. Such "empty"
  471. elements never have end tags. The definition of each element in the
  472. reference manual indicates whether it is empty (has no content) or, if it
  473. can have content, what is considered legal content.
  474.  
  475. Element names are always case-insensitive.
  476.  
  477. Elements are not tags. Some people refer incorrectly to elements as tags
  478. (e.g., "the P tag"). Remember that the element is one thing, and the tag (be
  479. it start or end tag) is another. For instance, the HEAD element is always
  480. present, even though both start and end HEAD tags may be missing in the
  481. markup.
  482.  
  483. Attributes
  484.  
  485. Elements may have associated properties, called attributes, to which authors
  486. assign values. Attribute/value pairs appear before the final ">" of an
  487. element's start tag. Any number of (legal) attribute value pairs, separated
  488. by spaces, may appear in an element's start tag. They may appear in any
  489. order.
  490.  
  491. In this example, the align attribute is set for the H1 element:
  492.  
  493. <H1 align="center">
  494. This is a centered heading thanks to the align attribute
  495. </H1>
  496.  
  497. By default, SGML requires you to delimit all attribute values using either
  498. double quotation marks (") or single quotation marks ('). Single quote marks
  499. can be included within the attribute value when the value is delimited by
  500. double quote marks, and vice versa. You may also use numeric character
  501. entities to represent double quotes (") and single quotes ('). For
  502. double quotes you can also use the named character entity ".
  503.  
  504. In certain cases, it is possible in HTML to specify the value of an
  505. attribute without any quotation marks. The attribute value may only contain
  506. letters (a-z and A-Z), digits (0-9), hyphens (ASCII decimal 45), and periods
  507. (ASCII decimal 46). We suggest using quotation marks even when it is
  508. possible to eliminate them.
  509.  
  510. Attribute names are always case-insensitive.
  511.  
  512. Attribute values are generally case-insensitive. The definition of each
  513. attribute in the reference manual indicates whether its value is
  514. case-insensitive.
  515.  
  516. Note: HTML documents may compress better if you use lower case letters for
  517. element and attribute names. The reason is that the compression algorithms
  518. do a better job for more frequently repeated patterns, and lower case
  519. letters are more frequent than upper case ones.
  520.  
  521. HTML comments
  522.  
  523. HTML comments have the following syntax:
  524.  
  525.  
  526. <!-- this is a comment -->
  527. <!-- and so is this one,
  528.     which occupies more than one line -->
  529.  
  530. Comments must not be rendered by user agents as part of a document.
  531. Similary, user agents must not render SGML processing instructions (e.g.,
  532. <?full volume>).
  533.  
  534. How to read the HTML DTD
  535.  
  536. This specification presents pertinent fragments of the DTD each time an
  537. element or attribute is defined. Though cryptic and dissuasive at first, the
  538. DTD fragment gives concise information about an element and its attributes.
  539. We have chosen to include the DTD fragments in the specification rather than
  540. seek a more approachable, but longer and less precise means of describing an
  541. element. While almost all of the definitions include enough English text to
  542. make them comprehensible, for those who require definitive information, we
  543. complete this specification with a brief tutorial on reading the HTML DTD.
  544.  
  545. Block level and Inline elements
  546.  
  547. Certain HTML elements are said to be "block level" while others are "inline"
  548. (also known as "text level"). The distinction is founded on several notions:
  549.  
  550. Content model
  551.      Generally, block level elements may contain inline elements and other
  552.      block level elements. Generally, inline elements may generally contain
  553.      only data and other inline elements. Inherent in this structural
  554.      distinction is the idea that block elements create "larger" structures
  555.      than inline elements.
  556. Formatting
  557.      By default, block level are formatted differently than inline elements.
  558.      Block level elements generally begin on new lines, inline elements
  559.      generally do not. Block level elements end an unterminated paragraph
  560.      element. This enables you to omit end-tags for paragraphs in many
  561.      cases.
  562. Directionality
  563.      For technical reasons involving the [UNICODE] bidirectional text
  564.      algorithm, block level and inline elements differ in how they inherit
  565.      directionality information. For details, see the section on inheritance
  566.      of text direction.
  567.  
  568. Style sheets provide the means to specify the rendering of arbitrary
  569. elements, including whether an element is rendered as block or inline. In
  570. some cases, such as an inline style for list elements, this may be
  571. appropriate, but generally speaking, authors are discouraged from overriding
  572. the conventional interpretation of HTML elements in this way.
  573.  
  574. The alteration of the traditional presentation idioms for block level and
  575. inline elements also has an impact on the bidirectional text algorithm. See
  576. the section on the effect of style sheets on bidirectionality for more
  577. information.
  578.  
  579. DTD Comments
  580.  
  581. In DTDs, comments may spread over one or more lines. In the DTD, comments
  582. are delimited by a pair of "--" marks, e.g.
  583.  
  584. <!ELEMENT PARAM - O EMPTY       -- named property value -->
  585.  
  586. Here, the comment "named property value" explains the use of the PARAM
  587. element. DTD comments for HTML do have not normative value.
  588.  
  589. Entity Definitions
  590.  
  591. The HTML DTD begins with a series of entity definitions. An entity
  592. definition (not to be confused with an SGML entity) defines a kind of macro
  593. that may be expanded elsewhere in the DTD. When the macro is referred to by
  594. name in the DTD, it is expanded into a string.
  595.  
  596. An entity definition begins with the keyword <!ENTITY % followed by the
  597. entity name, the quoted string the entity expands to, and finally a closing
  598. >. The following example defines the string that the %font entity will
  599. expand to.
  600.  
  601. <!ENTITY % font "TT | I | B | U | S | BIG | SMALL">
  602.  
  603. The string the entity expands to may contain other entity names. These names
  604. are expanded recursively. In the following example, the %inline entity is
  605. defined to include the %font, %phrase, %special and %formctrl entities.
  606.  
  607. <!ENTITY % inline "#PCDATA | %font | %phrase | %special | %formctrl">
  608.  
  609. You will encounter two DTD entities frequently in the HTML DTD: %inline and
  610. %block. They are used when the content model includes inline and block level
  611. elements respectively.
  612.  
  613. Element definitions
  614.  
  615. The bulk of the HTML DTD consists of the definitions of elements and their
  616. attributes. The <!ELEMENT> keyword begins an element definition and the >
  617. character ends it. Between these are specified:
  618.  
  619.   1. The element's name.
  620.   2. Whether the element's end tag is optional. Two hyphens that appear
  621.      after the element name mean that the start and end tags are mandatory.
  622.      One hyphen followed by the letter "O" (not zero) indicates that the end
  623.      tag can be omitted. A pair of letter "O"s indicate that both the start
  624.      and end tags can be omitted.
  625.   3. The element's content, if any. The allowed content for an element is
  626.      called its content model. Elements with no content are called empty
  627.      elements. Empty elements are defined with the keyword "EMPTY".
  628.  
  629. In this example:
  630.  
  631.     <!ELEMENT UL - - (LI)+>
  632.  
  633.    * The element being defined is UL.
  634.    * The two hyphens indicate that both the start tag and the end tag for
  635.      this element are required.
  636.    * The content model for this element defined to be "at least one LI
  637.      element". We describe content models in detail below.
  638.  
  639. This example illustrates the definition of an empty element:
  640.  
  641.     <!ELEMENT IMG - O EMPTY>
  642.  
  643.    * The element being defined is IMG.
  644.    * The hyphen and the following "O" indicate that the end tag can be
  645.      omitted, but together with the content model "EMPTY", this is
  646.      strengthened to the rule that the end tag must be omitted.
  647.    * The "EMPTY" keyword means the element must not have content.
  648.  
  649. Content model definitions
  650.  
  651. The content model describes what may be contained by an element. Content
  652. definitions may include:
  653.  
  654.    * The names of allowed or forbidden elements (e.g., the UL element
  655.      includes instances of the LI element).
  656.    * DTD entities (e.g., the LABEL element includes instances of the %inline
  657.      entity).
  658.    * Document text (indicated by the SGML construct "#PCDATA"). Text may
  659.      contain numeric and named character entities. Recall that these begin
  660.      with & and end with a semicolon (e.g., "Hergé's adventures
  661.      of Tintin" includes the named entity for the "acute e" character).
  662.  
  663. The content model use the following syntax to define what markup is allowed
  664. for the content of the element:
  665.  
  666. ( ... )
  667.      Specifies a group.
  668. A | B
  669.      Both A and B are permitted in any order.
  670. A , B
  671.      A must occur before B.
  672. A & B
  673.      A and B must both occur once, but may do so in any order.
  674. A?
  675.      A can occur zero or one times
  676. A*
  677.      A can occur zero or more times
  678. A+
  679.      A can occur one or more times
  680.  
  681. Here are some examples from the HTML DTD:
  682.  
  683. <!ELEMENT SELECT - - (OPTION+)>
  684.  
  685.      The SELECT element must contain one or more OPTION elements.
  686.  
  687. <!ELEMENT DL - - (DT|DD)+>
  688.  
  689.      The DL element must contain one or more DT or DD elements in any order.
  690.  
  691. <!ELEMENT OPTION - O (#PCDATA)*>
  692.  
  693.      The OPTION element may only contain text and entities, such as &
  694.  
  695. A few HTML elements use an additional SGML feature to exclude certain
  696. elements from content model. Excluded elements are preceded by a hyphen.
  697. Explicit exclusions override inclusions.
  698.  
  699. In this example, the -(A) signifies that the element A cannot be included in
  700. another A element (i.e., anchors may not be nested).
  701.  
  702.    <!ELEMENT A - - (%text)* -(A)>
  703.  
  704. Note that the A element is part of the DTD entity %inline, but is excluded
  705. explicitly because of -(A).
  706.  
  707. Similarly, the following element definition for FORM prohibits nested forms:
  708.  
  709.    <!ELEMENT FORM - - %block -(FORM)>
  710.  
  711. Attribute definitions
  712.  
  713. The <!ATTLIST> keyword begins the definition of attributes that an element
  714. may take. It is followed by the name of the element in question and a list
  715. of attribute definitions. An attribute definition is a triplet that defines:
  716.  
  717.    * The name of an attribute.
  718.    * The type of the attribute's value or an explicit set of possible
  719.      values. Values defined explicitly by the DTD are case-insensitive.
  720.    * Whether the default value of the attribute is implicit (keyword
  721.      "#IMPLIED"), in which case the default value must be supplied by the
  722.      user agent (in some cases via inheritance from parent elements); always
  723.      required (keyword "#REQUIRED"); or fixed to the given value (keyword
  724.      "#FIXED"). Some attributes explicitly specify a default value for the
  725.      attribute.
  726.  
  727. In this example, the name attribute is defined for the MAP element. The
  728. attribute is optional for this element.
  729.  
  730. <!ATTLIST MAP
  731.   name        CDATA     #IMPLIED
  732.   >
  733.  
  734. The type of values permitted for the attribute is given as CDATA, an SGML
  735. data type. CDATA is text that may include character entities.
  736.  
  737. For more information about "CDATA", "NAME", "ID", and other data types,
  738. please consult the section on HTML data types.
  739.  
  740. The following examples illustrate possible attribute definitions:
  741.  
  742. rowspan     NUMBER     1         -- number of rows spanned by cell --
  743. http-equiv  NAME       #IMPLIED  -- HTTP response header name  --
  744. id          ID         #IMPLIED  -- document-wide unique id --
  745. valign      (top|middle|bottom|baseline) #IMPLIED
  746.  
  747. The rowspan attribute requires values of type NUMBER. The default value is
  748. given explicitly as "1". The optional http-equiv attribute requires values
  749. of type NAME. The optional id attribute requires values of type ID. The
  750. optional valign attribute is constrained to take values from the set {top,
  751. middle, bottom, baseline}.
  752.  
  753. DTD entities in attribute definitions
  754.  
  755. Attribute definitions may also include DTD entities.
  756.  
  757. In this example, we see that the attribute definition list for the LINK
  758. element begins with the %attrs entity.
  759.  
  760. <!ATTLIST LINK
  761.   %attrs;                          -- id, class, style, lang, dir, title --
  762.   href        %URL       #IMPLIED  -- URL for linked resource --
  763.   ...more of the definition...
  764.   >
  765.  
  766. The %attrs entity expands to:
  767.  
  768. <!ATTLIST P
  769.   id          ID         #IMPLIED  -- document-wide unique id --
  770.   class       CDATA      #IMPLIED  -- comma list of class values --
  771.   style       CDATA      #IMPLIED  -- associated style info --
  772.   title       CDATA      #IMPLIED  -- advisory title/amplification --
  773.   lang        NAME       #IMPLIED  -- [RFC1766] language value --
  774.   dir         (ltr|rtl)  #IMPLIED  -- direction for weak/neutral text --
  775.   align (left|center|right|justify)  #IMPLIED
  776.   >
  777.  
  778. The %attrs entity has been defined for convenience since these seven
  779. attributes are defined for most HTML elements.
  780.  
  781. Simiarly, the DTD defines the %URL entity as expanding into the string
  782. CDATA.
  783.  
  784. <!ENTITY % URL "CDATA"
  785.         -- The term URL means a CDATA attribute
  786.            whose value is a Uniform Resource Locator,
  787.            See [RFC1808] and [RFC1738]
  788.         -->
  789.  
  790. As this example illustrates, the entity %URL provides readers of the DTD
  791. with more information as to the type of data expected for an attribute.
  792. Similar entities have been defined for %color, %Content-Type, %Length,
  793. %Pixels, etc.
  794.  
  795. Boolean attributes
  796.  
  797. Some attributes play the role of boolean variables (e.g., selected). Their
  798. appearance in the start tag of an element implies that the value of the
  799. attribute is "true". Their absence implies a value of "false".
  800.  
  801. Boolean attributes may legally take a single value: the name of the
  802. attribute itself (e.g., selected="selected").
  803.  
  804. This example defines the selected attribute to be a boolean attribute.
  805.  
  806. selected     (selected)  #IMPLIED  -- reduced interitem spacing --
  807.  
  808. The attribute is set to "true" by appearing in the element's start tag:
  809.  
  810. <OPTION selected="selected">
  811. ...contents...
  812. <OPTION>
  813.  
  814. Minimized boolean attributes In HTML, boolean attributes may be appear in
  815. "minimized form" -- the attribute's value appears alone in the element's
  816. start tag. Thus:
  817.  
  818. <OPTION selected>
  819.  
  820. instead of
  821.  
  822. <OPTION selected="selected">
  823.  
  824. Authors should be aware than many user agents only recognize the minimized
  825. form and not the full form.
  826.  
  827.                         Definitions and Conventions
  828.  
  829. Contents
  830.  
  831.   1. Definitions
  832.   2. Document conventions
  833.        1. Elements and attributes
  834.        2. Notes and examples
  835.        3. Document names
  836.   3. SGML
  837.  
  838. Below we list some definitions and conventions adopted in this
  839. specification.
  840.  
  841. Words such as "must", "should", "can", and "may" are used in accordance with
  842. [RFC2119].
  843.  
  844. Definitions
  845.  
  846. User agent A user agent is any device that interprets HTML documents. User
  847. agents include visual browsers (ascii and graphical), non-visual browsers
  848. (audio, braille), search robots, proxies, etc.
  849.  
  850. Conforming user agent A conforming user agent for HTML 4.0 is one that
  851. observes the mandatory conditions set forth in this specification.
  852.  
  853. A user agent must try to render the content of any element it does not
  854. recognize.
  855.  
  856. A user agent must ignore any attribute it does not recognize.
  857.  
  858. A user agent should avoid imposing arbitrary length limits on string
  859. literals.
  860.  
  861. This specification does not define how conforming user agents should handle
  862. general error conditions.
  863.  
  864. Deprecated A deprecated element or attribute is one that has been outdated
  865. by newer HTML constructs. Deprecated elements are defined in the reference
  866. manual in appropriate locations, but are clearly marked as deprecated.
  867. Deprecated elements may become obsolete in future versions of HTML.
  868.  
  869. We strongly urge authors to avoid deprecated elements and attributes. To
  870. this end, we provide alternatives to them when appropriate in the
  871. specification.
  872.  
  873. User agents should continue to support deprecated elements for reasons of
  874. backward compatibility.
  875.  
  876. Obsolete An obsolete element or attribute is one for which there is no
  877. guarantee of support by a user agent. Obsolete elements are no longer
  878. defined in the specification, but are listed for historical purpose in the
  879. changes section of the reference manual.
  880.  
  881. Document conventions
  882.  
  883. This specification presents elements in a "semantic" order, from most basic
  884. to most sophisticated constructs. Elements may be discussed in several
  885. different contexts depending on their use (e.g., DIV as a structuring
  886. element and DIV and its role with style sheets). Despite scattered
  887. references, the specification defines each element and attribute in one
  888. location only.
  889.  
  890. Elements and attributes
  891.  
  892. Similarly, attributes that apply to many elements (e.g., lang, dir, class,
  893. etc.) are defined where most appropriate semantically. Consequently, an
  894. element definition may include a reference to an attribute that may be
  895. defined elsewhere. When this is the case, the location of the definition
  896. will be clearly indicated and for the electronic version of the
  897. specification, accessible by a link.
  898.  
  899. Definitions of elements and attributes clearly indicate which are
  900. deprecated. In such cases, the specification includes examples of better
  901. HTML usage.
  902.  
  903. In the electronic version of the specification, all references to an element
  904. or attribute (from the index or in the specification text) are linked to its
  905. definition.
  906.  
  907. Element names are written in upper case letters (e.g., BODY). Attribute
  908. names are written in lower case letters (e.g., lang, onsubmit). Recall that
  909. in HTML, element and attribute names are case-insensitive. Our convention is
  910. designed to encourage readability of the specification.
  911.  
  912. Element and attribute names are marked within the source HTML for the
  913. specification and may be rendered specially depending on your user agent.
  914.  
  915. The type of an attribute's value is specified in its definition. However, if
  916. the set of possible values is small, the values are listed explicitly,
  917. separated by a bar (|). The first value in this list is the default value.
  918.  
  919. Notes and examples
  920.  
  921. Informative notes will be emphasized to stand out from surrounding text. How
  922. the emphasis is rendered depends on your user agent.
  923.  
  924. An example that illustrates deprecated usage will be marked as a "DEPRECATED
  925. EXAMPLE". Deprecated examples also include recommended alternate solutions.
  926. An example that illustrates illegal usage will be clearly marked as an
  927. "ILLEGAL EXAMPLE".
  928.  
  929. Examples and notes are marked within the source HTML for the specification
  930. and may be rendered specially depending on your user agent.
  931.  
  932. Document names
  933.  
  934. By convention, HTML files are usually given the extension ".html" or ".htm".
  935.  
  936. SGML
  937.  
  938. Comments appearing in the HTML 4.0 DTD have no normative value; they are
  939. informative only.
  940.  
  941.                                HTML and URLs
  942.  
  943. Contents
  944.  
  945.   1. Universal Resource Locators (URLs)
  946.        1. Fragment URLs
  947.        2. Relative URLs
  948.        3. URLs in HTML
  949.  
  950. The World Wide Web is a network of information resources. The Web relies on
  951. three mechanisms intended to make these resources readily available to the
  952. widest possible audience:
  953.  
  954.   1. A single naming scheme, to give access to any resource on the Web in a
  955.      uniform way (URLs).
  956.   2. Protocols, to enable the exchange of named resources over the Web
  957.      (HTTP).
  958.   3. Hypertext, for easy navigation among resources (HTML).
  959.  
  960. In this section of the reference manual, we present (minimal) information
  961. about those Web topics that have an impact on HTML.
  962.  
  963. Universal Resource Locators (URLs)
  964.  
  965. Every resource available on the Web --- HTML document, image, video clip,
  966. program, etc. --- has an address that may be encoded by a Universal Resource
  967. Locator, or "URL" (defined in [RFC1738]).
  968.  
  969. URLs typically consist of three pieces:
  970.  
  971.   1. The name of the protocol used to transfer the resource over the Web.
  972.   2. The name of the machine hosting the resource.
  973.   3. The name of the resource itself, given as a path.
  974.  
  975. Consider the URL that designates the current HTML specification:
  976.  
  977. http://www.w3.org/TR/WD-html4/cover.html
  978.  
  979. This URL may be read as follows: Use the HTTP protocol to transfer the data
  980. residing on the machine www.w3.org in the file /TR/WD-html4/cover.html
  981.  
  982. URLs in general are case-sensitive (with the exception of machine names).
  983. There may be URLs, or parts of URLs, where case doesn't matter, but
  984. identifying these may not be easy. Users should always consider that URLs
  985. are case-sensitive. /u
  986.  
  987. The character set of URLs that appear in HTML is specified in [RFC1738].
  988.  
  989. Fragment URLs
  990.  
  991. The URL specification en vigeur at the writing of this document ([RFC1738])
  992. offers a mechanism to refer to a resource, but not to a location within a
  993. resource. The Web community has adopted a convention called "fragment URLs"
  994. to refer to anchors within an HTML document. A fragment URL ends with "#"
  995. followed by an anchor identifier. For instance, here is a fragment URL
  996. pointing to an anchor named section_2:
  997.  
  998. http://somesite.com/html/top.html#section_2
  999.  
  1000. Relative URLs
  1001.  
  1002. A relative URL (defined in [RFC1808]) doesn't contain any protocol or
  1003. machine information, and its path generally refers to an HTML document on
  1004. the same machine as the current document. Relative URLs may contain relative
  1005. path components (".." means the parent location) and may be fragment URLs.
  1006.  
  1007. Relative URLs may be resolved to full URLs, for example when the user
  1008. attempts to follow a link from one document to another. [RFC1808] defines
  1009. the normative algorithm for resolving relative URLs. The following
  1010. description is for convenience only.
  1011.  
  1012. Briefly, a full URL is derived from a relative URL by attaching a "base"
  1013. part to the relative URL. The base part is a URL that may come from any or
  1014. all of the following sources:
  1015.  
  1016.    * HTTP transfer protocol header information (see [RFC2068]).
  1017.    * Metadata (the META element) in the HEAD section of an HTML document.
  1018.    * Explicit base path information (the BASE element) in the HEAD section
  1019.      of an HTML document, or the CODEBASE attribute of the APPLET element.
  1020.  
  1021. [RFC1808] specifies the precedence among multiple sources of base
  1022. information. For the purposes of this explanation, the last piece of base
  1023. information takes precedence over the others and HTTP headers are considered
  1024. to occur earlier than the document HEAD.
  1025.  
  1026. If no explicit base information accompanies the document, the base URL is
  1027. that which designates the location of the current document.
  1028.  
  1029. Given a base URL and a relative URL (that does not begin with a slash), a
  1030. full URL is derived as follows:
  1031.  
  1032.    * If the base URL ends with a slash the full URL is derived by appending
  1033.      the relative URL to the base URL. For example, if the base URL is
  1034.      http://nosite.com/dir1/dir2/ and the relative URL is gee.html, the
  1035.      derived URL is http://nosite.com/dir1/dir2/gee.html.
  1036.    * If the base URL doesn't end with a slash, the last piece of the base
  1037.      URL is considered a resource, so the full URL is derived by appending
  1038.      the relative URL to the parent of the base URL. For example, if the
  1039.      base URL is http://nosite.com/dir1/dir2 and the relative URL is
  1040.      gee.html, the derived URL is http://nosite.com/dir1/gee.html
  1041.  
  1042. URLs in HTML
  1043.  
  1044. In HTML, URLs play a role in these situations:
  1045.  
  1046.    * When referring to metadata describing a document (see the HEAD
  1047.      element).
  1048.    * When citing a external reference (see the Q, BLOCKQUOTE, INS, and DEL
  1049.      elements).
  1050.    * When including an object directly in a document (see the OBJECT, IMG,
  1051.      MAP, FRAME, and IFRAME elements).
  1052.    * When linking to another document or program (see the BASE, A, LINK,
  1053.      AREA, FORM, INPUT, SCRIPT, and APPLET elements).
  1054.  
  1055. In each case, authors may use a full URL, a fragment URL, or a relative URL.
  1056. Please consult the section on anchors for more information about links and
  1057. URLs.
  1058.  
  1059. MAILTO URLs
  1060.  
  1061. In addition to HTTP URLs, authors might want to include MAILTO URLs (see
  1062. [RFC1738]) in their documents. MAILTO URLs cause email to be sent to some
  1063. email address. For instance, the author might create a link that, when
  1064. activated, causes the user agent to open a mail program with the destination
  1065. address in the "To:" field.
  1066.  
  1067. MAILTO URLs have the following syntax:
  1068.  
  1069. mailto:email-address
  1070.  
  1071. User agents may support MAILTO URL extensions that are not yet Internet
  1072. standards (e.g., appending subject information to a URL with the syntax
  1073. "?Subject=my%20subject" where any space characters are replaced by "%20").
  1074.  
  1075.                         HTML Document Character Set
  1076.  
  1077. Contents
  1078.  
  1079.   1. The Document Character Set
  1080.   2. Character entities
  1081.  
  1082. Human languages define a large number of text characters and human beings
  1083. have invented a wide variety of systems for representing these characters in
  1084. a computer. Unless proper precautions are taken, differing character
  1085. representations may not be understood by user agents in all parts of the
  1086. world.
  1087.  
  1088. The Document Character Set
  1089.  
  1090. To promote interoperability, SGML requires that each application (including
  1091. HTML), as part of its definition, define its document character set. A
  1092. document character set is a set of abstract characters (such as the Cyrillic
  1093. letter "I", the Chinese character meaning "water", etc.) and a corresponding
  1094. set of integer references to those characters. SGML considers a document to
  1095. be a sequence of references in the document character set.
  1096.  
  1097. The document character set for HTML is the Universal Character Set (UCS) of
  1098. [ISO10646]. This set is character-by-character equivalent to Unicode 2.0
  1099. ([UNICODE]). Both of these standards are updated from time to time with new
  1100. characters and the amendments should be consulted at the respective Web
  1101. sites.
  1102.  
  1103. In the current specification, references to ISO/IEC-10646 or Unicode imply
  1104. the same document character set. However, the current document also refers
  1105. to the Unicode specification for other issues such as the bidirectional text
  1106. algorithm.
  1107.  
  1108. Conforming HTML user agents may receive or output a document, or represent a
  1109. document internally, using any character encoding. A character encoding
  1110. represents some subset of the document character set. Character encodings
  1111. such as ISO-8859-1 (commonly referred to as "Latin-1" since it encodes most
  1112. Western European languages), ISO-8859-5 (which supports Cyrillic), SHIFT_JIS
  1113. (a Japanese encoding), and euc-jp (another Japanese encoding) save bandwidth
  1114. by representing only slices of the document character set.
  1115.  
  1116. Thus, character encodings allow authors to work with a convenient subset of
  1117. the document character. Authors should not have to know anything about the
  1118. underlying character encoding of the document or tool they are using ---
  1119. writing Japanese in a UTF-8 editor is as easy as writing Japanese in a JIS
  1120. or SHIFT_JIS editor.
  1121.  
  1122. Character encodings also mean that authors are not required to enter a
  1123. document's text in the form of references the document character set.
  1124. Requiring authors to work with such a large character encoding would be
  1125. cumbersome and wasteful (although encodings such as UTF-8 that cover all of
  1126. Unicode do exist).
  1127.  
  1128. To allow this convenience, conforming user agents must correctly map to
  1129. [UNICODE] all characters in any character encodings ("charsets") they
  1130. recognize (or behave as if they did). A list of recommended character
  1131. encodings for various scripts and languages will be provided in a separate
  1132. document.
  1133.  
  1134. How does a user agent know which character encoding has been used to encode
  1135. a given document?
  1136.  
  1137. In many cases, before a Web server sends an HTML document over the Web, it
  1138. tries to figure out the character encoding (by a variety of techniques such
  1139. as examining the first few bytes of the file, checking its encoding against
  1140. a database of known files and encodings, etc.). The server transmits the
  1141. document and the name of the character encoding to the receiving user agent
  1142. by way of the charset parameter of the HTTP "Content-Type" field. For
  1143. example, the following HTTP header announces that the character encoding is
  1144. "euc-jp".
  1145.  
  1146. Content-Type: text/html; charset=euc-jp
  1147.  
  1148. The value of the "charset" parameter must be the name of a "charset" as
  1149. defined in [RFC2045].
  1150.  
  1151. Unfortunately, not all servers send information about the character encoding
  1152. (even when the character encoding is different from the widely used
  1153. ISO-8859-1 encoding). HTML therefore allows authors a way to tell user
  1154. agents which character encoding has been used by specifying it explicitly in
  1155. the document header with the META element. For example, to specify that the
  1156. character encoding of the current document is "euc-jp", include the
  1157. following META declaration:
  1158.  
  1159. <META http-equiv="Content-Type" Content="text/html; charset=euc-jp">
  1160.  
  1161. This mechanism has a notable limit: the user agent cannot interpret the META
  1162. element to determine the character encoding if it doesn't already know the
  1163. character encoding of the document. The META declaration must only be used
  1164. when the character encoding is organized such that ASCII characters stand
  1165. for themselves at least until the META element is parsed. In this case,
  1166. conforming user agents must correctly interpret the META element.
  1167.  
  1168. To sum up, conforming user agents must observe the following priorities when
  1169. determining a document's character encoding, (from highest priority to
  1170. lowest):
  1171.  
  1172.   1. Explicit user action to override erroneous behavior.
  1173.   2. An HTTP "charset" parameter in a "Content-Type" field.
  1174.   3. A META declaration with "http-equiv" set to "Content-Type" and a value
  1175.      set for "charset".
  1176.   4. The "charset" attribute set for the A and LINK elements.
  1177.   5. User agent heuristics and user settings. For example, user agents
  1178.      typically assume that in the absence of other indicators, the character
  1179.      encoding is ISO-8859-1. This assumption may lead to an unreadable
  1180.      presentation of certain documents.
  1181.  
  1182. In all cases, the value of the "charset" attribute or parameter must be the
  1183. name of a "charset" as defined in [RFC2045].
  1184.  
  1185. If, for a specific application, it becomes necessary to refer to characters
  1186. outside [ISO10646], characters should be assigned to a private zone to avoid
  1187. conflicts with present or future versions of the standard. This is highly
  1188. discouraged, however, for reasons of portability.
  1189.  
  1190. Note: Modern web servers can be configured with information about which
  1191. document is using which character encoding. Webmasters should use these
  1192. facilities but should take pains to configure the server properly.
  1193.  
  1194. Character entities
  1195.  
  1196. Your hardware and software configuration probably won't allow you to refer
  1197. to all Unicode characters through simple input mechanisms, so SGML offers
  1198. character encoding-independent mechanisms for specifying any character from
  1199. the document character set.
  1200.  
  1201.    * Numeric character references (either decimal or hexadecimal form).
  1202.    * Named character references.
  1203.  
  1204. Numeric character references specify the integer reference of a Unicode
  1205. character. A numeric character reference with the syntax &#D; refers to
  1206. Unicode decimal character number D. A numeric character reference with the
  1207. syntax &#xH; refers to Unicode hexadecimal character number H. The
  1208. hexadecimal representation is a new SGML convention and is particularly
  1209. useful since character standards use hexadecimal representations.
  1210.  
  1211. Here are some examples:
  1212.  
  1213.    * Entity å refers to the letter "a" with a small circle above it
  1214.      (used, for example, in Norwegian).
  1215.    * Entity å refers to the same character with the hexadecimal
  1216.      representation.
  1217.    * Entity И refers to the Cyrillic capital letter "I".
  1218.    * Entity 水 refers to the Chinese character for water with the
  1219.      hexadecimal representation.
  1220.  
  1221. To give authors a more intuitive way to refer to characters in the document
  1222. character set, HTML offers a set of named character entities. Named
  1223. character references replace integer references with symbolic names. The
  1224. named entity å refers to the same Unicode character as å. There
  1225. is no named entity for the Cyrillic capital letter "I". The full list of
  1226. named character entities is included in this specification.
  1227.  
  1228. Four named character entities deserve special mention since they are
  1229. frequently used to "escape" special characters: For text appearing as part
  1230. of the content of an element, you should escape < as < to avoid possible
  1231. confusion with the beginning of a tag. The & character should be escaped as
  1232. & to avoid confusion with the beginning of an entity reference.
  1233.  
  1234. You should also escape & within attribute values since entity references are
  1235. allowed within cdata attribute values. In addition, you should escape > as
  1236. > to avoid problems with older user agents that incorrectly perceive this
  1237. as the end of a tag when coming across this character in quoted attribute
  1238. values.
  1239.  
  1240. Rather than worry about rules for quoting attribute values, its often easier
  1241. to encode any instance of " by " and to always use " for quoting
  1242. attribute values. Many people find it simpler to always escape these 4
  1243. characters in element content and attribute values.
  1244.  
  1245.    * "&" to represent the & sign.
  1246.    * "<" to represent the < sign.
  1247.    * ">" to represent the > sign.
  1248.    * "" to represent the " mark.
  1249.  
  1250. Names of named character entities are case-sensitive. Thus, Å refers
  1251. to a different character (upper case A, ring) than å (lower case a,
  1252. ring).
  1253.  
  1254. Note: In SGML, it is possible to eliminate the final ";" after a numeric or
  1255. named character reference in some cases (e.g., at a line break or directly
  1256. before a tag). In other circumstances it may not be eliminated (e.g., in the
  1257. middle of a word). We strongly suggest using the ";" in all cases to avoid
  1258. problems with user agents that require this character to be present.
  1259.  
  1260.                            Basic HTML data types
  1261.  
  1262. Contents
  1263.  
  1264.   1. URLs
  1265.   2. Character data
  1266.   3. Colors
  1267.        1. Notes on using colors
  1268.   4. Lengths and Pixels
  1269.  
  1270. URLs
  1271.  
  1272. The type "url" refers to either an absolute or relative Universal Resource
  1273. Locator. Please consult the section on URLs for more details.
  1274.  
  1275. Character data
  1276.  
  1277. The syntax of valid character data in HTML is defined in terms of the SGML
  1278. concepts of NAME and CDATA. For more introductory information about SGML,
  1279. please consult the SGML tutorial. For more information about SGML, please
  1280. consult the SGML handbook ([GOLD90]).
  1281.  
  1282.    * NAME. SGML name tokens must begin with a letter (A-Z and a-z) and may
  1283.      be followed by any number of letters, digits, hyphens ("-") and periods
  1284.      (".").
  1285.    * CDATA. For attribute values, this refers to a sequence of characters
  1286.      from the document character set, which may include character entities.
  1287.      User agents should resolve CDATA before further processing of attribute
  1288.      values. The HTML 4.0 specification often places further constraints on
  1289.      the permitted syntax for CDATA attributes.
  1290.  
  1291.      Although the STYLE and SCRIPT elements use CDATA for their data model,
  1292.      for these elements, CDATA must be handled differently by user agents.
  1293.      Markup and entities must be treated as raw text and passed to the
  1294.      application as is. The first occurrence of the character sequence "</"
  1295.      is treated as terminating the end of the element's content. In valid
  1296.      documents, this would be the end tag for the element.
  1297.  
  1298. Colors
  1299.  
  1300. The attribute value type "color" refers to color definitions as specified in
  1301. [SRGB]. A color value may either be a hexadecimal number (prefixed by a hash
  1302. mark) or one of the following sixteen color names:
  1303.  
  1304.                  Color names and sRGB values
  1305.  
  1306.  [ImaBlack = "#000000"         [ImaGreen = "#008000"
  1307.  
  1308.  [ImaSilver = "#C0C0C0"        [ImaLime = "#00FF00"
  1309.  
  1310.  [ImaGray = "#808080"          [ImaOlive = "#808000"
  1311.  
  1312.  [ImaWhite = "#FFFFFF"         [ImaYellow = "#FFFF00"
  1313.  
  1314.  [ImaMaroon = "#800000"        [ImaNavy = "#000080"
  1315.  
  1316.  [ImaRed = "#FF0000"           [ImaBlue = "#0000FF"
  1317.  
  1318.  [ImaPurple = "#800080"        [ImaTeal = "#008080"
  1319.  
  1320.  [ImaFuchsia = "#FF00FF"       [ImaAqua = "#00FFFF"
  1321.  
  1322. Thus, the color values "#800080" and "Purple" both refer to the color
  1323. purple.
  1324.  
  1325. Notes on using colors
  1326.  
  1327. Although colors can add significant amounts of information to document and
  1328. make them more readable, please consider the following guidelines when
  1329. including color in your documents:
  1330.  
  1331.    * The use of HTML elements and attributes for specifying color is
  1332.      deprecated. You are encouraged to use style sheets instead.
  1333.    * Don't use color combinations that cause problems for people with color
  1334.      blindness in its various forms.
  1335.    * If you use a background image or set the background color, then be sure
  1336.      to set the various text colors as well.
  1337.    * Colors specified with the BODY and FONT elements and bgcolor on tables
  1338.      look different on different platforms (e.g., workstations, Macs,
  1339.      Windows, and LCD panels vs. CRTs), so you shouldn't rely entirely on a
  1340.      specific effect. In the future, support for the [SRGB] color model
  1341.      together with ICC color profiles should mitigate this problem.
  1342.    * When practical, adopt common conventions to minimize user confusion.
  1343.      Unless, of course, your desired effect is to confuse users!
  1344.  
  1345. Lengths and Pixels
  1346.  
  1347. Values of the type "length" may either be specified as an integer
  1348. representing the number of pixels of the canvas (screen, paper) or as a
  1349. percentage of the available horizontal or vertical space. The HTML DTD
  1350. generally uses %Length for length values that permit percentages and %Pixels
  1351. for values that only permit pixels.
  1352.  
  1353. Thus, the value "50" means fifty pixels. For widths, the value "50%" means
  1354. half of the available horizontal space (between margins, within a table
  1355. cell, etc.). For heights, the value "50%" means half of the available
  1356. vertical space (in the current window, the current table cell, etc.).
  1357.  
  1358. For normative information about the definition of a pixel, please consult
  1359. [CSS1].
  1360.  
  1361.                         Structure of HTML documents
  1362.  
  1363. Contents
  1364.  
  1365.   1. Global structure
  1366.        1. HTML version information
  1367.        2. The HTML element
  1368.        3. The HEAD element
  1369.             1. Titles: the TITLE element and the title attribute
  1370.             2. Meta information
  1371.        4. The BODY element
  1372.             1. Omitting the BODY start tag
  1373.             2. Element identifiers: the id and class attributes
  1374.             3. Grouping elements: the DIV and SPAN elements
  1375.             4. Headings: The H1, H2, H3, H4, H5, H6 elements
  1376.             5. The ADDRESS element
  1377.   2. Language information and text direction
  1378.        1. Specifying the language of content: the lang attribute
  1379.             1. Inheritance of language codes
  1380.             2. Interpretation of language codes
  1381.        2. Specifying the direction of text: the dir attribute
  1382.             1. Introduction to the bidirectional algorithm
  1383.             2. Inheritance of text direction information
  1384.             3. Setting the direction of embedded text
  1385.             4. Overriding the bidrectional algorithm: the BDO element
  1386.             5. Support for character directionality and joining
  1387.             6. The effect of style sheets on bidirectionality
  1388.             7. Undisplayable characters
  1389.   3. Text
  1390.        1. White space
  1391.        2. Structured text
  1392.             1. Phrasal elements: EM, STRONG, DFN, CODE, SAMP, KBD, VAR,
  1393.                CITE, and ACRONYM
  1394.             2. Quotations: The BLOCKQUOTE and Q elements
  1395.             3. Subscripts and superscripts: the SUB and SUP elements
  1396.        3. Lines and Paragraphs
  1397.             1. Paragraphs: the P element
  1398.             2. Visual rendering of paragraphs
  1399.             3. Controlling line breaks
  1400.             4. Hyphenation
  1401.             5. Preformatted text: The PRE element
  1402.        4. Marking document changes: The INS and DEL elements
  1403.             1. Date and time format
  1404.   4. Lists
  1405.        1. Unordered (UL) and ordered (OL) lists
  1406.             1. Lists formatted by visual user agents
  1407.        2. Definition lists: the DL, DT, and DD elements
  1408.        3. The DIR and MENU elements
  1409.   5. Tables
  1410.        1. Table structure
  1411.             1. The TABLE element
  1412.             2. Table Captions: The CAPTION element
  1413.             3. Groups of rows: the THEAD, TFOOT, and TBODY elements
  1414.             4. Groups of columns: the COLGROUP and COL elements
  1415.             5. Table rows: The TR element
  1416.             6. Table cells: The TH and TD elements
  1417.        2. Table formatting by visual user agents
  1418.             1. Horizontal and vertical alignment
  1419.             2. Borders and rules
  1420.             3. Cell margins
  1421.        3. Some sample tables
  1422.             1. Sample 1
  1423.             2. Sample 2
  1424.   6. Links
  1425.        1. Sources and Destinations of Hypertext Links
  1426.        2. Path information: the BASE element
  1427.        3. Links and anchors
  1428.             1. Definitions of links and anchors
  1429.             2. The A element
  1430.             3. Anchors with the id attribute
  1431.             4. The LINK element
  1432.             5. Link types
  1433.             6. Links and external style sheets
  1434.             7. Links and search engines
  1435.   7. Inclusions
  1436.        1. Including an object: the OBJECT element
  1437.             1. Object initialization: the PARAM element
  1438.             2. Object declarations and instantiations
  1439.             3. Object alignment
  1440.        2. Including an image: the IMG element
  1441.             1. Image alignment
  1442.        3. Including an applet: the APPLET element
  1443.        4. Including HTML in another HTML document
  1444.        5. Including an image map in an HTML document
  1445.             1. Client-side image maps
  1446.             2. Client-side image maps with MAP and AREA
  1447.             3. Server-side image maps
  1448.        6. Visual presentation of images, objects, and applets
  1449.        7. How to specify alternate text
  1450.  
  1451.                               Global structure
  1452.  
  1453. Contents
  1454.  
  1455.   1. HTML version information
  1456.   2. The HTML element
  1457.   3. The HEAD element
  1458.        1. Titles: the TITLE element and the title attribute
  1459.        2. Meta information
  1460.   4. The BODY element
  1461.        1. Omitting the BODY start tag
  1462.        2. Element identifiers: the id and class attributes
  1463.        3. Grouping elements: the DIV and SPAN elements
  1464.        4. Headings: The H1, H2, H3, H4, H5, H6 elements
  1465.        5. The ADDRESS element
  1466.  
  1467. An HTML 4.0 document generally consists of three parts: a line containing
  1468. version information, a descriptive header section, and a body, which
  1469. contains the document's actual content.
  1470.  
  1471. HTML version information
  1472.  
  1473. The SGML DOCTYPE construct declares which version of HTML was used in
  1474. composing the document (see [GOLD90]).
  1475.  
  1476. Authors should include a declaration resembling the following as the first
  1477. line of each document:
  1478.  
  1479. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Draft//EN">
  1480.  
  1481. The last two letters of the declaration indicate the language of the HTML
  1482. DTD, in this case English ("EN"). User agents may ignore this information.
  1483.  
  1484. Authors may employ a different document type description depending on the
  1485. version of HTML their document relies on. Recommended document types for
  1486. HTML 4.0 are:
  1487.  
  1488. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Draft//EN">
  1489.  
  1490.      For documents following the draft specification for HTML 4.0
  1491.  
  1492. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Final//EN"> or <!DOCTYPE HTML
  1493. PUBLIC "-//W3C//DTD HTML 4.0//EN">
  1494.  
  1495.      For documents following the final specification for HTML 4.0
  1496.  
  1497. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Strict//EN">
  1498.  
  1499.      For documents following the strict specification for HTML 4.0. This is
  1500.      appropriate when you wish to validate documents that don't use the HTML
  1501.      presentation elements and attributes, such as the FONT element and the
  1502.      align attribute.
  1503.  
  1504. <!DOCTYPE HTML SYSTEM "http://www.w3.org/MarkUp/Cougar/relaxed.dtd">
  1505.  
  1506.      For validatation against the DTD on the W3C Web site
  1507.  
  1508. <!DOCTYPE HTML SYSTEM "http://www.w3.org/MarkUp/Cougar/strict.dtd">
  1509.  
  1510.      For validation against the strict DTD on the W3C Web site
  1511.  
  1512. The binding between public identifiers and files can be specified using a
  1513. catalog file following the format recommended by the SGML Open Consortium. A
  1514. sample catalog file for HTML 4.0 is included at the beginning of the section
  1515. on SGML reference information for HTML.
  1516. Note: Some user-agents do not understand more complicated DOCTYPE
  1517. declarations than those listed above.
  1518.  
  1519. The HTML element
  1520.  
  1521. <!ENTITY % version "version CDATA #FIXED '%HTML.Version;'">
  1522.  
  1523. <!ENTITY % html.content "HEAD, (FRAMESET|BODY)">
  1524.  
  1525. <!ELEMENT HTML O O (%html.content)>
  1526. <!ATTLIST HTML
  1527.   %version;
  1528.   %i18n;                           -- lang, dir --
  1529.   >
  1530.  
  1531. Start tag: optional, End tag: optional
  1532.  
  1533. Attribute definitions
  1534.  
  1535. version = url
  1536.      This attribute specifies (with a URL) the location of the DTD for the
  1537.      version of HTML governing the current document. Since the same
  1538.      information must appear in the DOCTYPE header, the usefulness of this
  1539.      attribute is uncertain.
  1540.  
  1541. Attributes defined elsewhere
  1542.  
  1543.    * lang (language information), dir (text direction)
  1544.  
  1545. After version information, the remainder of an HTML document should be
  1546. enclosed by the HTML element. Thus, a typical HTML document has this
  1547. structure:
  1548.  
  1549. <!DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.0 Draft//EN>
  1550. <HTML>
  1551. ...The head, body, etc. goes here...
  1552. </HTML>
  1553.  
  1554. The HEAD element
  1555.  
  1556. <!-- %head.misc defined earlier on as "SCRIPT | STYLE | META | LINK" -->
  1557. <!ENTITY % head.content "TITLE & ISINDEX? & BASE?">
  1558.  
  1559. <!ELEMENT HEAD O O  (%head.content) +(%head.misc)>
  1560. <!ATTLIST HEAD
  1561.   %i18n;                           -- lang, dir --
  1562.   profile     %URL       #IMPLIED  -- named dictionary of meta info --
  1563.   >
  1564.  
  1565. Start tag: optional, End tag: optional
  1566.  
  1567. Attribute definitions
  1568.  
  1569. profile = url
  1570.      This attribute specifies the location of one or more meta data
  1571.      profiles, separated by white space. For future extensions, user agents
  1572.      should consider the value to be a list even though this specification
  1573.      only considers the first URL to be significant. Profiles are discussed
  1574.      below in the section on meta information.
  1575.  
  1576. Attributes defined elsewhere
  1577.  
  1578.    * lang (language information), dir (text direction)
  1579.  
  1580. The HEAD element contains information about the current document, such as
  1581. its title, keywords that may be useful to search engines, and other data
  1582. that is not considered document content. Elements within the HEAD
  1583. declaration must not be rendered by conforming user agents unless otherwise
  1584. specified.
  1585.  
  1586. Titles: the TITLE element and the title attribute
  1587.  
  1588. <!ELEMENT TITLE - -  (#PCDATA)* -(%head.misc)
  1589.     -- The TITLE element is not considered part of the flow of text.
  1590.        It should be displayed, for example as the page header or
  1591.        window title. Exactly one title is required per document.
  1592.     -->
  1593. <!ATTLIST TITLE %i18n>
  1594.  
  1595. Start tag: required, End tag: required
  1596.  
  1597. Attributes defined elsewhere
  1598.  
  1599.    * lang (language information), dir (text direction)
  1600.  
  1601. Every HTML document must have exactly one TITLE element in the HEAD section.
  1602. User agents generally use the title to give people some idea about the
  1603. document's contents, for example, by displaying the title as a caption, or
  1604. speaking it.
  1605.  
  1606. Titles may contain character entities (for accented characters, special
  1607. characters, etc.), but may not contain other markup. Here is a sample
  1608. document title:
  1609.  
  1610. <HTML>
  1611. <HEAD>
  1612. <TITLE>A study of population dynamics</TITLE>
  1613. ... other head elements...
  1614. </HEAD>
  1615. <BODY>
  1616. ... document body...
  1617. </BODY>
  1618. </HTML>
  1619.  
  1620. Related to the TITLE element is the title attribute.
  1621.  
  1622. Attribute definitions
  1623.  
  1624. title = cdata
  1625.      This attribute offers advisory information about the element for which
  1626.      it is set.
  1627.  
  1628. Unlike the TITLE element, which provides information about an entire
  1629. document and may only appear once, the title attribute may annotate any
  1630. number of elements. Please consult an element's definition to verify that it
  1631. supports this attribute. Values of the title attribute may be rendered by
  1632. user agents in a variety of ways. For instance, visual browsers frequently
  1633. display the title as a "tool tip" (a short message that appears when the
  1634. pointing device pauses over an object). Audio user agents may speak the
  1635. title information in a similar context. For example, setting the attribute
  1636. on a link allows user agents (visual and non-visual) to tell users about the
  1637. nature of the linked resource:
  1638.  
  1639. ...some text...
  1640. Here's a photo of
  1641. <A href="http://someplace.com/neatstuff.gif" title="Me scuba diving">
  1642.    me scuba diving last summer
  1643. </A>
  1644. ...some more text...
  1645.  
  1646. The title attribute has an additional role when used with the LINK element
  1647. to designate an external style sheet. Please consult this section for
  1648. details.
  1649.  
  1650. Note: To improve the quality of speech synthesis for cases handled poorly by
  1651. standard techniques, future versions of HTML may include an attribute for
  1652. encoding phonemic and prosodic information.
  1653.  
  1654. Meta information
  1655.  
  1656. As this specification is being written, a number of approaches are being
  1657. proposed for allowing authors to assign richer machine-readable information
  1658. about documents and other network-accessible resources to an HTML document.
  1659.  
  1660. The current HTML specification allows authors to assign meta data to their
  1661. documents as follows:
  1662.  
  1663.    * Authors may cite an external profile where meta data properties are
  1664.      defined. For example, a profile might define properties that help
  1665.      search engines index documents, such as "author", "copyright",
  1666.      "keywords", etc. A profile is specified via the profile attribute of
  1667.      the HEAD element.
  1668.    * Authors may set values for these properties. This may be done:
  1669.        1. From within a document, via the META element. Thus, the profile
  1670.           may define the name space of properties that can be set by the
  1671.           META element.
  1672.        2. From outside a document, by linking to meta data via the LINK
  1673.           element (see the section on link types). Thus, the profile may
  1674.           define the name space of relationship types that may be used by
  1675.           the LINK element.
  1676.  
  1677. Note that since a profile is defined for the HEAD element, the same profile
  1678. applies to all META and LINK elements in the document head.
  1679.  
  1680. The META element
  1681.  
  1682. <!ELEMENT META - O EMPTY        -- Generic Metainformation -->
  1683. <!ATTLIST META
  1684.   %i18n;                           -- lang, dir, for use with content string --
  1685.   http-equiv  NAME       #IMPLIED  -- HTTP response header name  --
  1686.   name        NAME       #IMPLIED  -- metainformation name --
  1687.   content     CDATA      #REQUIRED -- associated information --
  1688.   scheme      CDATA      #IMPLIED  -- select form of content --
  1689.   >
  1690.  
  1691. Start tag: required, End tag: forbidden
  1692.  
  1693. Attribute definitions
  1694.  
  1695. For the following attributes, the permitted values and their interpretation
  1696. are profile dependent:
  1697.  
  1698. name = cdata
  1699.      This attribute specifies a property name.
  1700. content = cdata
  1701.      This attribute specifies a property's value.
  1702. scheme = cdata
  1703.      This attribute names a scheme to be used to interpret the property's
  1704.      value.
  1705. http-equiv = cdata
  1706.      This attribute may be used in place of the name attribute. HTTP servers
  1707.      use this attribute to gather information for HTTP response message
  1708.      headers.
  1709.  
  1710. Attributes defined elsewhere
  1711.  
  1712.    * lang (language information), dir (text direction)
  1713.  
  1714. The META element can be used to describe properties of a document (e.g.,
  1715. author, expiration date, a list of key words, etc.) and assign values to
  1716. those properties. This specification does not define a normative set of
  1717. properties.
  1718.  
  1719. The name attribute specifies a property and the content attribute specifies
  1720. the property's value. For example,
  1721.  
  1722. <META name="Author" content="Dave Raggett">
  1723.  
  1724. The lang attribute can be used with META to specify the language for the
  1725. value of the content attribute. This enables speech synthesisers to apply
  1726. language dependent pronunciation rules.
  1727.  
  1728. In this example, the author's name is declared to be French.
  1729.  
  1730. <META name="Author" lang="fr" content="Arnaud Le Hors">
  1731.  
  1732. Here's another example: some user agents support the use of META to refresh
  1733. the current page after a few seconds, perhaps replacing it with another
  1734. page.
  1735.  
  1736. <META name="refresh" content="3,http://www.acme.com/intro.html">
  1737.  
  1738. The content is a number specifying the delay in seconds, followed by the URL
  1739. to load when the time is up. This mechanism is generally used to show users
  1740. a fleeting introductory page. However, since some user agents do not support
  1741. this mechanism, authors should include content on the introductory page to
  1742. allow users to navigate away from it (so they don't remain "stranded" on the
  1743. introductory page).
  1744.  
  1745. META and HTTP headers
  1746.  
  1747. The http-equiv attribute can be used in place of the name attribute and has
  1748. a special significance when documents are retrieved via the Hypertext
  1749. Transfer Protocol (HTTP). HTTP servers may use the property name specified
  1750. by the http-equiv attribute to create an [RFC822]-style header in the HTTP
  1751. response. Please see the HTTP specification ([RFC2068]) for details on valid
  1752. HTTP headers.
  1753.  
  1754. The following sample META declaration:
  1755.  
  1756. <META http-equiv="Expires" content="Tue, 20 Aug 1996 14:25:27 GMT">
  1757.  
  1758. will result in the HTTP header:
  1759.  
  1760. Expires: Tue, 20 Aug 1996 14:25:27 GMT
  1761.  
  1762. This can be used by caches to determine when to fetch a fresh copy of the
  1763. associated document.
  1764.  
  1765. META and search engines
  1766.  
  1767. A common use for META is to specify keywords that a search engine may use to
  1768. improve the quality of search results. When several META elements provide
  1769. language-dependent information about a document, search engines may filter
  1770. on the lang attribute to display search results using the language
  1771. preferences of the user. For example,
  1772.  
  1773. <META name="keywords" lang="en"
  1774.          content="vacation,Greece,sunshine">
  1775. <META name="keywords" lang="fr"
  1776.          content="vacances,Grèce,soleil">
  1777.  
  1778. The effectiveness of search engines can also be increased by using the LINK
  1779. element to specify links to translations of the document in other languages,
  1780. links to versions of the document in other media (e.g., PDF), and, when the
  1781. document is part of a collection, links to an appropriate starting point for
  1782. browsing the collection.
  1783.  
  1784. META and PICS
  1785.  
  1786. The Platform for Internet Content Selection [PICS] is an infrastructure for
  1787. associating labels (meta data) with Internet content. Originally designed to
  1788. help parents and teachers control what children can access on the Internet,
  1789. it also facilitates other uses for labels, including code signing, privacy,
  1790. and intellectual property rights management.
  1791.  
  1792. This example illustrates how one can use a META declaration to include a
  1793. PICS 1.1 label:
  1794.  
  1795. <HEAD>
  1796.  <META http-equiv="PICS-Label" content='
  1797.  (PICS-1.1 "http://www.gcf.org/v2.5"
  1798.     labels on "1994.11.05T08:15-0500"
  1799.       until "1995.12.31T23:59-0000"
  1800.       for "http://w3.org/PICS/Overview.html"
  1801.     ratings (suds 0.5 density 0 color/hue 1))
  1802.  '>
  1803. <TITLE>..title goes here..</TITLE>
  1804. </HEAD>
  1805. <BODY>
  1806. ...the body...
  1807. </BODY>
  1808.  
  1809. META and default information
  1810.  
  1811. The META element may be used to specify the default information for a
  1812. document in the following instances:
  1813.  
  1814.    * The default scripting language.
  1815.    * The default style sheet language.
  1816.    * The document character encoding.
  1817.  
  1818. The following example specifies the character encoding for a document as
  1819. being ISO-8859-5
  1820.  
  1821. <META http-equiv="Content-Type" content="text/html; charset=ISO-8859-5">
  1822.  
  1823. Meta data profiles
  1824.  
  1825. The profile attribute of the HEAD specifies the location of a meta data
  1826. profile. The value of the profile attribute is a URL. User agents may use
  1827. this URL in two ways:
  1828.  
  1829.    * As a globally unique name. User agents may be able to recognize the
  1830.      name (without actually retrieving the profile) and perform some
  1831.      activity based on known conventions for that profile. For instance,
  1832.      search engines could provide an interface for searching through
  1833.      catalogs of HTML documents, where these documents all use the same
  1834.      profile for representing catalog entries.
  1835.    * As a link. User agents may dereference the URL and, perform some
  1836.      activity based on the actual definitions within the profile (e.g.,
  1837.      validate the usage of the profile within the current HTML document).
  1838.      This specification does not define formats for profiles.
  1839.  
  1840. This example refers to a hypothetical profile that defines useful properties
  1841. for document indexing. The properties defined by this profile --- including
  1842. "author", "copyright", "keywords", and "date" --- have their values set by
  1843. subsequent META declarations.
  1844.  
  1845.  <HEAD profile="http://www.acme.com/profiles/core">
  1846.   <TITLE>How to complete Memorandum cover sheets</TITLE>
  1847.   <META name="author" content="John Doe">
  1848.   <META name="copyright" content="© 1997 Acme Corp.">
  1849.   <META name="keywords" content="corporate,guidelines,cataloging">
  1850.   <META name="date" content="23 Jan 1997 16:05:31 GMT">
  1851.  </HEAD>
  1852.  
  1853. As this specification is being written, it is common practice to use the
  1854. date formats described in [RFC2068]. HTTP applications have historically
  1855. allowed three different formats for the representation of date/time stamps:
  1856.  
  1857.  Sun, 06 Nov 1994 08:49:37 GMT  ; RFC 822, updated by RFC 1123
  1858.  Sunday, 06-Nov-94 08:49:37 GMT ; RFC 850, obsoleted by RFC 1036
  1859.  Sun Nov  6 08:49:37 1994       ; ANSI C's asctime() format
  1860.  
  1861. According to [RFC2068], the first format is preferred. It represents a
  1862. fixed-length subset of that defined by [RFC1123] (an update to [RFC822]).
  1863. The second format is in common use, but is based on the obsolete
  1864. [RFC850]date format and lacks a four-digit year. HTTP 1.1 clients must
  1865. accept all of these forms, but only generate [RFC1123] format for use in
  1866. HTTP headers. HTML user agents are expected to follow HTTP 1.1 in this
  1867. regards, and in addition to provide support for the [ISO8601] date format,
  1868. e.g. "1997-01-23T16:05:31+00:00". For more information, see the sections on
  1869. the INS and DEL elements.
  1870.  
  1871. The scheme attribute is used to identify the expected format of the value of
  1872. the content attribute, for cases when a property supports multiple formats.
  1873. The values permitted for the scheme attribute depend on the property name
  1874. and the profile.
  1875.  
  1876. The first META declaration in the following example refers to the Dewey
  1877. Decimal System (dds) scheme. The second refers to the ISBN scheme.
  1878.  
  1879. <META scheme="dds" name="description"
  1880.          content="04.251 Supercomputers systems design">
  1881. <META scheme="ISBN"  name="identifier" content="0-8230-2355-9">
  1882.  
  1883. Note: One sample profile is the Dublin Core[DCORE]. This profile defines a
  1884. set of recommended properties for electronic bibliographic descriptions, and
  1885. is intended to promote interoperability among disparate description models.
  1886.  
  1887. The BODY element
  1888.  
  1889. <!ENTITY % block "(%blocklevel | %inline)*">
  1890.  
  1891. <!ENTITY % Color "CDATA" -- a color using sRGB: #RRGGBB as Hex values -->
  1892.  
  1893. <!-- There are also 16 widely known color names with their sRGB values:
  1894.  
  1895.     Black  = #000000    Green  = #008000
  1896.     Silver = #C0C0C0    Lime   = #00FF00
  1897.     Gray   = #808080    Olive  = #808000
  1898.     White  = #FFFFFF    Yellow = #FFFF00
  1899.     Maroon = #800000    Navy   = #000080
  1900.     Red    = #FF0000    Blue   = #0000FF
  1901.     Purple = #800080    Teal   = #008080
  1902.     Fuchsia= #FF00FF    Aqua   = #00FFFF
  1903.  -->
  1904.  
  1905. <!ENTITY % bodycolors "
  1906.   bgcolor %Color #IMPLIED
  1907.   text  %Color   #IMPLIED
  1908.   link  %Color   #IMPLIED
  1909.   vlink %Color   #IMPLIED
  1910.   alink %Color   #IMPLIED
  1911.   ">
  1912.  
  1913. <!ELEMENT BODY O O  (%block) -(BODY) +(INS|DEL)>
  1914. <!ATTLIST BODY
  1915.   %attrs;                          -- %coreattrs, %i18n, %events --
  1916.   background  %URL       #IMPLIED  -- texture tile for document background --
  1917.   %bodycolors;                     -- bgcolor, text, link, vlink, alink --
  1918.   onload      %Script    #IMPLIED  -- the document has been loaded --
  1919.   onunload    %Script    #IMPLIED  -- the document has been removed --
  1920.   >
  1921.  
  1922. Start tag: optional, End tag: optional
  1923.  
  1924. Attribute definitions
  1925.  
  1926. background = url
  1927.      Deprecated.The value of this attribute is a URL that designates an
  1928.      image resource. The image generally tiles the background (for visual
  1929.      browsers).
  1930. text =color
  1931.      Deprecated.This attribute sets the foreground color for text (for
  1932.      visual browsers).
  1933. link = color
  1934.      Deprecated.This attribute sets the color of text marking unvisited
  1935.      hypertext links (for visual browsers).
  1936. vlink = color
  1937.      Deprecated.This attribute sets the color of text marking visited
  1938.      hypertext links (for visual browsers).
  1939. alink = color
  1940.      Deprecated.This attribute sets the color of text marking hypertext
  1941.      links when selected by the user (for visual browsers).
  1942.  
  1943. Attributes defined elsewhere
  1944.  
  1945.    * id, class (document-wide identifiers)
  1946.    * lang (language information), dir (text direction)
  1947.    * title (element titles)
  1948.    * style (inline style information)
  1949.    * bgcolor (background color)
  1950.    * onload, onunload (intrinsic events)
  1951.    * onclick, ondblclick, onmousedown, onmouseup, onmouseover, onmousemove,
  1952.      onmouseout, onkeypress, onkeydown, onkeyup (intrinsic events)
  1953.  
  1954. The body of a document contains the document's content. The content may be
  1955. presented by a user agent in a variety of ways. For example, for visual
  1956. browsers, you can think of the body as a canvas where the content appears:
  1957. text, images, colors, graphics, etc. For audio user agents, the same content
  1958. may be spoken. Since style sheets are now the preferred way to specify a
  1959. document's presentation, the presentational attributes of BODY have been
  1960. deprecated. These attributes should only be used when you need to control
  1961. the presentation for user agents that don't support style sheets.
  1962.  
  1963. The following line of HTML illustrates the use of the deprecated attributes.
  1964. It sets the background color of the canvas to white, the text foreground
  1965. color to black, and the color of hyperlinks to red initially, fuschia when
  1966. activated, and maroon once visited.
  1967.  
  1968. DEPRECATED EXAMPLE:
  1969.  
  1970. <HTML>
  1971. <HEAD>
  1972.  <TITLE>A study of population dynamics</TITLE>
  1973. </HEAD>
  1974. <BODY bgcolor="white" text="black"
  1975.   link="red" alink="fuschia" vlink="maroon">
  1976.   ... document body...
  1977. </BODY>
  1978. </HTML>
  1979.  
  1980. Using style sheets, the same effect could be accomplished as follows:
  1981.  
  1982. <HTML>
  1983. <HEAD>
  1984.  <TITLE>A study of population dynamics</TITLE>
  1985.  <STYLE type="text/css">
  1986.   BODY { background: white; color: black}
  1987.   A:link { color: red }
  1988.   A:visited { color: maroon }
  1989.   A:active { color: fuschia }
  1990.  </STYLE>
  1991. </HEAD>
  1992. <BODY>
  1993.   ... document body...
  1994. </BODY>
  1995. </HTML>
  1996.  
  1997. Using linked style sheets gives you the flexibility to change the
  1998. presentation without revising the document:
  1999.  
  2000. <HTML>
  2001. <HEAD>
  2002.  <TITLE>A study of population dynamics</TITLE>
  2003.  <LINK rel="stylesheet" type="text/css" href="smartstyle.css">
  2004. </HEAD>
  2005. <BODY>
  2006.   ... document body...
  2007. </BODY>
  2008. </HTML>
  2009.  
  2010. Omitting the BODY start tag
  2011.  
  2012. The BODY start tag has hitherto been optional. The introduction of the
  2013. FRAMESET element unfortunately changes that due to a technicality with the
  2014. ISO8879 SGML standard. Documents that contain framesets replace the BODY
  2015. element by the FRAMESET element. Please consult the section on frames for
  2016. more information. This means that not all HTML documents have a BODY
  2017. element, and this in turn through a quirk of ISO 8879 means that you can't
  2018. omit the BODY start tag, for any document.
  2019.  
  2020. Which will cost the most? Requiring all non-frameset documents to include a
  2021. BODY start tag or changing the definition of FRAMESET? How many HTML
  2022. documents currently omit the BODY start tag? What fraction of those have
  2023. other SGML errors? There is a possibility that the SGML standard itself will
  2024. change in such a way that the problem no longer occurs. Perhaps we should
  2025. simply wait for this to happen?
  2026.  
  2027. Another possibility would be to require a BODY element for frameset
  2028. documents. You could then always omit the BODY start tag. The BODY element
  2029. would be used to provide an alternative content for user agents which either
  2030. don't support frames or which have temporarily disabled the use of frames.
  2031. It is in any case a good idea to provide such content to avoid
  2032. interoperability problems. Under the existing definition you can do this via
  2033. a NOFRAMES element within the FRAMESET element. The proposed change would
  2034. place the same content after the FRAMESET element as part of the BODY
  2035. element. How many documents would this effect?
  2036.  
  2037. Element identifiers: the id and class attributes
  2038.  
  2039. Attribute definitions
  2040.  
  2041. id = name
  2042.      This attribute assigns a document-wide name to a specific instance of
  2043.      an element. Values for id must be unique within a document.
  2044.      Furthermore, this attribute shares the same name space as the name
  2045.      attribute.
  2046. class = cdata-list
  2047.      This attribute assigns a class or set of classes to a specific instance
  2048.      of an element. Any number of elements may be assigned the same class
  2049.      name or names. They must be separated by white space characters.
  2050.  
  2051. The id and class attributes assign identifiers to an element instance.
  2052.  
  2053. An identifier specified by id must be unique within a document. A class name
  2054. specified by class may be shared by several element instances. Class values
  2055. should be chosen to distinguish the role of the element the class is
  2056. associated with, e.g. note, example, warning.
  2057.  
  2058. These attributes can be used in the following ways:
  2059.  
  2060.    * The id attribute may be used as a destination for hypertext links (see
  2061.      the section on anchors).
  2062.    * Scripts can use the id attribute to reference a particular element.
  2063.    * Style sheets can use the id attribute to apply a style to a particular
  2064.      element.
  2065.    * The id attribute is used to identify OBJECT element declarations.
  2066.    * Style sheets can use the class attribute to apply a style to a set of
  2067.      elements associated with this class, or to elements that occur as the
  2068.      children of such elements.
  2069.    * Both id and class can be used for further processing purposes, e.g. for
  2070.      identifying fields when extracting data from HTML pages into a
  2071.      database, translating HTML documents into other formats, etc.).
  2072.  
  2073. Almost every HTML element may be assigned identifier and class information.
  2074.  
  2075. Suppose, for example, that we are writing a document about a programming
  2076. language. The document is to include a number of preformatted examples. We
  2077. use the PRE element to format the examples. We also assign a background
  2078. color (green) to all instances of the PRE element belonging to the class
  2079. "example".
  2080.  
  2081. <HEAD>
  2082. <STYLE
  2083. PRE.example { background : green }
  2084. </STYLE
  2085. </HEAD>
  2086. <BODY>
  2087. <PRE class="example" id="example-1">
  2088. ...example code here...
  2089. </PRE>
  2090. </BODY>
  2091.  
  2092. By setting the id attribute for this example, we can (1) create a hyperlink
  2093. to it and (2) override class style information with instance style
  2094. information.
  2095.  
  2096. Grouping elements: the DIV and SPAN elements
  2097.  
  2098. <!ELEMENT DIV - - %block>
  2099. <!ATTLIST DIV
  2100.   %attrs;                          -- %coreattrs, %i18n, %events --
  2101.   %align;                          -- align, text alignment --
  2102.   >
  2103. <!ELEMENT SPAN - - (%inline)*     -- generic language/style container -->
  2104. <!ATTLIST SPAN
  2105.   %attrs;                          -- %coreattrs, %i18n, %events --
  2106.   >
  2107.  
  2108. Start tag: required, End tag: required
  2109.  
  2110. Attributes defined elsewhere
  2111.  
  2112.    * id, class (document-wide identifiers)
  2113.    * lang (language information), dir (text direction)
  2114.    * title (element titles)
  2115.    * style (inline style information)
  2116.    * align (alignment)
  2117.    * onclick, ondblclick, onmousedown, onmouseup, onmouseover, onmousemove,
  2118.      onmouseout, onkeypress, onkeydown, onkeyup (intrinsic events)
  2119.  
  2120. The DIV and SPAN elements, in conjunction with the id and class attributes,
  2121. offer a generic mechanism for adding structure to documents. These are the
  2122. only two HTML elements that do not add presentation to their enclosed
  2123. content. Thus, by creating instances and classes of elements and applying
  2124. style sheets to them, authors may specialize HTML according to their needs
  2125. and tastes.
  2126.  
  2127. Suppose we wanted to generate a document from a database of client
  2128. information. Since HTML does not include elements that identify objects such
  2129. as "client", "telephone number", "email address", etc., we use DIV and SPAN
  2130. to tailor HTML to our own needs.
  2131.  
  2132. In this example, every client's last name belongs to the class
  2133. "client-last-name", etc. We also assign a unique identifier to each client
  2134. ("client-boyera", "client-lafon", etc.).
  2135.  
  2136. <DIV id="client-boyera" class="client">
  2137. <SPAN class="client-last-name">Last name:</SPAN> Boyera,
  2138. <SPAN class="client-first-name">First name:</SPAN> Stephane
  2139. <SPAN class="client-tel">Telephone:</SPAN> (212) 555-1212
  2140. <SPAN class="client-email">Email:</SPAN> sb@foo.org
  2141. </DIV>
  2142.  
  2143. <DIV id="client-lafon" class="client">
  2144. <SPAN class="client-last-name">Last name:</SPAN> Lafon,
  2145. <SPAN class="client-first-name">First name:</SPAN> Yves
  2146. <SPAN class="client-tel">Telephone:</SPAN> (617) 555-1212
  2147. <SPAN class="client-email">Email:</SPAN> yves@bar.com
  2148. </DIV>
  2149.  
  2150. Later, we may easily add style information to our document to fine tune the
  2151. presentation of these database entries.
  2152.  
  2153. SPAN is an inline element and can be used within paragraphs, list items,
  2154. etc. when you want assign class or language information to a group of words.
  2155. SPAN cannot be used to group block-level elements. SPAN has no inherent
  2156. effect on rendering until you apply a style, e.g., via a style attribute, or
  2157. a linked style sheet.
  2158.  
  2159. DIV by contrast, is a block-level element. It can be used to group other
  2160. block-level elements, but can't be used within paragraph elements. A DIV
  2161. element following an unclosed P element will terminate that paragraph.
  2162.  
  2163. User agents generally place a line break before and after DIV elements, for
  2164. instance:
  2165.  
  2166. <P>aaaaaaaaa<DIV>bbbbbbbbb</DIV><DIV>ccccc<P>ccccc</DIV>
  2167.  
  2168. This is typically rendered as:
  2169.  
  2170. aaaaaaaaa
  2171. bbbbbbbbb
  2172. ccccc
  2173.  
  2174. ccccc
  2175.  
  2176. Your user agent renders this as follows:
  2177.  
  2178. aaaaaaaaa
  2179. bbbbbbbbb
  2180. ccccc
  2181.  
  2182. ccccc
  2183.  
  2184. Headings: The H1, H2, H3, H4, H5, H6 elements
  2185.  
  2186. <!ENTITY % heading "H1|H2|H3|H4|H5|H6">
  2187. <!--
  2188.   There are six levels of headings from H1 (the most important)
  2189.   to H6 (the least important).
  2190. -->
  2191.  
  2192. <!ELEMENT (%heading)  - -  (%inline;)*>
  2193. <!ATTLIST (%heading)
  2194.   %attrs;                          -- %coreattrs, %i18n, %events --
  2195.   %align;                          -- align, text alignment --
  2196.   >
  2197.  
  2198. Start tag: required, End tag: required
  2199.  
  2200. Attributes defined elsewhere
  2201.  
  2202.    * id, class (document-wide identifiers)
  2203.    * lang (language information), dir (text direction)
  2204.    * title (element titles)
  2205.    * style (inline style information)
  2206.    * align (alignment)
  2207.    * onclick, ondblclick, onmousedown, onmouseup, onmouseover, onmousemove,
  2208.      onmouseout, onkeypress, onkeydown, onkeyup (intrinsic events)
  2209.  
  2210. A heading element briefly describes the topic of the section it introduces.
  2211. Heading information may be used by user agents, for example, to construct a
  2212. table of contents for a document automatically.
  2213.  
  2214. There are six levels of headings in HTML with H1 as the most important and
  2215. H6 as the least. Visual browsers usually render more important headings in
  2216. larger fonts than less important ones.
  2217.  
  2218. The following example shows how to use the DIV element to associate a
  2219. heading with the document section that follows it. Doing so allows you to
  2220. define a style for the section (color the background, set the font, etc.)
  2221. with style sheets.
  2222.  
  2223. <DIV class="section" id="forest-elephants" >
  2224. <H1>Forest elephants</H1>
  2225. In this section, we discuss the lesser known forest elephants.
  2226. ...this section continues...
  2227. <DIV class="subsection" id="forest-habitat" >
  2228. <H2>Habitat</H2>
  2229. Forest elephants do not live in trees but among them.
  2230. ...this subsection continues...
  2231. </DIV>
  2232. </DIV>
  2233.  
  2234. This structure may be decorated with style information such as:
  2235.  
  2236. <HEAD>
  2237. <STYLE>
  2238. DIV.section { text-align: justify; font-size: 12pt}
  2239. DIV.subsection { text-indent: 2em }
  2240. H1 { font-style: italic; color: green }
  2241. H2 { color: green }
  2242. </STYLE>
  2243. </HEAD>
  2244.  
  2245. Numbered sections and references
  2246. HTML does not itself cause section numbers to be generated from headings.
  2247. This facility may be offered by user agents, however. Soon, style sheet
  2248. languages such as CSS will allow authors to control the generation of
  2249. section numbers (handy for forward references in printed documents, as in
  2250. "See section 7.2").
  2251.  
  2252. Some people consider skipping heading levels to be bad practice. They accept
  2253. H1 H2 H1 while they do not accept H1 H3 H1 since the heading level H2 is
  2254. skipped.
  2255.  
  2256. The ADDRESS element
  2257.  
  2258. <!ELEMENT ADDRESS - - ((%inline;) | P)*>
  2259. <!ATTLIST ADDRESS
  2260.   %attrs;                          -- %coreattrs, %i18n, %events --
  2261.   >
  2262.  
  2263. Start tag: required, End tag: required
  2264.  
  2265. Attributes defined elsewhere
  2266.  
  2267.    * id, class (document-wide identifiers)
  2268.    * lang (language information), dir (text direction)
  2269.    * onclick, ondblclick, onmousedown, onmouseup, onmouseover, onmousemove,
  2270.      onmouseout, onkeypress, onkeydown, onkeyup (intrinsic events)
  2271.  
  2272. For lack of a better place, we include the definition of the ADDRESS here.
  2273. This element adds author and contact information to a document, e.g.,
  2274.  
  2275. <ADDRESS>
  2276. Newsletter editor<BR>
  2277. J. R. Brown<BR>
  2278. 8723 Buena Vista, Smallville, CT 01234<BR>
  2279. Tel: +1 (123) 456 7890
  2280. </ADDRESS>
  2281.  
  2282.                   Language information and text direction
  2283.  
  2284. Contents
  2285.  
  2286.   1. Specifying the language of content: the lang attribute
  2287.        1. Inheritance of language codes
  2288.        2. Interpretation of language codes
  2289.   2. Specifying the direction of text: the dir attribute
  2290.        1. Introduction to the bidirectional algorithm
  2291.        2. Inheritance of text direction information
  2292.        3. Setting the direction of embedded text
  2293.        4. Overriding the bidrectional algorithm: the BDO element
  2294.        5. Support for character directionality and joining
  2295.        6. The effect of style sheets on bidirectionality
  2296.        7. Undisplayable characters
  2297.  
  2298. This section of the document discusses two important issues that affect the
  2299. internationalization of HTML: specifying the language (the lang attribute)
  2300. and direction (the dir attribute) of text in a document.
  2301.  
  2302. Specifying the language of content: the lang attribute
  2303.  
  2304. Attribute definitions
  2305.  
  2306. lang = language-code
  2307.      Specifies the primary language of an element's text content. The value
  2308.      of this attribute is a language code as specified by [RFC1766]. Please
  2309.      consult this document for authoritative information on language codes.
  2310.      Whitespace is not allowed within the language-code. All language-codes
  2311.      are case-insensitive. The default language is "unknown".
  2312.  
  2313. Language information can be used to control rendering of a marked up
  2314. document in a variety of ways. Some situations where this information helps
  2315. include:
  2316.  
  2317.    * Assisting search engines
  2318.    * Speech synthesis
  2319.    * Selecting glyph variants for high quality typography
  2320.    * Choosing a set of quotation marks
  2321.    * Resolving hyphenation ligatures, and spacing
  2322.    * Spell checking and grammar checking
  2323.  
  2324. The lang attribute's value is a language code that identifies a natural
  2325. language spoken, written, or otherwise conveyed by human beings for
  2326. communication of information to other human beings. Computer languages are
  2327. explicitly excluded from language codes.
  2328.  
  2329. [RFC1766] defines and explains the language codes that must be used in HTML
  2330. documents.
  2331.  
  2332. Briefly, language codes consist of a primary code and a possibly empty
  2333. series of subcodes:
  2334.  
  2335.         language-code  = primary-code *( "-" subcode )
  2336.  
  2337. Here are some sample language codes:
  2338.  
  2339.    * "en": English
  2340.    * "en-US": the U.S. version of English.
  2341.    * "en-cockney": the Cockney version of English.
  2342.    * "i-cherokee": the Cherokee language spoken by some Native Americans.
  2343.    * "x-pig-latin": the language "pig-latin" has not been registered with
  2344.      IANA, the organization that controls the namespace of language tags.
  2345.  
  2346. Two-letter primary codes are reserved for [ISO639] language abbreviations.
  2347. Two-letter codes include FR (French), DE (German), IT (Italian), NL (Dutch),
  2348. EL (Greek), ES (Spanish), PT (Portuguese), AR (Arabic), HE (Hebrew), RU
  2349. (Russian), ZH (Chinese), JA (Japanese), HI (Hindi), UR (Urdu), and SA
  2350. (Sanskrit).
  2351.  
  2352. Any two-letter subcode is understood to be a [ISO3166] country code.
  2353.  
  2354. Inheritance of language codes
  2355.  
  2356. An element inherits language code information according to the following
  2357. order of precedence (highest to lowest):
  2358.  
  2359.    * The lang attribute set for the element itself.
  2360.    * An englobing element which has the lang attribute set (i.e., the lang
  2361.      attribute is inherited by nested elements).
  2362.    * The HTTP "Content-Language" header, which may be set at the site level.
  2363.      For example:
  2364.  
  2365.      Content-Language: en-cockney
  2366.  
  2367.    * Sources external to HTML (e.g., user agent default values, user
  2368.      preferences, HTTP headers).
  2369.  
  2370. In this example, the primary language of the document is French ("fr"). One
  2371. paragraph is declared to be in Spanish ("es"), after which the primary
  2372. language returns to French. The following paragraph includes an embedded
  2373. Japanese ("ja") phrase, after which the primary language returns to French.
  2374.  
  2375. <HTML lang="fr">
  2376. <BODY>
  2377. ...Interpreted as French...
  2378. <P lang="es">...Interpreted as Spanish...
  2379. <P>...Interpreted as French again...
  2380. <P>...French text interrupted by<EM lang="ja">some
  2381.          Japanese</EM>French begins here again...
  2382. </BODY>
  2383. </HTML>
  2384.  
  2385. Interpretation of language codes
  2386.  
  2387. In the context of HTML, a language code should be interpreted by user agents
  2388. as a hierarchy of tokens rather than a single token. When a user agent
  2389. adjusts rendering according to language information (say, by comparing style
  2390. sheet language codes and lang values), it should always favor an exact
  2391. match, but should also consider matching primary codes to be sufficient.
  2392. Thus, if the lang attribute value of "en-US" is set for the HTML element, a
  2393. user agent should prefer style information that matches "en-US" first, then
  2394. the more general value "US".
  2395.  
  2396. Note: Language code hierarchies do not guarantee that all languages with a
  2397. common prefix will be understood by those fluent in one or more of those
  2398. languages. They do allow a user to request this commonality when it is true
  2399. for that user.
  2400.  
  2401. For artificial languages such as Elfish or Klingon, it would make sense to
  2402. use the lang attribute to indicate the change from the language of the
  2403. enclosing context. Until the successor to [RFC1766] defines a standard way
  2404. to do this, one possibility is to use the x- prefix convention, e.g.
  2405. x-elfish.
  2406.  
  2407. Specifying the direction of text: the dir attribute
  2408.  
  2409. Attribute definitions
  2410.  
  2411. dir = LTR | RTL
  2412.      Specifies the default direction for directionally weak or neutral text
  2413.      in the element's content (left-to-right or right-to-left) in this
  2414.      document. Possible values:
  2415.         o LTR: Left-to-right text.
  2416.         o RTL: Right-to-left text.
  2417.  
  2418. In addition to specifying the primary language of a document, authors may
  2419. need to specify the default direction of pieces of text or the text in the
  2420. entire document.
  2421.  
  2422. The [UNICODE] specification assigns directionality to Unicode characters and
  2423. defines a (complex) algorithm for determining the proper directionality of
  2424. text. If a document does not contain a displayable right-to-left, a
  2425. conforming user agent is not required to apply the [UNICODE]bidirectional
  2426. algorithm. If a document contains a right-to-left character, and if the user
  2427. agent chooses to display that character, the user agent must use the
  2428. bidirectional algorithm.
  2429.  
  2430. Although Unicode specifies special characters that deal with text direction,
  2431. HTML offers higher-level markup constructs that do the same thing: the dir
  2432. attribute (do not confuse with the DIR element) and the BDO element. Thus,
  2433. to express a Hebrew quotation, it is more intuitive to write
  2434.  
  2435. <Q lang="he" dir="rtl">...a Hebrew quotation...</Q>
  2436.  
  2437. than the equivalent with Unicode references:
  2438.  
  2439. ‫״...a Hebrew quotation...״‬
  2440.  
  2441. User agents must not use the lang attribute to determine text
  2442. directionality.
  2443.  
  2444. In the absence of local overrides, the default direction is inherited from
  2445. enclosing elements.
  2446.  
  2447. Introduction to the bidirectional algorithm
  2448.  
  2449. The following example illustrates the expected behavior of the bidirectional
  2450. algorithm.
  2451.  
  2452. Consider the following example text:
  2453.  
  2454.   english1 HEBREW2 english3 HEBREW4 english5 HEBREW6
  2455.  
  2456. The characters in this example (and in all related examples) are stored in
  2457. the computer the way they are displayed here: the first character in the
  2458. file is "e", the second is "n", and the last is "6".
  2459.  
  2460. Suppose the predominant language of the document containing this paragraph
  2461. is English (left-to-right text). The correct presentation of this line would
  2462. be:
  2463.  
  2464. english1 2WERBEH english3 4WERBEH english5 6WERBEH
  2465.          -------          -------          -------
  2466.             H                H                H
  2467. --------------------------------------------------
  2468.                        E
  2469.  
  2470. The dotted lines indicate the structure of the sentence: English
  2471. predominates and some Hebrew text is embedded. Achieving the correct
  2472. presentation requires no additional markup since the Hebrew fragments are
  2473. reversed correctly by user agents applying the bidirectional algorithm.
  2474.  
  2475. If, on the other hand, the predominant language of the document is Hebrew
  2476. (right-to-left direction), the correct presentation is:
  2477.  
  2478. 6WERBEH english5 4WERBEH english3 2WERBEH english1
  2479.         --------         --------         --------
  2480.             E                E                E
  2481. --------------------------------------------------
  2482.                        H
  2483.  
  2484. In this case, the whole sentence has been presented as right-to-left and the
  2485. embedded English sequences have been properly reversed by the bidirectional
  2486. algorithm.
  2487.  
  2488. Inheritance of text direction information
  2489.  
  2490. The Unicode bidirectional algorithm requires an initial text direction. To
  2491. specify the base direction of a block-level element, set the element's dir
  2492. attribute. The default value of the dir attribute is "ltr" (left-to-right
  2493. text).
  2494.  
  2495. When the dir attribute is set for a block-level element, it remains in
  2496. effect for the duration of the element and any nested block-level elements.
  2497. Setting the dir attribute on a nested element overrides the inherited value.
  2498.  
  2499. To set the primary text direction for an entire document, set the dir
  2500. attribute on the HTML element.
  2501.  
  2502. For example:
  2503.  
  2504. <HTML dir="RTL">
  2505. ...right-to-left text...
  2506. <P dir="ltr">...left-to-right text...</P>
  2507. <P>...right-to-left text again...</P>
  2508. </HTML>
  2509.  
  2510. Inline elements, on the other hand, do not inherit the dir attribute. This
  2511. means that an inline element without a dir attribute does not open an
  2512. additional level of embedding with respect to the bidirectional algorithm.
  2513.  
  2514. Setting the direction of embedded text
  2515.  
  2516. The [UNICODE] bidirectional algorithm automatically reverses embedded
  2517. character sequences according to their inherent directionality (as
  2518. illustrated by the previous examples). However, only one level of embedding
  2519. can be accounted for. To achieve additional levels of embedded direction
  2520. changes, you must make use of the dir attribute on an inline element.
  2521.  
  2522. Consider the same example text as before:
  2523.  
  2524. english1 HEBREW2 english3 HEBREW4 english5 HEBREW6
  2525.  
  2526. Suppose the predominant language of the document containing this paragraph
  2527. is English. The above English sentence contains a Hebrew section extending
  2528. from HEBREW2 through HEBREW4. The Hebrew section contains an English
  2529. quotation (english3). The desired presentation of the text is thus:
  2530.  
  2531. english1 4WERBEH english3 2WERBEH english5 6WERBEH
  2532.                  -------
  2533.                     E
  2534.          ------------------------
  2535.                     H
  2536. --------------------------------------------------
  2537.                     E
  2538.  
  2539. To achieve two embedded direction changes, we must supply additional
  2540. information, which we do by delimiting the second embedding explicitly. In
  2541. this example, we use the SPAN element and the dir attribute to mark up the
  2542. text:
  2543.  
  2544. english1 <SPAN dir="RTL">HEBREW2 english3 HEBREW4</SPAN> english5 HEBREW6
  2545.  
  2546. Authors may also use special Unicode characters to achieve multiply embedded
  2547. direction changes. To achieve left-to-right embedding, surround embedded
  2548. text with the characters LEFT-TO-RIGHT EMBEDDING ("LRE", hexadecimal 202A)
  2549. and POP DIRECTIONAL FORMATTING ("PDF", hexadecimal 202C). To achieve
  2550. right-to-left embedding, surround embedded text with the characters
  2551. RIGHT-TO-LEFT EMBEDDING ("RTE", hexadecimal 202B) and PDF.
  2552.  
  2553. Using HTML directionality markup with Unicode characters. Authors and
  2554. designers of authoring software should be aware that conflicts can arise if
  2555. the dir attribute is used on inline elements (including BDO) concurrently
  2556. with the corresponding [ISO10646] formatting characters. Preferably one or
  2557. the other should be used exclusively. The markup method offers a better
  2558. guarantee of document structural integrity and alleviates some problems when
  2559. editing bidirectional HTML text with a simple text editor, but some software
  2560. may be more apt at using the [ISO10646] characters. If both methods are
  2561. used, great care should be exercised to insure proper nesting of markup and
  2562. directional embedding or override, otherwise, rendering results are
  2563. undefined.
  2564.  
  2565. Overriding the bidrectional algorithm: the BDO element
  2566.  
  2567. <!ELEMENT BDO - - (%inline)*      -- I18N BiDi over-ride -->
  2568. <!ATTLIST BDO
  2569.   lang        NAME       #IMPLIED  -- [RFC1766] language value --
  2570.   dir         (ltr|rtl)  #REQUIRED -- directionality --
  2571.   >
  2572.  
  2573. Start tag: required, End tag: required
  2574.  
  2575. Attributes defined elsewhere
  2576.  
  2577.    * lang (language information), dir (text direction)
  2578.  
  2579. The bidirectional algorithm and the dir attribute generally suffice to
  2580. manage embedded direction changes. However, some situations may arise when
  2581. the bidirectional algorithm results in incorrect presentation. The BDO
  2582. element allows authors to turn off the bidirectional algorithm for selected
  2583. fragments of text.
  2584.  
  2585. Consider an English document containing the same text as before:
  2586.  
  2587. english1 HEBREW2 english3 HEBREW4 english5 HEBREW6
  2588.  
  2589. Suppose this sequence of characters is being read by a user agent from
  2590. left-to-right (the byte stream begins with "e" and ends with "6"). The "e"
  2591. in "english1" is to the left of "n", which is how authors tend to input
  2592. English characters. However, the "H" in "HEBREW2" is to the left of "E",
  2593. which may not be how authors of Hebrew create their documents. For example,
  2594. the MIME standard ([RFC2045]) requires right-to-left character sequences in
  2595. email to be ordered right-to-left in the byte stream. This conflicts with
  2596. the [UNICODE] birectional algorithm, which expects Hebrew characters to be
  2597. ordered left-to-right.
  2598.  
  2599. Thus, if "HEBREW4" in the above example were an excerpt from a Hebrew email
  2600. message, it's structure would actually be "4WERBEH". A user agent applying
  2601. the bidirectional algorithm would thus display the characters in the wrong
  2602. order.
  2603.  
  2604. The easiest solution in this case is to override the bidirectional algorithm
  2605. by putting the Hebrew email excerpt in a BDO element, whose dir attribute is
  2606. set to "LTR":
  2607.  
  2608. english1 HEBREW2 english3 <BDO dir="LTR">4WERBEH</BDO> english5 HEBREW6
  2609.  
  2610. This tells the bidirectional algorithm "Leave me left-to-right!" and would
  2611. produce the desired presentation:
  2612.  
  2613. english1 2WERBEH english3 4WERBEH english5 6WERBEH
  2614.  
  2615. The BDO should be used in scenarios where absolute control over sequence
  2616. order is required (e.g., multi-language part numbers). The dir attribute is
  2617. mandatory for this element.
  2618.  
  2619. Authors may also use special Unicode characters to override the
  2620. bidirectional algorithm --- LEFT-TO-RIGHT OVERRIDE (202D) or RIGHT-TO-LEFT
  2621. OVERRIDE (hexadecimal 202E). The POP DIRECTIONAL FORMATTING (hexadecimal
  2622. 202C) character ends either bidirectional override.
  2623.  
  2624. Note: Recall that conflicts can arise if the dir attribute is used on inline
  2625. elements (including BDO) concurrently with the corresponding [ISO10646]
  2626. formatting characters.
  2627.  
  2628. Bidirectionality and character encoding According to [RFC1555] and
  2629. [RFC1556], there are special conventions for the use of "charset" parameter
  2630. values to indicate bidirectional treatment in MIME mail, in particular to
  2631. distinguish between visual, implicit, and explicit directionality. The
  2632. parameter value "iso-8859-8" (for Hebrew) denotes visual encoding,
  2633. "iso-8859-8-i" denotes implicit bidirectionality, and "iso-8859-8-e" denotes
  2634. explicit directionality.
  2635.  
  2636. Because HTML uses the full Unicode bidirectionality algorithm, conforming
  2637. documents must be labeled as "iso-8859-8-e". Implicit bidirectionality is
  2638. part of the full Unicode algorithm, so the values "iso-8859-8-i" may also be
  2639. accepted, but should not be used.
  2640.  
  2641. The value "iso-8859-8" defines that the document is formatted visually,
  2642. misusing some markup (such as TABLE with right alignment and no line
  2643. wrapping) to ensure reasonable display on older user agents that do not
  2644. handle bidirectionality. Such documents do not conform to the present
  2645. specification. If necessary, they can be made to conform to the current
  2646. specification (and at the same time will be displayed correctly on older
  2647. user agents) by adding BDO markup where necessary. Contrary to what is said
  2648. in [RFC1555] and [RFC1556], iso-8859-6 (Arabic) is not visual ordering.
  2649.  
  2650. Support for character directionality and joining
  2651.  
  2652. Since ambiguities sometimes arise as to the directionality of certain
  2653. characters (e.g., some situations in Arabic), the [UNICODE] specification
  2654. includes characters to enable proper resolution. HTML 4.0 includes a set of
  2655. named character entities that allows partial support of the Unicode
  2656. bidirectional algorithm, plus some help with languages requiring contextual
  2657. analysis for rendering.
  2658.  
  2659. The following DTD excerpt presents some of the directional entities:
  2660.  
  2661.    <!ENTITY zwnj CDATA "‌"--=zero width non-joiner-->
  2662.    <!ENTITY zwj  CDATA "‍"--=zero width joiner-->
  2663.    <!ENTITY lrm  CDATA "‎"--=left-to-right mark-->
  2664.    <!ENTITY rlm  CDATA "‏"--=right-to-left mark-->
  2665.  
  2666. The zwnj entity is used to block joining behavior in contexts where joining
  2667. will occur but shouldn't. The zwj entity does the opposite; it forces
  2668. joining when it wouldn't occur but should. For example, the Arabic letter
  2669. "HEH" is used to abbreviate "Hijri", the name of the Islamic calendar
  2670. system. Since the isolated form of "HEH" looks like the digit five as
  2671. employed in Arabic script (based on Indic digits), in order to prevent
  2672. confusing "HEH" as a final digit five in a year, the initial form of "HEH"
  2673. is used. However, there is no following context (i.e., a joining letter) to
  2674. which the "HEH" can join. The zwj character provides that context.
  2675.  
  2676. Similarly, in Persian texts, there are cases where a letter that normally
  2677. would join a subsequent letter in a cursive connection should not. The
  2678. character zwnj is used to block joining in such cases.
  2679.  
  2680. The other characters, lrm and rlm, are used to disambiguate directionality
  2681. of directionally neutral characters. For example, if a double quotation mark
  2682. comes between an Arabic and a Latin letter, the direction of the quotation
  2683. mark is not clear (is it quoting the Arabic text or the Latin text?). The
  2684. lrm and rlm characters have a directional property but no width and no
  2685. word/line break property. Please consult [UNICODE] for more details.
  2686.  
  2687. Reversed character glyphs: The bidirectional algorithm reverses the
  2688. presentation of a well-defined set of characters such as parentheses (see
  2689. [UNICODE], table 4-7). Except for these characters, bidirectionality
  2690. processing leaves the shape of each glyph unaffected. Thus, if you wanted to
  2691. display the word "MURDER" as it would be seen in a mirror (right-to-left
  2692. character order and reversed glyphs), you could use a BDO element with the
  2693. dir attribute to set the text direction to right-to-left order, e.g.,
  2694.  
  2695. <BDO class="mirror" dir="rtl">MURDER</BDO>
  2696.  
  2697. and the class value "mirror" with a matching rule in the style sheet to
  2698. select a special font that displays characters with the reversed glyphs.
  2699.  
  2700. The effect of style sheets on bidirectionality
  2701.  
  2702. In general, changing an element from being displayed in block from to inline
  2703. or vice-versa due to a style sheet is straightforward. However, because the
  2704. difference between block elements and inline elements is crucial for the
  2705. bidirectional algorithm, special care must be taken.
  2706.  
  2707. When an inline element that does not have a dir attribute is transformed to
  2708. a block element by a style sheet, it inherits the dir attribute from the
  2709. englobing element to define the base direction of the block.
  2710.  
  2711. When a block element that does not have a dir attribute is transformed to an
  2712. inline element by a style sheet, the resulting presentation should be
  2713. equivalent, in terms of bidirectional formatting, to the formatting obtained
  2714. by explicitly adding a dir attribute (assigned the inherited value) to the
  2715. transformed element.
  2716.  
  2717. Undisplayable characters
  2718.  
  2719. User agents may not be able to render meaningfully all character values, for
  2720. instance, because of the lack of an appropriate font, or because a character
  2721. has a value which is inexpressible with the internal character encoding.
  2722.  
  2723. Because there are many different things that can be done in such a case,
  2724. this document does not prescribe any specific behavior. Depending on the
  2725. implementation, this may also be handled by the underlying display system
  2726. and not the application itself. This specification recommends the following
  2727. behavior for user agents:
  2728.  
  2729.   1. Adopt a clearly visible, but unobtrusive mechanism to alert the user of
  2730.      missing resources.
  2731.   2. If the user agent provides a numeric representation of missing
  2732.      characters, the hexadecimal (not decimal) form is preferable as this is
  2733.      the form used in character set standards (see [ERCS]).
  2734.  
  2735.                                     Text
  2736.  
  2737. Contents
  2738.  
  2739.   1. White space
  2740.   2. Structured text
  2741.        1. Phrasal elements: EM, STRONG, DFN, CODE, SAMP, KBD, VAR, CITE, and
  2742.           ACRONYM
  2743.        2. Quotations: The BLOCKQUOTE and Q elements
  2744.        3. Subscripts and superscripts: the SUB and SUP elements
  2745.   3. Lines and Paragraphs
  2746.        1. Paragraphs: the P element
  2747.        2. Visual rendering of paragraphs
  2748.        3. Controlling line breaks
  2749.        4. Hyphenation
  2750.        5. Preformatted text: The PRE element
  2751.   4. Marking document changes: The INS and DEL elements
  2752.        1. Date and time format
  2753.  
  2754. The following sections discuss issues surrounding the structuring of text.
  2755. Elements that format text (alignment elements, font elements, style sheets,
  2756. etc.) are discussed in later sections of the specification. Please consult
  2757. the section on SGML for questions about character syntax.
  2758.  
  2759. White space
  2760.  
  2761. The SGML specification distinguishes between record start characters (line
  2762. feeds) and record ends (carriage returns). On the Internet, some platforms
  2763. use carriage return line feed pairs for line breaks, some use just line
  2764. feeds, and others just carriage returns. As a result, HTML user agents
  2765. should consider both isolated line feed and carriage return characters as
  2766. line breaks, with carriage return line feed pairs treated as single line
  2767. breaks.
  2768.  
  2769. A line break occurring immediately following a start tag should be
  2770. discarded, as should a line break occurring immediately before an end tag.
  2771. This applies to all HTML elements without exceptions. In addition, for all
  2772. elements except PRE, a sequence of contiguous white space characters such as
  2773. spaces, horizontal tabs, form feeds and line breaks, should be replaced by a
  2774. single word space.
  2775.  
  2776. Since the notion of what word space is varies from script (written language)
  2777. to script, user agents should collapse white space in script-sensitive ways.
  2778. For example, in Latin scripts, a single word space is just a space (ASCII
  2779. decimal 32), while in Thai it is a zero-width word separator. In Japanese
  2780. and Chinese, a word space is ignored entirely.
  2781.  
  2782. These rules allow authors to use white space to lay out their markup as
  2783. desired, clarifying the source HTML with white space that will not be
  2784. rendered by a user agent.
  2785.  
  2786. For instance, the following source HTML:
  2787.  
  2788. <P>
  2789.   This example shows a paragraph and a list.
  2790. </P>
  2791.  
  2792. <UL>
  2793.   <LI>
  2794.     This is the <EM>first</EM> item
  2795.   </LI>
  2796.  
  2797.   <LI>
  2798.     This is the <EM>second</EM> item
  2799.   </LI>
  2800. </UL>
  2801.  
  2802. may be rewritten (by omitting end tags) and laid out differently (by using
  2803. less white space):
  2804.  
  2805. <P>This example shows a paragraph and a list.
  2806.  
  2807. <UL>
  2808.   <LI>This is the <EM>first</EM> item
  2809.   <LI>This is the <EM>second</EM> item
  2810. </UL>
  2811.  
  2812. but should be rendered identically by a user agent.
  2813.  
  2814. The PRE element is used for preformatted text, where white space is
  2815. significant. The PRE element is described below.
  2816. Word space processing can and should be done even in the absence of language
  2817. information specified by the lang attribute. This is a script issue, not a
  2818. language issue.
  2819.  
  2820. Structured text
  2821.  
  2822. Phrasal elements: EM, STRONG, DFN, CODE, SAMP, KBD, VAR, CITE, and ACRONYM
  2823.  
  2824. <!ENTITY % phrase "EM | STRONG | DFN | CODE |
  2825.                    SAMP | KBD | VAR | CITE | ACRONYM">
  2826. <!ELEMENT (%font|%phrase) - - (%inline)*>
  2827. <!ATTLIST (%font|%phrase)
  2828.   %attrs;                          -- %coreattrs, %i18n, %events --
  2829.   >
  2830.  
  2831. Start tag: required, End tag: required
  2832.  
  2833. Attributes defined elsewhere
  2834.  
  2835.    * id, class (document-wide identifiers)
  2836.    * lang (language information), dir (text direction)
  2837.    * title (element titles)
  2838.    * style (inline style information)
  2839.    * onclick, ondblclick, onmousedown, onmouseup, onmouseover, onmousemove,
  2840.      onmouseout, onkeypress, onkeydown, onkeyup (intrinsic events)
  2841.  
  2842. Phrasal elements add structural information to text fragments. The usual
  2843. meanings of phrasal elements are following:
  2844.  
  2845. EM:
  2846.      Indicates emphasis.
  2847. STRONG:
  2848.      Indicates stronger emphasis.
  2849. CITE:
  2850.      Cites a reference or other source.
  2851. DFN:
  2852.      Indicates that this is the defining instance of the enclosed term.
  2853. CODE:
  2854.      Designates a fragment of computer code.
  2855. SAMP:
  2856.      Designates sample output from programs, scripts, etc.
  2857. KBD:
  2858.      Indicates text to be entered by the user.
  2859. VAR:
  2860.      Indicates an instance of a variable or program argument.
  2861. ACRONYM:
  2862.      Indicates an acronym (e.g., WWW, HTTP, URL, etc.).
  2863.  
  2864. EM and STRONG are useful in general to indicate emphasis. The other phrasal
  2865. elements have particular significance in technical documents. These examples
  2866. illustrate the rendering of some of the textual markup elements:
  2867.  
  2868. "More information can be found in <CITE>[ISO-0000]</CITE>."
  2869.  
  2870. "Please refer to the following reference number in future
  2871. correspondence: <STRONG>1-234-55</STRONG>"
  2872.  
  2873. The ACRONYM element allows authors to clearly indicate a sequence of
  2874. characters that compose an acronym (e.g., "WWW", "FNAC", "IRS", etc.). The
  2875. ability to identify acronyms is useful to spell checkers, speech
  2876. synthesizers, and other user agents and tools.
  2877.  
  2878. The content of the ACRONYM element specifies the acronym itself. The title
  2879. attribute may be used to provide the text to which the acronym expands. Here
  2880. are some sample acronym definitions:
  2881.  
  2882. <ACRONYM title="World Wide Web">WWW</ACRONYM>
  2883. <ACRONYM
  2884.    lang="fr"
  2885.    title="Société Nationale de Chemins de Fer">
  2886.    SNCF
  2887. </ACRONYM>
  2888.  
  2889. The presentation of phrasal elements depends on the user agent. Generally,
  2890. visual user agents present EM text in italics and STRONG text in bold font.
  2891. Speech synthesiser agents might change the synthesis parameters, such as
  2892. volume, pitch and rate accordingly. Acronyms are generally spoken by
  2893. pronouncing the individual letters separately.
  2894.  
  2895. Note: This version of HTML doesn't include special markup for abbreviations.
  2896. We recommend that speech synthesizers use client-side dictionaries to expand
  2897. any abbreviations found in the document. For specialized vocabularies, LINK
  2898. elements in the document head can be used to reference suitable
  2899. dictionaries.
  2900.  
  2901. Quotations: The BLOCKQUOTE and Q elements
  2902.  
  2903. <!ELEMENT BLOCKQUOTE - - %block>
  2904. <!ATTLIST BLOCKQUOTE
  2905.   %attrs;                          -- %coreattrs, %i18n, %events --
  2906.   cite        %URL       #IMPLIED  -- URL for source document or msg --
  2907.   >
  2908. <!ELEMENT Q - - (%inline)*>
  2909. <!ATTLIST Q
  2910.   %attrs;                          -- %coreattrs, %i18n, %events --
  2911.   cite        %URL       #IMPLIED  -- URL for source document or msg --
  2912.   >
  2913.  
  2914. Start tag: required, End tag: required
  2915.  
  2916. Attribute definitions
  2917.  
  2918. cite = url
  2919.      The value of this attribute is a URL that designates a source document
  2920.      or message. This attribute is intended to give information about the
  2921.      source from which the quotation was borrowed.
  2922.  
  2923. Attributes defined elsewhere
  2924.  
  2925.    * id, class (document-wide identifiers)
  2926.    * lang (language information), dir (text direction)
  2927.    * title (element titles)
  2928.    * style (inline style information)
  2929.    * onclick, ondblclick, onmousedown, onmouseup, onmouseover, onmousemove,
  2930.      onmouseout, onkeypress, onkeydown, onkeyup (intrinsic events)
  2931.  
  2932. These two elements designate quoted text. BLOCKQUOTE is for long quotations
  2933. and Q is intended for short quotations that don't require paragraph breaks.
  2934.  
  2935. This example formats an excerpt from "The Two Towers", by J.R.R. Tolkien, as
  2936. a blockquote.
  2937.  
  2938. <BLOCKQUOTE cite="http://www.mycom.com/tolkien/twotowers.html">
  2939. They went in single file, running like hounds on a strong scent,
  2940. and an eager light was in their eyes. Nearly due west the broad
  2941. swath of the marching Orcs tramped its ugly slot; the sweet grass
  2942. of Rohan had been bruised and blackened as they passed.
  2943. </BLOCKQUOTE>
  2944.  
  2945. Visual user agents generally render BLOCKQUOTE as an indented block.
  2946.  
  2947. Quotation marksIt is recommended that style sheets provide a way to insert
  2948. quotation marks before and after a quotation delimited by Q or BLOCKQUOTE in
  2949. a manner appropriate to the current language context (see the lang
  2950. attribute) and the degree of nesting of quotations.
  2951.  
  2952. However, as some authors have used BLOCKQUOTE merely as a mechanism to
  2953. indent text, in order to preserve the intention of the authors, it is
  2954. recommended that user agents not insert quotation marks in the default
  2955. style.
  2956.  
  2957. Furthermore, if authors include quotation marks in a Q or BLOCKQUOTE
  2958. element, user agents should not insert additional quotation marks.
  2959.  
  2960. The usage of BLOCKQUOTE to indent text is deprecated in favor of style
  2961. sheets.
  2962.  
  2963. Subscripts and superscripts: the SUB and SUP elements
  2964.  
  2965. <!-- subscripts and superscripts -->
  2966. <!ELEMENT (SUB|SUP) - - (%inline)*>
  2967. <!ATTLIST (SUB|SUP)
  2968.   %attrs;                          -- %coreattrs, %i18n, %events --
  2969.   >
  2970.  
  2971. Start tag: required, End tag: required
  2972.  
  2973. Attributes defined elsewhere
  2974.  
  2975.    * id, class (document-wide identifiers)
  2976.    * lang (language information), dir (text direction)
  2977.    * title (element titles)
  2978.    * style (inline style information)
  2979.    * onclick, ondblclick, onmousedown, onmouseup, onmouseover, onmousemove,
  2980.      onmouseout, onkeypress, onkeydown, onkeyup (intrinsic events)
  2981.  
  2982. Many scripts (e.g., French) require superscripts or subscripts for proper
  2983. rendering. The SUB and SUP elements should be used to markup text in these
  2984. cases.
  2985.  
  2986. Here, we use SUP to raise the "lle" in the French "Mlle Dupont":
  2987.  
  2988.       M<sup>lle</sup> Dupont
  2989.  
  2990. Lines and Paragraphs
  2991.  
  2992. Authors traditionally divide their thoughts and arguments into sequences of
  2993. paragraphs. The organization of information into paragraphs is not affected
  2994. by how the paragraphs are presented: paragraphs that are double-justified
  2995. contain the same thoughts as those that are left-justified.
  2996.  
  2997. The HTML markup for defining a paragraph is straightforward: the P element
  2998. defines a paragraph.
  2999.  
  3000. The visual presentation of paragraphs is not so simple. A number of issues,
  3001. both stylistic and technical, must be addressed:
  3002.  
  3003.    * Treatment of white space
  3004.    * Line breaking and word wrapping
  3005.    * Justification
  3006.    * Hyphenation
  3007.    * Written language conventions and text directionality
  3008.    * Formatting of paragraphs with respect to surrounding content
  3009.  
  3010. We address these questions below. Paragraph alignment and floating objects
  3011. are discussed later in this document.
  3012.  
  3013. Paragraphs: the P element
  3014.  
  3015. <!ELEMENT P - O (%inline)*>
  3016. <!ATTLIST P
  3017.   %attrs;                          -- %coreattrs, %i18n, %events --
  3018.   %align;                          -- align, text alignment --
  3019.   >
  3020.  
  3021. Start tag: required, End tag: optional
  3022.  
  3023. Attributes defined elsewhere
  3024.  
  3025.    * id, class (document-wide identifiers)
  3026.    * lang (language information), dir (text direction)
  3027.    * title (element titles)
  3028.    * style (inline style information)
  3029.    * align (alignment)
  3030.    * onclick, ondblclick, onmousedown, onmouseup, onmouseover, onmousemove,
  3031.      onmouseout, onkeypress, onkeydown, onkeyup (intrinsic events)
  3032.  
  3033. The P element represents a paragraph. It cannot contain block-level elements
  3034. (including P itself). You can omit the end tag, which is then implied by the
  3035. next block-level start tag. It is also implied by the end tag of the element
  3036. that encloses the P element.
  3037. For example, the following two paragraphs:
  3038.  
  3039. <P>This is the first paragraph.</P>
  3040. <P>This is the second paragraph.</P>
  3041. ...a block element...
  3042.  
  3043. may be rewritten without their end tags:
  3044.  
  3045. <P>This is the first paragraph.
  3046. <P>This is the second paragraph.
  3047. ...a block element...
  3048.  
  3049. since both are implicitly ended by the block elements that follow them.
  3050. Similarly, if a paragraph is enclosed by a block element, as in:
  3051.  
  3052. <DIV>
  3053. <P>This is the paragraph.
  3054. </DIV>
  3055.  
  3056. the end tag of the enclosing block element (here, DIV) implies the end tag
  3057. of the P element.
  3058.  
  3059. Empty P elements are bad form and should be ignored by the renderer.
  3060.  
  3061. Visual rendering of paragraphs
  3062.  
  3063. How paragraphs are rendered visually depends on the user agent. Paragraphs
  3064. are usually rendered flush left with a ragged right margin. Other defaults
  3065. are appropriate for right-to-left scripts.
  3066.  
  3067. HTML user agents have traditionally rendered paragraphs with white space
  3068. before and after, e.g.,
  3069.  
  3070.   At the same time, there began to take form a system of numbering,
  3071.   the calendar, hieroglyphic writing, and a technically advanced
  3072.   art, all of which later influenced other peoples.
  3073.  
  3074.   Within the framework of this gradual evolution or cultural
  3075.   progress the Preclassic horizon has been divided into Lower,
  3076.   Middle and Upper periods, to which can be added a transitional
  3077.   or Protoclassic period with several features that would later
  3078.   distinguish the emerging civilizations of Mesoamerica.
  3079.  
  3080. This contrasts with the style used in novels which indents the first line of
  3081. the paragraph and uses the regular line spacing between the line of the last
  3082. paragraph and the first line of the next, e.g.,
  3083.  
  3084.      At the same time, there began to take form a system of
  3085.   numbering, the calendar, hieroglyphic writing, and a technically
  3086.   advanced art, all of which later influenced other peoples.
  3087.      Within the framework of this gradual evolution or cultural
  3088.   progress the Preclassic horizon has been divided into Lower,
  3089.   Middle and Upper periods, to which can be added a transitional
  3090.   or Protoclassic period with several features that would later
  3091.   distinguish the emerging civilizations of Mesoamerica.
  3092.  
  3093. Following the precedent set by the NCSA Mosaic browser in 1993, user agents
  3094. generally don't justify both margins, in part because it's hard to do this
  3095. effectively without sophisticated hyphenation routines. The advent of style
  3096. sheets, and antialiased fonts with subpixel positioning promises to offer
  3097. richer choices to HTML authors than previously possible.
  3098.  
  3099. Style sheets provide rich control over the size and style of a font, the
  3100. margins, space before and after a paragraph, the first line indent,
  3101. justification and many other details. The user agent's default style sheet
  3102. renders P elements in a familar form, as illustrated above. You could in
  3103. principle override this to render paragraphs without the breaks that
  3104. conventionally distinguish successive paragraphs, but this would be
  3105. confusing to readers and as a rule bad practice.
  3106.  
  3107. By convention, visual HTML user agents wrap text lines to fit within the
  3108. available margins. Wrapping algorithms depend on the script being formatted.
  3109.  
  3110. In Western scripts, for example, text should only be wrapped at white space.
  3111. Early user agents incorrectly wrapped lines at the beginning (or end) of
  3112. elements, which resulted in dangling punctuation. For example,
  3113.  
  3114.   A statue of the <a href="cih78">Cihuateteus</a>, who are patron ...
  3115.  
  3116. Wrapping the line at the end of the anchor tag causes the comma to be
  3117. stranded at the beginning of the next line:
  3118.  
  3119.   A statue of the Cihuateteus
  3120.   , who are patron goddesses ...
  3121.  
  3122. This is an error, since there was no white space at that point in the
  3123. markup.
  3124.  
  3125. Controlling line breaks
  3126.  
  3127. It is possible to force or forbid a line break in HTML.
  3128.  
  3129. Forcing a line break: the BR element
  3130.  
  3131. <!ELEMENT BR - O EMPTY          -- forced line break -->
  3132. <!ATTLIST BR
  3133.   %coreattrs;                      -- id, class, style, title --
  3134.   clear (left|all|right|none) none -- control of text flow --
  3135.   >
  3136.  
  3137. Start tag: required, End tag: forbidden
  3138.  
  3139. Attributes defined elsewhere
  3140.  
  3141.    * id, class (document-wide identifiers)
  3142.    * title (element titles)
  3143.    * style (inline style information)
  3144.    * clear (alignment and floating objects)
  3145.  
  3146. The BR element forcibly breaks (ends) the current line of text.
  3147.  
  3148. For visual user agents, the clear attribute can be used to determine whether
  3149. markup following the BR element flows around images and other objects
  3150. floated to the left or right margin, or whether it starts after the bottom
  3151. of such objects. Further details are given in the section on alignment and
  3152. floating objects. Authors are advised to use style sheets to control text
  3153. flow around floating images and other objects. The clear attribute, along
  3154. with other HTML presentation attributes and tags, is only appropriate when
  3155. you need to consider user agents that don't support style sheets.
  3156.  
  3157. With respect to bidirectional formatting, the BR element should be treated
  3158. in the same way as a Unicode LINE SEPARATOR character.
  3159.  
  3160. Prohibiting a line break
  3161.  
  3162. Sometimes you will want to prevent a line break from occurring between two
  3163. words. The   entity ( ,  ) acts as a space where user agents
  3164. should not cause a line break.
  3165.  
  3166. Hyphenation
  3167.  
  3168. In HTML, there are two types of hyphens: the plain hyphen and the soft
  3169. hyphen. The plain hyphen should be interpreted by a user agent as just
  3170. another character. The soft hyphen tells the user agent where a line break
  3171. can occur.
  3172.  
  3173. Those browsers that interpret soft hyphens must observe the following
  3174. semantics: If a line is broken at a soft hyphen, a hyphen character must be
  3175. displayed at the end of the first line. If a line is not broken at a hyphen,
  3176. the user agent must not display a hyphen character. For operations such as
  3177. searching and sorting, the soft hyphen should always be ignored.
  3178.  
  3179. In HTML, the plain hyphen is represented by the "-" character (-,
  3180. -). The soft hyphen is represented by the named character entity ­
  3181. (­, ­)
  3182.  
  3183. Preformatted text: The PRE element
  3184.  
  3185. <!ENTITY % pre.exclusion "IMG|BIG|SMALL|SUB|SUP|FONT">
  3186.  
  3187. <!ELEMENT PRE - - (%inline)* -(%pre.exclusion)>
  3188. <!ATTLIST PRE
  3189.   %attrs;                          -- %coreattrs, %i18n, %events --
  3190.   width       NUMBER     #IMPLIED
  3191.   >
  3192.  
  3193. Start tag: required, End tag: required
  3194.  
  3195. Attribute definitions
  3196.  
  3197. width = integer
  3198.      This attribute provides a hint to visual user agents about the desired
  3199.      width of the formatted block. The user agent can use this information
  3200.      to select an appropriate font size or to indent the content
  3201.      appropriately. The desired width is expressed in number of characters.
  3202.      This attribute is not widely supported currently.
  3203.  
  3204. Attributes defined elsewhere
  3205.  
  3206.    * id, class (document-wide identifiers)
  3207.    * lang (language information), dir (text direction)
  3208.    * title (element titles)
  3209.    * style (inline style information)
  3210.    * onclick, ondblclick, onmousedown, onmouseup, onmouseover, onmousemove,
  3211.      onmouseout, onkeypress, onkeydown, onkeyup (intrinsic events)
  3212.  
  3213. The PRE element tells visual user agents that the enclosed text is
  3214. "preformatted". Visual user agents must treat preformatted text as follows:
  3215.  
  3216.    * They may leave white space intact.
  3217.    * They may render text with a fixed-pitch font.
  3218.    * They may disable automatic word wrap.
  3219.    * They must not disable bidirectional processing.
  3220.  
  3221. Note that the SGML standard requires that the parser remove a newline
  3222. immediately following the start tag or immediately preceding the end tag.
  3223.  
  3224. The DTD fragment above indicates which elements may not appear within a PRE
  3225. declaration. This is the same as in HTML 3.2, and is intended to preserve
  3226. constant line spacing and column alignment for text rendered in a fixed
  3227. pitch font. Authors are discouraged from altering this behavior through
  3228. style sheets.
  3229.  
  3230. The following example shows a preformatted verse from Shelly's poem To a
  3231. Skylark:
  3232.  
  3233. <PRE>
  3234.        Higher still and higher
  3235.          From the earth thou springest
  3236.        Like a cloud of fire;
  3237.          The blue deep thou wingest,
  3238. And singing still dost soar, and soaring ever singest.
  3239. </PRE>
  3240.  
  3241. Here is the same verse as rendered by your user agent:
  3242.  
  3243.        Higher still and higher
  3244.          From the earth thou springest
  3245.        Like a cloud of fire;
  3246.          The blue deep thou wingest,
  3247. And singing still dost soar, and soaring ever singest.
  3248.  
  3249. The horizontal tab character
  3250. The horizontal tab character (encoded in [UNICODE], US ASCII, and [ISO88591]
  3251. as decimal 9) is usually interpreted by visual user agents as the smallest
  3252. non-zero number of spaces necessary to line characters up along tab stops
  3253. that are every 8 characters. We strongly discourage using horizontal tabs in
  3254. preformatted text since it is common practice, when editing, to set the
  3255. tab-spacing to other values, leading to misaligned documents.
  3256.  
  3257. Marking document changes: The INS and DEL elements
  3258.  
  3259. <!-- INS/DEL are handled by inclusion on BODY -->
  3260. <!ELEMENT (INS|DEL) - - (%inline)* -- inserted/deleted text -->
  3261. <!ATTLIST (INS|DEL)
  3262.   %attrs                           -- %coreattrs, %i18n, %events --
  3263.   cite        %URL      #IMPLIED   -- info on reason for change --
  3264.   datetime    CDATA     #IMPLIED   -- when changed: ISO date format --
  3265.   >
  3266.  
  3267. Start tag: required, End tag: required
  3268.  
  3269. Attribute definitions
  3270.  
  3271. cite = url
  3272.      The value of this attribute is a URL that designates a source document
  3273.      or message. This attribute is intended to point to information
  3274.      explaining why a document was changed.
  3275. datetime = cdata
  3276.      The value of this attribute specifies the date and time when the change
  3277.      was made. This value must have a format as specified in [ISO8601] and
  3278.      limited by the profile defined in the section below on dates and times.
  3279.  
  3280. Attributes defined elsewhere
  3281.  
  3282.    * id, class (document-wide identifiers)
  3283.    * lang (language information), dir (text direction)
  3284.    * title (element titles)
  3285.    * style (inline style information)
  3286.    * onclick, ondblclick, onmousedown, onmouseup, onmouseover, onmousemove,
  3287.      onmouseout, onkeypress, onkeydown, onkeyup (intrinsic events)
  3288.  
  3289. INS and DEL are used to markup sections of the document that have been
  3290. inserted or deleted since a previous version of a document (e.g., in draft
  3291. legislation where law makers need to view the changes).
  3292.  
  3293. These two elements are unsual for HTML in that they are neither block-level
  3294. nor inline elements. They may contain one or more words within a paragraph
  3295. or englobe one or more block-level elements such as paragraphs, lists and
  3296. tables.
  3297.  
  3298. User agents may render inserted and deleted text in ways that make the
  3299. change obvious. For instance, inserted text may appear in a special font,
  3300. deleted text may not be shown at all or be shown as struck-through or with
  3301. special markings, etc.
  3302.  
  3303. User agents that do not recognize the DEL element must render that element's
  3304. content nonetheless.
  3305.  
  3306. Date and time format
  3307.  
  3308. [ISO8601] allows many options and variations in the representation of dates
  3309. and times. This specification defines a specific format which is one of
  3310. those allowed by [ISO8601].
  3311.  
  3312. The format is:
  3313.  
  3314.   YYYY-MM-DDThh:mm:ssTZD
  3315.  
  3316. where:
  3317.  
  3318.      YYYY = four-digit year
  3319.      MM   = two-digit month (01=January, etc.)
  3320.      DD   = two-digit day of month (01 through 31)
  3321.      hh   = two digits of hour (00 through 23) (am/pm NOT allowed)
  3322.      mm   = two digits of minute (00 through 59)
  3323.      ss   = two digits of second (00 through 59)
  3324.      TZD  = time zone designator
  3325.  
  3326. The time zone designator is one of:
  3327.  
  3328. Z
  3329.      indicates UTC (Coordinated Universal Time).
  3330. +hh:mm
  3331.      indicates that the time is a local time which is hh hours and mm
  3332.      minutes ahead of UTC.
  3333. -hh:mm
  3334.      indicates that the time is a local time which is hh hours and mm
  3335.      minutes behind UTC.
  3336.  
  3337. Exactly the components shown here must be present, with exactly this
  3338. punctuation. Note that the "T" appears literally in the string, to indicate
  3339. the beginning of the time element, as specified in [ISO8601]
  3340.  
  3341. If a generating application does not know the time to the second, it may use
  3342. the value "00" for the seconds (and minutes and hours if necessary).
  3343.  
  3344. Both of the following examples correspond to November 5, 1994, 8:15:30 am,
  3345. US Eastern Standard Time.
  3346.  
  3347.      1994-11-05T13:15:30Z
  3348.      1994-11-05T08:15:30-05:00
  3349.  
  3350. Used with INS, this gives:
  3351.  
  3352. <INS datetime="1994-11-05T08:15:30-05:00">
  3353. I added this on November 5th
  3354. </INS>
  3355.  
  3356.                                    Lists
  3357.  
  3358. Contents
  3359.  
  3360.   1. Unordered (UL) and ordered (OL) lists
  3361.        1. Lists formatted by visual user agents
  3362.   2. Definition lists: the DL, DT, and DD elements
  3363.   3. The DIR and MENU elements
  3364.  
  3365. Unordered (UL) and ordered (OL) lists
  3366.  
  3367. <!ENTITY % ULStyle "disc|square|circle">
  3368.  
  3369. <!ELEMENT UL - -  (LI)+>
  3370. <!ATTLIST UL                    -- unordered lists --
  3371.   %attrs;                          -- %coreattrs, %i18n, %events --
  3372.   type        (%ULStyle) #IMPLIED  -- bullet style --
  3373.   compact     (compact)  #IMPLIED  -- reduced interitem spacing --
  3374.   >
  3375. <!ENTITY % OLStyle "CDATA"      -- constrained to: [1|a|A|i|I] -->
  3376.  
  3377. <!ELEMENT OL - -  (LI)+>
  3378. <!ATTLIST OL -- ordered lists --
  3379.   %attrs;                          -- %coreattrs, %i18n, %events --
  3380.   type        %OLStyle   #IMPLIED  -- numbering style --
  3381.   compact     (compact)  #IMPLIED  -- reduced interitem spacing --
  3382.   start       NUMBER     #IMPLIED  -- starting sequence number --
  3383.   >
  3384.  
  3385. Start tag: required, End tag: required
  3386.  
  3387. <!-- The type attribute can be used to change the bullet style
  3388.      in unordered lists and the numbering style in ordered lists -->
  3389.  
  3390. <!ENTITY % LIStyle "CDATA" -- constrained to: "(%ULStyle|%OLStyle)" -->
  3391.  
  3392. <!ELEMENT LI - O %block -- list item -->
  3393. <!ATTLIST LI
  3394.   %attrs;                          -- %coreattrs, %i18n, %events --
  3395.   type        %LIStyle   #IMPLIED  -- list item style --
  3396.   value       NUMBER     #IMPLIED  -- reset sequence number --
  3397.   >
  3398.  
  3399. Start tag: required, End tag: optional
  3400.  
  3401. Attribute definitions
  3402.  
  3403. type = style-information
  3404.      This attribute sets the style of a list item. Currently available
  3405.      values are intended for visual user agents. Possible values are
  3406.      described below.
  3407. start = integer
  3408.      For OL only. This attribute specifies the starting number of the first
  3409.      item in an ordered list. The default starting number is one.
  3410. value = integer
  3411.      For LI only. This attribute sets the current number of a list element
  3412.      in an ordered list to a new integer value.
  3413. compact
  3414.      Deprecated. When set, this boolean attribute gives a hint to visual
  3415.      user agents to render the list in a more compact way.
  3416.  
  3417. Attributes defined elsewhere
  3418.  
  3419.    * id, class (document-wide identifiers)
  3420.    * lang (language information), dir (text direction)
  3421.    * title (element titles)
  3422.    * style (inline style information)
  3423.    * onclick, ondblclick, onmousedown, onmouseup, onmouseover, onmousemove,
  3424.      onmouseout, onkeypress, onkeydown, onkeyup (intrinsic events)
  3425.  
  3426. Ordered and unordered lists are identical except that visual user agents
  3427. number ordered list items. User agents may present those numbers in a
  3428. variety of ways. Unordered list items are not numbered.
  3429.  
  3430. Both types of lists are made up of sequences of list items defined by the LI
  3431. element (whose end tag is generally omitted).
  3432.  
  3433. This example illustrates the basic structure of a list.
  3434.  
  3435. <UL>
  3436.    <LI> ... first list item...
  3437.    <LI> ... second list item...
  3438.    ...
  3439. </UL>
  3440.  
  3441. Lists may also be nested:
  3442.  
  3443. <UL>
  3444.      <LI> ... Level one, number one...
  3445.      <OL>
  3446.         <LI> ... Level two, number one...
  3447.         <LI> ... Level two, number two...
  3448.         <OL start="10">
  3449.            <LI> ... Level three, number one...
  3450.         </OL>
  3451.         <LI> ... Level two, number three...
  3452.      </OL>
  3453.      <LI> ... Level one, number two...
  3454. </UL>
  3455.  
  3456. Details about number order. In ordered lists, it is not possible to continue
  3457. list numbering automatically from a previous list or to hide numbering of
  3458. some list items. However, you can reset the number of a list item by setting
  3459. its value attribute. Numbering continues from the new value for subsequent
  3460. list items. For example:
  3461.  
  3462. <ol>
  3463. <li value="30"> makes this list item number 30.
  3464. <li value="40"> makes this list item number 40.
  3465. <li> makes this list item number 41.
  3466. </ol>
  3467.  
  3468. Lists formatted by visual user agents
  3469.  
  3470. The following description refers to the behavior of some current visual user
  3471. agents when formatting lists. Style sheets allow better control of list
  3472. formatting (e.g., for numbering, language-dependent conventions, etc.).
  3473.  
  3474. Visual browsers usually present nested lists indented with respect to the
  3475. current level of indentation.
  3476.  
  3477. For both OL and UL, the type attribute specifies rendering options for
  3478. visual user agents.
  3479.  
  3480. For the UL element, possible values for the type attribute are disc, square,
  3481. and circle. The default value depends on the level of nesting of the current
  3482. list.
  3483.  
  3484. How each value is presented depends on the user agent. User agents should
  3485. attempt to present a "disc" as a small filled-in circle, a "circle" as a
  3486. small circle outline, and a "square" as a small square outline.
  3487.  
  3488. Your user agent displays them as follows (the bullet glyph in the line may
  3489. or may not vary):
  3490.  
  3491.    * is produced by the value "disc"
  3492.    + is produced by the value "square"
  3493.    o is produced by the value "circle"
  3494.  
  3495. For the OL element, possible values for the type attribute are summarized in
  3496. the table below:
  3497.  
  3498.   Type                     Numbering style
  3499.     1         arabic numbers             1, 2, 3, ...
  3500.     a          lower alpha               a, b, c, ...
  3501.     A          upper alpha               A, B, C, ...
  3502.     i          lower roman             i, ii, iii, ...
  3503.     I          upper roman             I, II, III, ...
  3504.  
  3505. Definition lists: the DL, DT, and DD elements
  3506.  
  3507. <!-- definition lists - DT for term, DD for its definition -->
  3508.  
  3509. <!ELEMENT DL - -  (DT|DD)+>
  3510. <!ATTLIST DL
  3511.   %attrs;                          -- %coreattrs, %i18n, %events --
  3512.   compact     (compact)  #IMPLIED  -- reduced interitem spacing --
  3513.   >
  3514.  
  3515. Start tag: required, End tag: required
  3516.  
  3517. <!ELEMENT DT - O  (%inline)*>
  3518. <!ELEMENT DD - O  %block>
  3519. <!ATTLIST (DT|DD)
  3520.   %attrs                          -- %coreattrs, %i18n, %events --
  3521.   >
  3522.  
  3523. Start tag: required, End tag: optional
  3524.  
  3525. Attributes defined elsewhere
  3526.  
  3527.    * id, class (document-wide identifiers)
  3528.    * lang (language information), dir (text direction)
  3529.    * title (element titles)
  3530.    * style (inline style information)
  3531.    * onclick, ondblclick, onmousedown, onmouseup, onmouseover, onmousemove,
  3532.      onmouseout, onkeypress, onkeydown, onkeyup (intrinsic events)
  3533.  
  3534. Definition lists vary only slightly from other types of lists in that list
  3535. items consist of two parts: an initial label and a description. The label
  3536. part is initiated by the DT element and may only contain marked up text. The
  3537. description begins with the DD element and may contain block-level content.
  3538.  
  3539. Here is a sample definition list.
  3540.  
  3541.  
  3542. <DL>
  3543.     <DT> <em>Daniel</em>
  3544.     <DD> Born in France, Daniel's favorite food is foie gras.
  3545.          <P> In this paragraph, we'll discuss Daniel's
  3546.          harem: Pascale, Audrey, Laurie, and Alice.
  3547.     <DT> <em>Tim</em>
  3548.     <DD> Born in New York, Tim's favorite food is ice cream.
  3549.   </DL>
  3550.  
  3551. The rendering of a definition list depends on the user agent. Your user
  3552. agent renders this example as follows:
  3553.  
  3554. Daniel
  3555.      Born in France, Daniel's favorite food is foie gras.
  3556.  
  3557.      In this paragraph, we'll discuss Daniel's harem: Pascale, Audrey,
  3558.      Laurie, and Alice.
  3559. Tim
  3560.      Born in New York, Tim's favorite food is ice cream.
  3561.  
  3562. The DIR and MENU elements
  3563.  
  3564. DIR and MENU are deprecated
  3565.  
  3566. <!ELEMENT (DIR|MENU) - -  (LI)+ -(%blocklevel)>
  3567. <!ATTLIST DIR
  3568.   %attrs;                          -- %coreattrs, %i18n, %events --
  3569.   compact     (compact)  #IMPLIED
  3570.   >
  3571. <!ATTLIST MENU
  3572.   %attrs;                          -- %coreattrs, %i18n, %events --
  3573.   compact     (compact)  #IMPLIED
  3574.   >
  3575.  
  3576. Start tag: required, End tag: required
  3577.  
  3578. Attributes defined elsewhere
  3579.  
  3580.    * id, class (document-wide identifiers)
  3581.    * lang (language information), dir (text direction)
  3582.    * title (element titles)
  3583.    * style (inline style information)
  3584.    * onclick, ondblclick, onmousedown, onmouseup, onmouseover, onmousemove,
  3585.      onmouseout, onkeypress, onkeydown, onkeyup (intrinsic events)
  3586.  
  3587. The DIR element was designed to be used for creating multicolumn directory
  3588. lists. The MENU element was designed to be used for single column menu
  3589. lists. Both elements have the same structure as UL, just different
  3590. rendering. In practice, a user agent will render a DIR or MENU list exactly
  3591. as a UL list.
  3592.  
  3593. We strongly recommend using UL instead of these elements.
  3594.  
  3595.                                    Tables
  3596.  
  3597. Contents
  3598.  
  3599.   1. Table structure
  3600.        1. The TABLE element
  3601.        2. Table Captions: The CAPTION element
  3602.        3. Groups of rows: the THEAD, TFOOT, and TBODY elements
  3603.        4. Groups of columns: the COLGROUP and COL elements
  3604.        5. Table rows: The TR element
  3605.        6. Table cells: The TH and TD elements
  3606.   2. Table formatting by visual user agents
  3607.        1. Horizontal and vertical alignment
  3608.        2. Borders and rules
  3609.        3. Cell margins
  3610.   3. Some sample tables
  3611.        1. Sample 1
  3612.        2. Sample 2
  3613.  
  3614. The HTML table model allows users to organize data in complex tabular
  3615. structures. Tables can include lists, paragraphs, forms, figures,
  3616. preformatted text, and other tables.
  3617.  
  3618. In this table model, rows and columns may be grouped together. This grouping
  3619. conveys structural information about the table and may be rendered by user
  3620. agents in ways to emphasize this structure.
  3621.  
  3622. Row groups are particularly useful in large tables. Intelligent visual user
  3623. agents may allow scrolling of a table body while preserving the head and
  3624. foot information on the screen. Similarly, when long tables are printed, the
  3625. head and foot information may be repeated on each page that contains table
  3626. data.
  3627.  
  3628. Note: This specification includes more detailed information about tables in
  3629. sections on table design rationale and implementation issues.
  3630.  
  3631. Table structure
  3632.  
  3633. An HTML table has the following structure:
  3634.  
  3635.    * An optional caption.
  3636.    * One or more groups of rows. Each row group consists of an optional head
  3637.      section, an optional foot section, and a series of rows.
  3638.    * One or more groups of columns.
  3639.    * Each row consists of one or more cells.
  3640.    * Each cell may contain either header information (meant to describe the
  3641.      nature of data in the column or row) or data. A cell may span more than
  3642.      one row or column.
  3643.  
  3644. The TABLE element
  3645.  
  3646. <!ELEMENT TABLE - - (CAPTION?, (COL*|COLGROUP*), THEAD?, TFOOT?, TBODY+)>
  3647. <!ATTLIST TABLE                 -- table element --
  3648.   %attrs;                          -- %coreattrs, %i18n, %events --
  3649.   align       %TAlign;   #IMPLIED  -- table position relative to window --
  3650.   bgcolor     %Color     #IMPLIED  -- background color for cells --
  3651.   width       CDATA      #IMPLIED  -- table width relative to window --
  3652.   cols        NUMBER     #IMPLIED  -- used for immediate display mode --
  3653.   border      CDATA      #IMPLIED  -- controls frame width around table --
  3654.   frame       %TFrame;   #IMPLIED  -- which parts of table frame to include --
  3655.   rules       %TRules;   #IMPLIED  -- rulings between rows and cols --
  3656.   cellspacing CDATA      #IMPLIED  -- spacing between cells --
  3657.   cellpadding CDATA      #IMPLIED  -- spacing within cells --
  3658.   >
  3659.  
  3660. Start tag: required, End tag: required
  3661.  
  3662. Attribute definitions
  3663.  
  3664. align = left|center|right
  3665.      This attribute specifies the position of the table with respect to the
  3666.      document. Possible values:
  3667.         o left: The table is to the left of the document.
  3668.         o center: The table is to the center of the document.
  3669.         o right: The table is to the right of the document.
  3670. width = length
  3671.      This attribute specifies the desired width of entire table for visual
  3672.      user agents. In the absence of this attribute, table width is
  3673.      determined by the user agent.
  3674. cols = integer
  3675.      This attribute specifies the number of columns for the table. When
  3676.      specified, this attribute helps visual user agents render the table as
  3677.      soon as it receives incoming data, rather than having to wait for the
  3678.      entire table to determine the number of columns for certain.
  3679.  
  3680. Attributes defined elsewhere
  3681.  
  3682.    * id, class (document-wide identifiers)
  3683.    * lang (language information), dir (text direction)
  3684.    * title (element titles)
  3685.    * style (inline style information)
  3686.    * onclick, ondblclick, onmousedown, onmouseup, onmouseover, onmousemove,
  3687.      onmouseout, onkeypress, onkeydown, onkeyup (intrinsic events)
  3688.    * bgcolor (background color)
  3689.    * frame, rules, border (borders and rules)
  3690.    * cellspacing, cellpadding (cell margins)
  3691.  
  3692. The TABLE element contains all other elements that specify caption, rows,
  3693. content, and formatting.
  3694.  
  3695. Calculating the number of rows and columns in a table
  3696.  
  3697. The number of rows in a table is equal to the number of TR elements it
  3698. contains. User agents should ignore rows that are implied by cells spanning
  3699. rows beyond this number.
  3700.  
  3701. There are several ways to determine the number of columns:
  3702.  
  3703.    * Scan each row in turn to compute the minimum number of columns needed
  3704.      (taking column spans into account). If the column count for the table
  3705.      exceeds the number of cells in a given row (including spanned rows),
  3706.      the end of that row is padded with empty cells. The "end" of a row
  3707.      depends on the directionality of the table.
  3708.    * Count the number of columns as specified by COL and COLGROUP elements
  3709.      which can only occur at the start of the table (after the optional
  3710.      CAPTION.
  3711.    * Use the cols attribute on the TABLE element. This is the weakest method
  3712.      as you don't get any additonal information on column widths. This may
  3713.      not matter though if you use style sheets to specify widths.
  3714.  
  3715. User agents can assume that the table in this example has three columns.
  3716.  
  3717. <TABLE cols="3">
  3718. ...the rest of the table...
  3719. </TABLE>
  3720.  
  3721. If the number of columns in a table is not specified by the cols attribute,
  3722. a visual user agent may wait for the entire table to arrive before beginning
  3723. rendering. In general waiting until the end of the table allows the number
  3724. of columns and their widths to be determined without the need for a
  3725. redisplay. Setting the cols attribute acts as a hint to visual user agents
  3726. to display tables as each row is received. Authors are recommended to use
  3727. the COL and COLGROUP elements to specify column properties rather than using
  3728. the cols attribute.
  3729.  
  3730. Table directionality
  3731.  
  3732. The directionality of a table is specified by the dir attribute for the
  3733. TABLE element. For a left-to-right table (the default), column one is on the
  3734. left side of the table and row one is at the top. For a right-to-left table,
  3735. column one is one the right side and row one is at the top.
  3736.  
  3737. Similarly, for left-to-right tables (the default), extra row cells are added
  3738. to the right of the table, and for right-to-left tables, extra cells are
  3739. added to the left side.
  3740.  
  3741. When set for the TABLE element, the dir attribute also affects the direction
  3742. of text within table cells (since the dir attribute is inherited by
  3743. block-level elements).
  3744.  
  3745. To specify a right-to-left table, set the dir attribute as follows:
  3746.  
  3747. <TABLE dir="RTL">
  3748. ...the rest of the table...
  3749. </TABLE>
  3750.  
  3751. The direction of text in individual cells can be changed by setting the dir
  3752. attribute in element that defines the cell. Please consult the section on
  3753. bidirectional text for more information on text direction issues.
  3754.  
  3755. Table Captions: The CAPTION element
  3756.  
  3757. <!ELEMENT CAPTION - - (%inline;)+>
  3758. <!ENTITY % CAlign "(top|bottom|left|right)">
  3759.  
  3760. <!ATTLIST CAPTION               -- table caption --
  3761.   %attrs;                          -- %coreattrs, %i18n, %events --
  3762.   align       %CAlign;   #IMPLIED  -- relative to table --
  3763.   >
  3764.  
  3765. Start tag: required, End tag: required
  3766.  
  3767. Attribute definitions
  3768.  
  3769. align = top|bottom|left|right
  3770.      This attribute specifies the position of the caption with respect to
  3771.      the table. Possible values:
  3772.         o top: The caption is above the table. This is the default value.
  3773.         o bottom: The caption is below the table.
  3774.         o left: The caption is to the left of the table.
  3775.         o right: The caption is to the right of the table.
  3776.  
  3777. Attributes defined elsewhere
  3778.  
  3779.    * id, class (document-wide identifiers)
  3780.    * lang (language information), dir (text direction)
  3781.    * title (element titles)
  3782.    * style (inline style information)
  3783.    * onclick, ondblclick, onmousedown, onmouseup, onmouseover, onmousemove,
  3784.      onmouseout, onkeypress, onkeydown, onkeyup (intrinsic events)
  3785.  
  3786. When present, the CAPTION element's text should describe the nature of the
  3787. table. The CAPTION element must come immediately after the TABLE start tag.
  3788.  
  3789. For instance,
  3790.  
  3791. <TABLE cols="3">
  3792. <CAPTION>Cups of coffee consumed by each senator</CAPTION>
  3793. ...the rest of the table...
  3794. </TABLE>
  3795.  
  3796. Groups of rows: the THEAD, TFOOT, and TBODY elements
  3797.  
  3798. <!ELEMENT THEAD - O (TR+)>
  3799. <!ELEMENT TFOOT - O (TR+)>
  3800.  
  3801. Start tag: required, End tag: optional
  3802.  
  3803. <!ELEMENT TBODY O O (TR+)>
  3804.  
  3805. Start tag: optional, End tag: optional
  3806.  
  3807. <!ATTLIST (THEAD|TBODY|TFOOT)   -- table section --
  3808.   %attrs;                          -- %coreattrs, %i18n, %events --
  3809.   %cellhalign;                     -- horizontal alignment in cells --
  3810.   %cellvalign;                     -- vertical alignment in cells --
  3811.   >
  3812.  
  3813. Attributes defined elsewhere
  3814.  
  3815.    * id, class (document-wide identifiers)
  3816.    * lang (language information), dir (text direction)
  3817.    * title (element titles)
  3818.    * style (inline style information)
  3819.    * onclick, ondblclick, onmousedown, onmouseup, onmouseover, onmousemove,
  3820.      onmouseout, onkeypress, onkeydown, onkeyup (intrinsic events)
  3821.    * align, char, charoff, valign (cell alignment)
  3822.  
  3823. A table must contain at least one row group. Each row group is divided into
  3824. three sections: head, body, and foot. The head and foot sections are
  3825. optional. The THEAD element defines the head, the TFOOT element defines the
  3826. foot, and the TBODY element defines the body.
  3827.  
  3828. When present, each THEAD, TFOOT, and TBODY instance must contain one or more
  3829. rows (see TR).
  3830.  
  3831. This example illustrates the order and structure of table heads, feet, and
  3832. bodies.
  3833.  
  3834. <TABLE>
  3835. <THEAD>
  3836.      <TR> ...header information...
  3837. </THEAD>
  3838. <TFOOT>
  3839.      <TR> ...footer information...
  3840. </TFOOT>
  3841. <TBODY>
  3842.      <TR> ...first row of block one data...
  3843.      <TR> ...second row of block one data...
  3844. </TBODY>
  3845. <TBODY>
  3846.      <TR> ...first row of block two data...
  3847.      <TR> ...second row of block two data...
  3848.      <TR> ...third row of block two data...
  3849. </TBODY>
  3850. </TABLE>
  3851.  
  3852. TFOOT must appear before TBODY within a TABLE definition so that user agents
  3853. can render the foot before receiving all of the (potentially numerous) rows
  3854. of data.
  3855.  
  3856. Optional row group tags
  3857.  
  3858.    * When a table contains only one body and no head or foot sections, the
  3859.      TBODY start and end tags may be omitted.
  3860.    * When a table block contains a head, the start tag of the THEAD element
  3861.      is required. The end tag may be omitted when a TFOOT or TBODY start tag
  3862.      follows.
  3863.    * When a table block contains a foot, the start tag of the TFOOT element
  3864.      is required. The end tag may be omitted when a THEAD or TBODY start tag
  3865.      follows.
  3866.  
  3867. Conforming user agent parsers must obey these rules for reasons of backward
  3868. compatibility.
  3869.  
  3870. The table of the previous example could be shortened by removing certain end
  3871. tags.
  3872.  
  3873. <TABLE>
  3874. <THEAD>
  3875.      <TR> ...header information...
  3876. <TFOOT>
  3877.      <TR> ...footer information...
  3878. <TBODY>
  3879.      <TR> ...first row of block one data...
  3880.      <TR> ...second row of block one data...
  3881. <TBODY>
  3882.      <TR> ...first row of block two data...
  3883.      <TR> ...second row of block two data...
  3884.      <TR> ...third row of block two data...
  3885. </TABLE>
  3886.  
  3887. Groups of columns: the COLGROUP and COL elements
  3888.  
  3889. The COLGROUP element
  3890.  
  3891. <!ELEMENT COLGROUP - O (col*)>
  3892. <!ATTLIST COLGROUP
  3893.   %attrs;                          -- %coreattrs, %i18n, %events --
  3894.   span        NUMBER     1         -- default number of columns in group --
  3895.   width       CDATA      #IMPLIED  -- default width for enclosed COLs --
  3896.   %cellhalign;                     -- horizontal alignment in cells --
  3897.   %cellvalign;                     -- vertical alignment in cells --
  3898.   >
  3899.  
  3900. Start tag: required, End tag: optional
  3901.  
  3902. Attribute definitions
  3903.  
  3904. span = integer
  3905.      When present, this attribute specifies the default number of columns in
  3906.      this group. User agents should ignore this attribute if the current
  3907.      column group contains one or more COL elements. The default value of
  3908.      this attribute is one.
  3909. width = length
  3910.      This attribute specifies a default width for each column in the current
  3911.      column group. In addition to the standard pixel and percentage values,
  3912.      this attribute may take the special form "0*", which means that the
  3913.      width of each column in the group should be the minimum width necessary
  3914.      to hold the column's contents.
  3915.  
  3916. Attributes defined elsewhere
  3917.  
  3918.    * id, class (document-wide identifiers)
  3919.    * lang (language information), dir (text direction)
  3920.    * title (element titles)
  3921.    * style (inline style information)
  3922.    * onclick, ondblclick, onmousedown, onmouseup, onmouseover, onmousemove,
  3923.      onmouseout, onkeypress, onkeydown, onkeyup (intrinsic events)
  3924.    * align, char, charoff, valign (cell alignment)
  3925.  
  3926. A table must contain at least one column group. In the absence of any column
  3927. group definitions, a table is considered to have one column group that
  3928. includes all columns in the table. The COLGROUP element creates an explicit
  3929. column group.
  3930.  
  3931. The width attribute of the COLGROUP element specifies a default width for
  3932. each column in a column group. The special value "0*" tells user agents to
  3933. set every column in a group to its minimum width. This behavior may be
  3934. overridden by the presence of a COL element.
  3935.  
  3936. The table in the following example contains two column groups. The first
  3937. column group contains 10 columns and the second contains 5 columns. The
  3938. default width for each column in the first column group is 50 pixels. The
  3939. width of each column in the second column group will be the minimum for the
  3940. column.
  3941.  
  3942.  
  3943. <TABLE>
  3944. <COLGROUP span="10" width="50">
  3945. <COLGROUP span="5" width="0*">
  3946. <THEAD>
  3947. <TR> ...
  3948. </TABLE>
  3949.  
  3950. The COL element
  3951.  
  3952. <!ELEMENT COL - O EMPTY>
  3953. <!ATTLIST COL                   -- column groups and properties --
  3954.   %attrs;                          -- %coreattrs, %i18n, %events --
  3955.   span        NUMBER     1         -- number of columns spanned by group --
  3956.   width       CDATA      #IMPLIED  -- column width specification --
  3957.   %cellhalign;                     -- horizontal alignment in cells --
  3958.   %cellvalign;                     -- vertical alignment in cells --
  3959.   >
  3960.  
  3961. Start tag: required, End tag: forbidden
  3962.  
  3963. Attribute definitions
  3964.  
  3965. width = length
  3966.      This attribute specifies a default width for each column in the current
  3967.      column group. In addition to the standard pixel and percentage values,
  3968.      this attribute may take the special form "0*", which means that the
  3969.      width of the each column in the group should be the minimum width
  3970.      necessary to hold the column's contents. The attribute may also have
  3971.      the form "i*", where "i" is an integer. This is called a relative
  3972.      width. When allotting space to rows and columns, user agents allot
  3973.      absolute widths first, then divide up remaining available space among
  3974.      relative width rows or columns. Each relative width row or column
  3975.      receives a portion of the space proportional to the integer preceding
  3976.      the "*". The value "*" is equivalent to "1*".
  3977.  
  3978. Attributes defined elsewhere
  3979.  
  3980.    * id, class (document-wide identifiers)
  3981.    * lang (language information), dir (text direction)
  3982.    * title (element titles)
  3983.    * style (inline style information)
  3984.    * onclick, ondblclick, onmousedown, onmouseup, onmouseover, onmousemove,
  3985.      onmouseout, onkeypress, onkeydown, onkeyup (intrinsic events)
  3986.    * align, char, charoff, valign (cell alignment)
  3987.  
  3988. Each column group defined by COLGROUP may contain zero or more COL elements.
  3989. A COL element does not define a column group in the same sense as COLGROUP;
  3990. it is simply a way to share attribute values among columns in a column
  3991. group. Note that COL elements are empty; they are only affected by
  3992. attributes.
  3993.  
  3994. The span attribute for COL means the following:
  3995.  
  3996.    * In the absence of a span declaration, each COL element represents one
  3997.      column.
  3998.    * If the span attribute is set to N > 0, the current COL element spans N
  3999.      columns in the table.
  4000.    * If the span attribute is set to 0, the current COL element spans the
  4001.      remaining columns in the table, including the current and final
  4002.      columns.
  4003.  
  4004. As for COLGROUP, the width attribute for COL affects the width of the
  4005. columns subsumed by the element. If a COL element spans several columns then
  4006. its width attribute specifies the width of each column in the span, not the
  4007. width of the span as a whole.
  4008.  
  4009. The table in this example contains two column groups. The first group
  4010. contains three columns, the second contains two columns. The available
  4011. horizontal space will be alloted as follows: First the user agent will allot
  4012. 30 pixels to the first column. Then, the minimal space required for the
  4013. second column will be alloted to it. The remaining horizontal space will be
  4014. divided into six equal portions. Column three will receive two of these
  4015. portions, column four will receive one, and column five will receive three.
  4016.  
  4017.  
  4018. <TABLE>
  4019. <COLGROUP>
  4020.    <COL width="30">
  4021.    <COL width="0*">
  4022.    <COL width="2*">
  4023. <COLGROUP align="center">
  4024.    <COL width="1*">
  4025.    <COL width="3*" align="char" char=":">
  4026. <THEAD>
  4027. <TR> ...
  4028. </TABLE>
  4029.  
  4030. We have set the value of the align attribute in the second column group to
  4031. "center". All cells in every column in this group will inherit this value,
  4032. but may override it. In fact, the final COL does just that, by specifying
  4033. that every cell in the column it governs will be aligned along the ":"
  4034. character.
  4035.  
  4036. Table rows: The TR element
  4037.  
  4038. <!ELEMENT TR - O (TH|TD)+>
  4039. <!ATTLIST TR                    -- table row --
  4040.   %attrs;                          -- %coreattrs, %i18n, %events --
  4041.   %cellhalign;                     -- horizontal alignment in cells --
  4042.   %cellvalign;                     -- vertical alignment in cells --
  4043.   bgcolor     %Color     #IMPLIED  -- background color for row --
  4044.   >
  4045.  
  4046. Start tag: required, End tag: optional
  4047.  
  4048. Attributes defined elsewhere
  4049.  
  4050.    * id, class (document-wide identifiers)
  4051.    * lang (language information), dir (text direction)
  4052.    * title (element titles)
  4053.    * style (inline style information)
  4054.    * onclick, ondblclick, onmousedown, onmouseup, onmouseover, onmousemove,
  4055.      onmouseout, onkeypress, onkeydown, onkeyup (intrinsic events)
  4056.    * align, char, charoff, valign (cell alignment)
  4057.  
  4058. The TR elements acts as a container for a row of table cells.
  4059.  
  4060. This sample table contains three rows, each begun by the TR element:
  4061.  
  4062. <TABLE>
  4063. <CAPTION>Cups of coffee consumed by each senator</CAPTION>
  4064. <TR> ...A header row...
  4065. <TR> ...First row of data...
  4066. <TR> ...Second row of data...
  4067. ...the rest of the table...
  4068. </TABLE>
  4069.  
  4070. Table cells: The TH and TD elements
  4071.  
  4072. <!ELEMENT (TH|TD) - O %block>
  4073. <!ATTLIST (TH|TD)               -- header or data cell --
  4074.   %attrs;                          -- %coreattrs, %i18n, %events --
  4075.   axis        CDATA      #IMPLIED  -- defaults to cell content --
  4076.   axes        CDATA      #IMPLIED  -- list of axis names --
  4077.   nowrap      (nowrap)   #IMPLIED  -- suppress word wrap --
  4078.   bgcolor     %Color     #IMPLIED  -- cell background color --
  4079.   rowspan     NUMBER     1         -- number of rows spanned by cell --
  4080.   colspan     NUMBER     1         -- number of cols spanned by cell --
  4081.   %cellhalign;                     -- horizontal alignment in cells --
  4082.   %cellvalign;                     -- vertical alignment in cells --
  4083.   >
  4084.  
  4085. Start tag: required, End tag: optional
  4086.  
  4087. Attribute definitions
  4088.  
  4089. axis = cdata
  4090.      This attribute defines an abbreviated name for a header cell. The
  4091.      default name for a cell is its content.
  4092. axes = cdata-list
  4093.      The value of this attribute, a comma-separated list of axis names,
  4094.      specifies the row and column headers that pertain to this cell. In the
  4095.      absence of this attribute, user agents may make other attempts to
  4096.      identify the cell's pertinent header cells.
  4097. rowspan = integer
  4098.      This attribute specifies the number of rows spanned by the current
  4099.      cell. The default value of this attribute is one ("1"). The value zero
  4100.      ("0") means that the cell spans all rows from the current row to the
  4101.      last row of the table.
  4102. colspan = integer
  4103.      This attribute specifies the number of columns spanned by the current
  4104.      cell. The default value of this attribute is one ("1"). The value zero
  4105.      ("0") means that the cell spans all columns from the current column to
  4106.      the last column of the table.
  4107. nowrap
  4108.      Deprecated.When present, this boolean attribute tells visual user
  4109.      agents to disable automatic text wrapping for this cell. Style sheets
  4110.      should be used instead of this attribute (e.g., the "white-space"
  4111.      attribute of [CSS1] . Note: if used carelessly, this attribute may
  4112.      result in excessively wide cells.
  4113.  
  4114. Attributes defined elsewhere
  4115.  
  4116.    * id, class (document-wide identifiers)
  4117.    * lang (language information), dir (text direction)
  4118.    * title (element titles)
  4119.    * style (inline style information)
  4120.    * onclick, ondblclick, onmousedown, onmouseup, onmouseover, onmousemove,
  4121.      onmouseout, onkeypress, onkeydown, onkeyup (intrinsic events)
  4122.    * bgcolor (background color)
  4123.    * align, char, charoff, valign (cell alignment)
  4124.  
  4125. The TH element stores header information, while the TD element stores data.
  4126. This distinction enables user agents to render header and data cells
  4127. distinctly, even in the absence of style sheets.
  4128.  
  4129. Cells may be empty (i.e., contain no data).
  4130.  
  4131. The following table contains four columns of data, each headed by a column
  4132. description.
  4133.  
  4134. <TABLE>
  4135. <CAPTION>Cups of coffee consumed by each senator</CAPTION>
  4136. <TR> <TH>Name <TH>Cups <TH>Type of Coffee <TH>Sugar?
  4137. <TR> <TD>T. Sexton <TD>10 <TD>Espresso <TD>No
  4138. <TR> <TD>J. Dinnen <TD>5 <TD>Decaf <TD>Yes
  4139. ...the rest of the table...
  4140. </TABLE>
  4141.  
  4142. Your user agent renders the beginning of this table as follows:
  4143.  
  4144.  Cups of coffee consumed by each senator
  4145.  
  4146.    Name    Cups  Type of Coffee  Sugar?
  4147.  T. Sexton 10    Espresso        No
  4148.  J. Dinnen 5     Decaf           Yes
  4149.  
  4150. To help distinguish the cells of this table, we can set the border attribute
  4151. of the TABLE element:
  4152.  
  4153. <TABLE border="border">
  4154. ...the rest of the table...
  4155. </TABLE>
  4156.  
  4157. With a border, your user agent renders the beginning of this table as
  4158. follows:
  4159.  
  4160.  Cups of coffee consumed by each senator
  4161.  
  4162.    Name    Cups  Type of Coffee  Sugar?
  4163.  T. Sexton 10    Espresso        No
  4164.  J. Dinnen 5     Decaf           Yes
  4165.  
  4166. Labeling cells
  4167.  
  4168. The axis and axes attributes provide a means for specifying cell labels.
  4169.  
  4170. Speech synthesizers may use these labels to identify the contents and
  4171. location of each cell. Processing software might consider these labels as
  4172. database field names when transferring a table's contents to a database.
  4173.  
  4174. In the following example table, we set the value of the axis attribute to be
  4175. the last name of each senator. We also label the cell value as falling under
  4176. the "Name" column.
  4177.  
  4178. <TABLE border="border">
  4179. <CAPTION>Cups of coffee consumed by each senator</CAPTION>
  4180. <TR> <TH>Name <TH>Cups <TH>Type of Coffee <TH>Sugar?
  4181. <TR> <TD axis="Sexton" axes="Name">T. Sexton <TD>10
  4182. <TD>Espresso <TD>No
  4183. <TR> <TD axis="Dinnen" axes="Name">J. Dinnen <TD>5 <TD>Decaf <TD>Yes
  4184. </TABLE>
  4185.  
  4186. Cells that span several rows or columns
  4187.  
  4188. Cells may span several rows or columns. The number of rows or columns
  4189. spanned by a cell is set by the rowspan and colspan attributes for either
  4190. the TH or TD elements.
  4191.  
  4192. In this table definition, we specify that the cell in row four, column two
  4193. should span a total of three columns, including the current row.
  4194.  
  4195. <TABLE border="border">
  4196. <CAPTION>Cups of coffee consumed by each senator</CAPTION>
  4197. <TR> <TH>Name <TH>Cups <TH>Type of Coffee <TH>Sugar?
  4198. <TR> <TD>T. Sexton <TD>10 <TD>Espresso <TD>No
  4199. <TR> <TD>J. Dinnen <TD>5 <TD>Decaf <TD>Yes
  4200. <TR> <TD>A. Soria <TD colspan="3"><em>Not available</em>
  4201. </TABLE>
  4202.  
  4203. This table might be rendered by a visual user agent as follows:
  4204.  
  4205. Cups of coffee consumed by each senator
  4206.  --------------------------------------
  4207.  |   Name  |Cups|Type of Coffee|Sugar?|
  4208.  --------------------------------------
  4209.  |T. Sexton|10  |Espresso      |No    |
  4210.  --------------------------------------
  4211.  |J. Dinnen|5   |Decaf         |Yes   |
  4212.  --------------------------------------
  4213.  |A. Soria |Not available             |
  4214.  --------------------------------------
  4215.  
  4216. This example illustrates how cell definitions that span more than one row or
  4217. column affect the definition of later cells. Consider the following table
  4218. definition:
  4219.  
  4220. <TABLE border="border">
  4221. <TR><TD>1 <TD rowspan="2">2 <TD>3
  4222. <TR><TD>4 <TD>6
  4223. <TR><TD>7 <TD>8 <TD>9
  4224. </TABLE>
  4225.  
  4226. This table might be rendered something like this:
  4227.  
  4228. -------------
  4229. | 1 | 2 | 3 |
  4230. ----|   |----
  4231. | 4 |   | 6 |
  4232. ----|---|----
  4233. | 7 | 8 | 9 |
  4234. -------------
  4235.  
  4236. Since the cell labeled "2" spans two rows, it affects the positions of the
  4237. cells defined in the following rows. Note that if cell "6" had not been
  4238. defined in row two, an extra empty cell would have been added by the user
  4239. agent to complete the row.
  4240.  
  4241. Similarly, in the following table definition:
  4242.  
  4243. <TABLE border="border">
  4244. <TR><TD>1 <TD>2 <TD>3
  4245. <TR><TD colspan="2">4 <TD>6
  4246. <TR><TD>7 <TD>8 <TD>9
  4247. </TABLE>
  4248.  
  4249. cell "4" spans two columns, so cell "6" is placed in column three.
  4250.  
  4251. -------------
  4252. | 1 | 2 | 3 |
  4253. --------|----
  4254. | 4     | 6 |
  4255. --------|----
  4256. | 7 | 8 | 9 |
  4257. -------------
  4258.  
  4259. This example illustrates how one might create overlapping cells. In this
  4260. table, cell "5" spans two rows and cell "7" spans two columns, so there is
  4261. overlap in the cell between "7" and "9":
  4262.  
  4263.  
  4264. <TABLE border="border">
  4265. <TR><TD>1 <TD>2 <TD>3
  4266. <TR><TD>4 <TD rowspan="2">5 <TD>6
  4267. <TR><TD colspan="2">7 <TD>9
  4268. </TABLE>
  4269.  
  4270. This table might be rendered as follows to convey the overlap:
  4271.  
  4272. -------------
  4273. | 1 | 2 | 3 |
  4274. -------------
  4275. | 4 | 5 | 6 |
  4276. ----|...|----
  4277. | 7 :   | 9 |
  4278. -------------
  4279.  
  4280. The rendering of overlapping cells is undefined. Rendering will vary between
  4281. user agents.
  4282.  
  4283. Table formatting by visual user agents
  4284.  
  4285. The following description describes the HTML table attributes that tell
  4286. visual user agents how to format tables. Style sheets will offer better
  4287. control of visual table formatting. At the writing of this specification,
  4288. [CSS1] did not offer mechanisms to control all aspects of visual table
  4289. formatting.
  4290.  
  4291. This version of HTML includes mechanisms to control:
  4292.  
  4293.    * horizontal and vertical alignment of cell contents,
  4294.    * border styles
  4295.    * and cell margins
  4296.  
  4297. Horizontal and vertical alignment
  4298.  
  4299. The following attributes may be set for different table elements (see their
  4300. definitions).
  4301.  
  4302. <!-- horizontal alignment attributes for cell contents -->
  4303. <!ENTITY % cellhalign
  4304.   "align (left|center|right|justify|char) #IMPLIED
  4305.    char       CDATA      #IMPLIED  -- alignment char, e.g. char=':' --
  4306.    charoff    CDATA      #IMPLIED  -- offset for alignment char --"
  4307.   >
  4308. <!-- vertical alignment attributes for cell contents -->
  4309. <!ENTITY % cellvalign
  4310.   "valign (top|middle|bottom|baseline) #IMPLIED"
  4311.   >
  4312.  
  4313. Attribute definitions
  4314.  
  4315. align = left|center|right|justify|char
  4316.      This attribute specifies the alignment of data and the justification of
  4317.      text in a cell. Possible values:
  4318.         o left: Left-flush data/Left-justify text. This is the default value
  4319.           for table data.
  4320.         o center: Center data/Center-justify text. This is the default value
  4321.           for table headers.
  4322.         o right: Right-flush data/Right-justify text.
  4323.         o justify: Double-justify text.
  4324.         o char:Align text around a specific character.
  4325. valign = top|middle|bottom|baseline
  4326.      This attribute specifies the vertical position of data within a cell.
  4327.      Possible values:
  4328.         o top: Cell data is flush with the top of the cell.
  4329.         o middle: Cell data is centered vertically within the cell. This is
  4330.           the default value.
  4331.         o bottom: Cell data is flush with the bottom of the cell.
  4332.         o baseline: All cells in the same row as a cell whose valign
  4333.           attribute has this value should have their textual data positioned
  4334.           so that the first text line occurs on a baseline common to all
  4335.           cells in the row. This constraint does not apply to subsequent
  4336.           text lines in these cells.
  4337. char = cdata
  4338.      This attribute specifies a character within a text fragment which will
  4339.      act as an axis for alignment. The default value for this attribute is
  4340.      the decimal point character for the current language (as set by the
  4341.      lang attribute (e.g., the period (".") in English and the comma (",")
  4342.      in French). The value of this attribute is case-sensitive.
  4343. charoff = length
  4344.      When present, this attribute specifies the offset to the first
  4345.      occurrence of the alignment character on each line. If a line doesn't
  4346.      include the alignment character, it should be horizontally shifted to
  4347.      end at the alignment position.
  4348.  
  4349.      When charoff is used so set the offset of an alignment character, the
  4350.      direction of offset is determined by the current text direction (set by
  4351.      the dir attribute). In left-to-right texts (the default), offset is
  4352.      from the left margin. In right-to-left texts, offset is from the right
  4353.      margin.
  4354.  
  4355. The table in this example aligns a row of currency values along a decimal
  4356. point. We set the alignment character to "." explicitly.
  4357.  
  4358. <TABLE border="border">
  4359. <COLGROUP>
  4360. <COL><COL align="char" char=".">
  4361. <THEAD>
  4362. <TR><TH>Vegetable <TH>Cost per kilo
  4363. <TBODY>
  4364. <TR><TD>Lettuce        <TD>$1
  4365. <TR><TD>Silver carrots <TD>$10.50
  4366. <TR><TD>Golden turnips <TD>$100.30
  4367. </TABLE>
  4368.  
  4369. The formatted table should look something like this:
  4370.  
  4371. ------------------------------
  4372. |   Vegetable  |Cost per kilo|
  4373. |--------------|-------------|
  4374. |Lettuce       |        $1   |
  4375. |--------------|-------------|
  4376. |Silver carrots|       $10.50|
  4377. |--------------|-------------|
  4378. |Golden turnips|      $100.30|
  4379. ------------------------------
  4380.  
  4381. Inheritance of alignment specifications
  4382.  
  4383. The alignment of cell contents can be specified on a cell by cell basis, or
  4384. inherited from enclosing elements, such as the row, column or the table
  4385. itself.
  4386.  
  4387. The order of precedence (from highest to lowest) for the attributes align,
  4388. char, and charoff is the following:
  4389.  
  4390.   1. An alignment attribute set on an element within a cell's data (e.g.,
  4391.      P).
  4392.   2. An alignment attribute set on a cell (TH and TD).
  4393.   3. An alignment attribute set on a column or column group (COL and
  4394.      COLGROUP). When a cell is part of a multi-column span, the alignment
  4395.      property is inherited from the cell definition at the beginning of the
  4396.      span.
  4397.   4. An alignment attribute set on a row or row group (TR, THEAD, TFOOT, and
  4398.      TBODY). When a cell is part of a multi-row span, the alignment property
  4399.      is inherited from the cell definition at the beginning of the span.
  4400.   5. An alignment attribute set on the table (TABLE).
  4401.   6. The default alignment value.
  4402.  
  4403. The order of precedence (from highest to lowest) for the attribute valign
  4404. (as well as the other inherited attributes lang, dir, and style) is the
  4405. following:
  4406.  
  4407.   1. An attribute set on an element within a cell's data (e.g., P).
  4408.   2. An attribute set on a cell (TH and TD).
  4409.   3. An attribute set on a row or row group (TR, THEAD, TFOOT, and TBODY).
  4410.      When a cell is part of a multi-row span, the attribute value is
  4411.      inherited from the cell definition at the beginning of the span.
  4412.   4. An attribute set on a column or column group (COL and COLGROUP). When a
  4413.      cell is part of a multi-column span, the attribute value is inherited
  4414.      from the cell definition at the beginning of the span.
  4415.   5. An attribute set on the table (TABLE).
  4416.   6. The default attribute value.
  4417.  
  4418. Furthermore, when rendering cells, horizontal alignment is determined by
  4419. columns in preference to rows, while for vertical alignment, rows are given
  4420. preference over columns.
  4421.  
  4422. The default alignment for cells depends on the user agent. However, user
  4423. agents should substitute the default attribute for the current
  4424. directionality (i.e., not just "left" in all cases).
  4425.  
  4426. User agents that do not support the "justify" value of the align attribute
  4427. may substitute the "left" value.
  4428.  
  4429. Borders and rules
  4430.  
  4431. The following attributes affect a table's external frame and internal rules.
  4432.  
  4433. Attribute definitions
  4434.  
  4435. frame = void|above|below|hsides|lhs|rhs|vsides|box|border
  4436.      This attribute specifies which sides of the frame that surrounds a
  4437.      table will be visible. Possible values:
  4438.         o void: No sides. This is the default value.
  4439.         o above: The top side only.
  4440.         o below: The bottom side only.
  4441.         o hsides: The top and bottom sides only.
  4442.         o vsides: The right and left sides only.
  4443.         o lhs: The left-hand side only.
  4444.         o rhs: The right-hand side only.
  4445.         o box: All four sides.
  4446.         o border: All four sides.
  4447. rules = none|groups|rows|cols|all
  4448.      This attribute specifies which rules will appear between cells within a
  4449.      table. Possible values:
  4450.         o none: No rules. This is the default value.
  4451.         o groups: Rules will appear between row groups (see THEAD, TFOOT,
  4452.           and TBODY) and column groups (see COLGROUP and COL) only.
  4453.         o rows: Rules will appear between rows only.
  4454.         o cols: Rules will appear between columns only.
  4455.         o all: Rules will appear between all rows and columns.
  4456. border = cdata
  4457.      This attributes specifies the width (in pixels only) of the frame
  4458.      around a table (see the Note below for more information about this
  4459.      attribute).
  4460.  
  4461. In the following table, borders five pixels thick will be rendered on the
  4462. left- and right-hand sides of the table and rules should be displayed
  4463. between all columns.
  4464.  
  4465. <TABLE border="5" frame="vsides" rules="cols">
  4466. <TR> <TD>1 <TD>2 <TD>3
  4467. <TR> <TD>4 <TD>5 <TD>6
  4468. <TR> <TD>7 <TD>8 <TD>9
  4469. </TABLE>
  4470.  
  4471. The following settings should be observed by user agents for backwards
  4472. compatibility.
  4473.  
  4474.    * Setting border="0" implies frame="void" and, unless otherwise
  4475.      specified, rules="none".
  4476.    * Other values of border imply frame="border" and, unless otherwise
  4477.      specified, rules="all".
  4478.    * The value "border" in the start tag of the TABLE element should be
  4479.      interpreted as the value of the frame attribute. It implies rules="all"
  4480.      and some default (non-zero) value for the border attribute.
  4481.  
  4482. Thus, for example:
  4483.  
  4484. <FRAME border="2"> <=> <FRAME border="2" frame="border" rules="all">
  4485.  
  4486. and
  4487.  
  4488. <FRAME border> <=> <FRAME frame="border" rules="all">
  4489.  
  4490. Note: The border attribute also defines the border behavior for the OBJECT
  4491. and IMG elements, but takes different values for those elements.
  4492.  
  4493. Cell margins
  4494.  
  4495. Two attributes control spacing between and within cells.
  4496.  
  4497. Attribute definitions
  4498.  
  4499. cellspacing = length
  4500.      This attribute specifies how much space should be left between the
  4501.      table frame and the first or last cell border for each row or column,
  4502.      and between the cells in a table.
  4503. cellpadding = length
  4504.      This attribute specifies the amount of space between the border of the
  4505.      cell and its contents, on all sides of the contents.
  4506.  
  4507. In the following table, the cellspacing attribute specifies that cells will
  4508. be separated from each other and from the table frame by twenty pixels. The
  4509. cellpadding attribute specifies that the top margin of the cell and the
  4510. bottom margin of the cell will each be separated from the cell's contents by
  4511. 10% of the available vertical space (the total being 20%). Similarly, the
  4512. left margin of the cell and the right margin of the cell will each be
  4513. separated from the cell's contents by 10% of the available horizontal space
  4514. (the total being 20%).
  4515.  
  4516. <TABLE>
  4517. <TR cellspacing="20"> <TD>Data1 <TD cellpadding="20%">Data2 <TD>Data3
  4518. </TABLE>
  4519.  
  4520. If a table or given column has a fixed width, cellspacing and cellpadding
  4521. may demand more space than assigned. We recommend that user agents give
  4522. these attributes precedence over the width attribute when a conflict occurs,
  4523. but this is not a requirement.
  4524.  
  4525. Some sample tables
  4526.  
  4527. The following table samples illustrate the interaction of all the table
  4528. elements.
  4529.  
  4530. Sample 1
  4531.  
  4532. In "ascii art", the following table:
  4533.  
  4534. <TABLE border="border">
  4535. <CAPTION>A test table with merged cells</CAPTION>
  4536. <TR><TH rowspan=2><TH colspan="2">Average
  4537.     <TH rowspan="2">other<BR>category<TH>Misc
  4538. <TR><TH>height<TH>weight
  4539. <TR><TH align="left">males<TD>1.9<TD>0.003
  4540. <TR><TH align="left" rowspan="2">females<TD>1.7<TD>0.002
  4541. </TABLE>
  4542.  
  4543. would be rendered something like this:
  4544.  
  4545.               A test table with merged cells
  4546.     /--------------------------------------------------\
  4547.     |          |      Average      |  other   |  Misc  |
  4548.     |          |-------------------| category |--------|
  4549.     |          |  height |  weight |          |        |
  4550.     |-----------------------------------------|--------|
  4551.     | males    | 1.9     | 0.003   |          |        |
  4552.     |-----------------------------------------|--------|
  4553.     | females  | 1.7     | 0.002   |          |        |
  4554.     \--------------------------------------------------/
  4555.  
  4556. On your browser, the table looks like this:
  4557.  
  4558.     A test table with merged cells
  4559.  
  4560.            Average      other   Misc
  4561.         height weight  category
  4562.  
  4563.  males  1.9    0.003
  4564.  females1.7    0.002
  4565.  
  4566. Sample 2
  4567.  
  4568. This sample illustrates grouped rows and columns. The example is adapted
  4569. from "Developing International Software", by Nadine Kano.
  4570.  
  4571. In "ascii art", the following table:
  4572.  
  4573. <TABLE border="2" frame="hsides" rules="groups">
  4574. <CAPTION>CODE-PAGE SUPPORT IN MICROSOFT WINDOWS</CAPTION>
  4575. <COLGROUP align="center">
  4576. <COLGROUP align="left">
  4577. <COLGROUP align="center" span="2">
  4578. <COLGROUP align="center" span="3">
  4579. <THEAD valign="top">
  4580. <TR>
  4581. <TH>Code-Page<br>ID
  4582. <TH>Name
  4583. <TH>ACP
  4584. <TH>OEMCP
  4585. <TH>Windows<br>NT 3.1
  4586. <TH>Windows<br>NT 3.51
  4587. <TH>Windows<br>95
  4588. <TBODY>
  4589. <TR><TD>1200<TD>Unicode (BMP of ISO/IEC-10646)<TD><TD><TD>X<TD>X<TD>*
  4590. <TR><TD>1250<TD>Windows 3.1 Eastern European<TD>X<TD><TD>X<TD>X<TD>X
  4591. <TR><TD>1251<TD>Windows 3.1 Cyrillic<TD>X<TD><TD>X<TD>X<TD>X
  4592. <TR><TD>1252<TD>Windows 3.1 US (ANSI)<TD>X<TD><TD>X<TD>X<TD>X
  4593. <TR><TD>1253<TD>Windows 3.1 Greek<TD>X<TD><TD>X<TD>X<TD>X
  4594. <TR><TD>1254<TD>Windows 3.1 Turkish<TD>X<TD><TD>X<TD>X<TD>X
  4595. <TR><TD>1255<TD>Hebrew<TD>X<TD><TD><TD><TD>X
  4596. <TR><TD>1256<TD>Arabic<TD>X<TD><TD><TD><TD>X
  4597. <TR><TD>1257<TD>Baltic<TD>X<TD><TD><TD><TD>X
  4598. <TR><TD>1361<TD>Korean (Johab)<TD>X<TD><TD><TD>**<TD>X
  4599. <TBODY>
  4600. <TR><TD>437<TD>MS-DOS United States<TD><TD>X<TD>X<TD>X<TD>X
  4601. <TR><TD>708<TD>Arabic (ASMO 708)<TD><TD>X<TD><TD><TD>X
  4602. <TR><TD>709<TD>Arabic (ASMO 449+, BCON V4)<TD><TD>X<TD><TD><TD>X
  4603. <TR><TD>710<TD>Arabic (Transparent Arabic)<TD><TD>X<TD><TD><TD>X
  4604. <TR><TD>720<TD>Arabic (Transparent ASMO)<TD><TD>X<TD><TD><TD>X
  4605. </TABLE>
  4606.  
  4607. would be rendered something like this:
  4608.  
  4609.                   CODE-PAGE SUPPORT IN MICROSOFT WINDOWS
  4610. ===============================================================================
  4611. Code-Page | Name                         | ACP  OEMCP | Windows Windows Windows
  4612.     ID    |                              |            |  NT 3.1 NT 3.51    95
  4613. -------------------------------------------------------------------------------
  4614.    1200   | Unicode (BMP of ISO 10646)   |            |    X       X       *
  4615.    1250   | Windows 3.1 Eastern European |  X         |    X       X       X
  4616.    1251   | Windows 3.1 Cyrillic         |  X         |    X       X       X
  4617.    1252   | Windows 3.1 US (ANSI)        |  X         |    X       X       X
  4618.    1253   | Windows 3.1 Greek            |  X         |    X       X       X
  4619.    1254   | Windows 3.1 Turkish          |  X         |    X       X       X
  4620.    1255   | Hebrew                       |  X         |                    X
  4621.    1256   | Arabic                       |  X         |                    X
  4622.    1257   | Baltic                       |  X         |                    X
  4623.    1361   | Korean (Johab)               |  X         |            **      X
  4624. -------------------------------------------------------------------------------
  4625.     437   | MS-DOS United States         |        X   |    X       X       X
  4626.     708   | Arabic (ASMO 708)            |        X   |                    X
  4627.     709   | Arabic (ASMO 449+, BCON V4)  |        X   |                    X
  4628.     710   | Arabic (Transparent Arabic)  |        X   |                    X
  4629.     720   | Arabic (Transparent ASMO)    |        X   |                    X
  4630. ===============================================================================
  4631.  
  4632. On your user agent, this tables is rendered as follows:
  4633.  
  4634.                    CODE-PAGE SUPPORT IN MICROSOFT WINDOWS
  4635.  
  4636.  Code-Page                                          Windows Windows Windows
  4637.     ID                 Name             ACP  OEMCP  NT 3.1  NT 3.51   95
  4638.  
  4639.  1200      Unicode (BMP of                          X       X       *
  4640.            ISO/IEC-10646)
  4641.  1250      Windows 3.1 Eastern European X           X       X       X
  4642.  1251      Windows 3.1 Cyrillic         X           X       X       X
  4643.  1252      Windows 3.1 US (ANSI)        X           X       X       X
  4644.  1253      Windows 3.1 Greek            X           X       X       X
  4645.  1254      Windows 3.1 Turkish          X           X       X       X
  4646.  1255      Hebrew                       X                           X
  4647.  1256      Arabic                       X                           X
  4648.  1257      Baltic                       X                           X
  4649.  1361      Korean (Johab)               X                   **      X
  4650.  437       MS-DOS United States              X      X       X       X
  4651.  708       Arabic (ASMO 708)                 X                      X
  4652.  709       Arabic (ASMO 449+, BCON V4)       X                      X
  4653.  710       Arabic (Transparent Arabic)       X                      X
  4654.  720       Arabic (Transparent ASMO)         X                      X
  4655.  
  4656. This example illustrates how COLGROUP can be used to group columns and set
  4657. the default column alignment. Similarly, TBODY is used to group rows. The
  4658. frame and rules attributes tell the user agent which borders and rules to
  4659. render.
  4660.  
  4661.                                    Links
  4662.  
  4663. Contents
  4664.  
  4665.   1. Sources and Destinations of Hypertext Links
  4666.   2. Path information: the BASE element
  4667.   3. Links and anchors
  4668.        1. Definitions of links and anchors
  4669.        2. The A element
  4670.        3. Anchors with the id attribute
  4671.        4. The LINK element
  4672.        5. Link types
  4673.        6. Links and external style sheets
  4674.        7. Links and search engines
  4675.  
  4676. Up to now, the specification has dealt with HTML constructs that add
  4677. structure to a single document. In this section, we introduce concepts and
  4678. constructs that allow authors to create links from one document to another.
  4679.  
  4680. Path information: the BASE element
  4681.  
  4682. <!ELEMENT BASE - O EMPTY>
  4683. <!ATTLIST BASE
  4684.   href        %URL       #REQUIRED
  4685.   target      CDATA      #IMPLIED  -- where to render linked resource --
  4686.   >
  4687.  
  4688. Start tag: required, End tag: forbidden
  4689.  
  4690. Attribute definitions
  4691.  
  4692. href = url
  4693.      This attribute specifies an absolute URL that acts as the base URL for
  4694.      resolving relative URLs.
  4695.  
  4696. Attributes defined elsewhere
  4697.  
  4698.    * target (target frame information)
  4699.  
  4700. It is important to consider the issue of paths when linking to another
  4701. document or including an object. In HTML, path information is always
  4702. specified by a URL. Relative URLs are resolved according to a base URL,
  4703. which may come from a variety of sources (see the section on relative URLs
  4704. for information about sources of base URLs). The BASE element allows authors
  4705. to specify a document's base URL explicitly.
  4706.  
  4707. When present, the BASE element must appear in the HEAD section of an HTML
  4708. document. The scope of the BASE element is the current document only.
  4709.  
  4710. For example, given the following BASE declaration:
  4711.  
  4712. <HTML>
  4713. <HEAD>
  4714. <BASE href="http://www.barre.fr/fou/intro.html">
  4715. </HEAD>
  4716. ...
  4717. </HTML>
  4718.  
  4719. the relative URL "../gee/foo.html" would resolve to:
  4720.  
  4721. http://www.barre.fr/gee/foo.html
  4722.  
  4723. Links and anchors
  4724.  
  4725. A HTML link is a connection from one Web resource to another. Though a very
  4726. simple concept, links have been one of the key reasons the Web has been so
  4727. successful.
  4728.  
  4729. Definitions of links and anchors
  4730.  
  4731. An HTML link has two ends and a direction. The link starts at the "source"
  4732. end and points to the "destination" end.
  4733.  
  4734. Every link definition specifies both the source and the destination of the
  4735. link. One end is always defined as the location where the link definition
  4736. occurs. The other end is specified by an attribute in the link definition.
  4737.  
  4738. A link end refers to some Web resource, such as an HTML document, an image,
  4739. a video clip, a sound, a program, the current document, etc. A link end may
  4740. also refer to an anchor. An anchor is a named zone within an HTML document.
  4741. The zone may include text or other objects.
  4742.  
  4743. Uses of links
  4744.  
  4745. Defined this way, links have no inherent semantics; they just associate a
  4746. source and a destination. However, links also include type information that
  4747. allows user agents to interpret them in interesting ways.
  4748.  
  4749. Of course, by far the most common use of a link is to retrieve another Web
  4750. resource (e.g., by clicking with a mouse, activating the link with a voice
  4751. command, etc.).
  4752.  
  4753. Web-surfing is not the only use of links, however. For instance, authors may
  4754. define links that specify the "next" and "previous" documents in a series of
  4755. documents. User agents can render such links with navigation tools rather
  4756. than as part of the document's contents.
  4757.  
  4758. Similarly, authors may use links to define a print order for a series of
  4759. documents. User agents may follow these links to produce a coherent printed
  4760. version of a manual or book.
  4761.  
  4762. Elements that define links
  4763.  
  4764. There are two HTML elements that define links: LINK and A.
  4765.  
  4766. LINK may only appear in the HEAD section of an HTML document. It defines a
  4767. relationship between the current document and another resource. Although
  4768. LINK has no content, the relationships it defines may be rendered by some
  4769. user agents.
  4770.  
  4771. The A element may only appear in the BODY of a document. It defines a
  4772. relationship between a zone within the current document and another
  4773. resource. A has content (text, images, etc.) that may be rendered with the
  4774. rest of the document's contents. User agents generally highlight this
  4775. content to indicate the presence of a link.
  4776.  
  4777. The other important distinction between these two elements is that a link
  4778. defined by A is generally interpreted by user agents to mean "retrieve the
  4779. resource at the other end of this link". The retrieved resource may be
  4780. handled by the user agent in several ways: by opening a new HTML document in
  4781. the same user agent window, opening a new HTML document in a different
  4782. window, starting a new program to handle the resource, etc.
  4783.  
  4784. The title attribute may be set for these elements to add information about
  4785. the nature of a link. This information may be spoken by a user agent,
  4786. rendered as a tool tip, cause a change in cursor image, etc.
  4787.  
  4788. Elements that define anchors
  4789.  
  4790. There are two ways to specify anchors in an HTML document:
  4791.  
  4792.    * The A element.
  4793.    * The id attribute of any element.
  4794.  
  4795. Links and anchors together. The A element is used to define both links and
  4796. anchors. It is possible, and even economical, to use the same A element to
  4797. define a link and an anchor.
  4798.  
  4799. Internationalization and links
  4800.  
  4801. Since links may point to documents written in different languages (possibly
  4802. with different writing order) and using different character encodings, the A
  4803. and LINK elements support the lang (language), dir (writing direction), and
  4804. charset (character encoding) attributes. These attributes allow authors to
  4805. advise user agents about the nature of the data at the other end of the
  4806. link.
  4807.  
  4808. Armed with this additional knowledge, user agents should be able to avoid
  4809. presenting "garbage" to the user. Instead, they may either locate resources
  4810. necessary for the correct presentation of the document or, if they cannot
  4811. locate the resources, they should at least warn the user that the document
  4812. will be unreadable and explain the cause.
  4813.  
  4814. The A element
  4815.  
  4816. <!ELEMENT A - - (%inline)* -(A)>
  4817. <!ATTLIST A
  4818.   %attrs;                          -- %coreattrs, %i18n, %events --
  4819.   charset     CDATA      #IMPLIED  -- char encoding of linked resource --
  4820.   name        CDATA      #IMPLIED  -- named link end --
  4821.   href        %URL       #IMPLIED  -- URL for linked resource --
  4822.   target      CDATA      #IMPLIED  -- where to render resource --
  4823.   rel         CDATA      #IMPLIED  -- forward link types --
  4824.   rev         CDATA      #IMPLIED  -- reverse link types --
  4825.   accesskey   CDATA      #IMPLIED  -- accessibility key character --
  4826.   shape       %Shape     rect      -- for use with OBJECT SHAPES --
  4827.   coords      %Coords    #IMPLIED  -- for use with OBJECT SHAPES --
  4828.   tabindex    NUMBER     #IMPLIED  -- position in tabbing order --
  4829.   >
  4830.  
  4831. Start tag: required, End tag: required
  4832.  
  4833. Attribute definitions
  4834.  
  4835. name = cdata
  4836.      This attribute indicates that the element is being used to define an
  4837.      anchor. The value of this attribute is a unique anchor name. The scope
  4838.      of this name is the current document. Note that this attribute shares
  4839.      the same name space as the id attribute.
  4840. href = url
  4841.      This attribute indicates that the element is being used to define a
  4842.      link. The value of this attribute is the location of one end of the
  4843.      link (the other end being defined by the location of this element).
  4844. rel = cdata
  4845.      This attribute describes the relation the source anchor holds with
  4846.      respect to the destination anchor. The value of rel specifies the type
  4847.      of the link. This attribute may take a space-separated list of link
  4848.      types.
  4849. rev = cdata
  4850.      This attribute describes the relation the destination anchor holds with
  4851.      respect to the source. The value of rev specifies the type of the link.
  4852.      This attribute may take a space-separated list of link types.
  4853. charset = cdata
  4854.      This attribute specifies the character encoding of the data designated
  4855.      by the link. The value of this attribute must be the name of a
  4856.      "charset" as defined in [RFC2045] (e.g., "euc-jp"). The default value
  4857.      for this attribute is "ISO-8859-1".
  4858.  
  4859. Attributes defined elsewhere
  4860.  
  4861.    * id, class (document-wide identifiers)
  4862.    * lang (language information), dir (text direction)
  4863.    * title (element titles)
  4864.    * style (inline style information)
  4865.    * onclick, ondblclick, onmousedown, onmouseup, onmouseover, onmousemove,
  4866.      onmouseout, onkeypress, onkeydown, onkeyup (intrinsic events)
  4867.    * target (target frame information)
  4868.    * tabindex (tabbing navigation)
  4869.    * accesskey (access keys)
  4870.    * shape, coords (image maps)
  4871.  
  4872. The A element may define an anchor, a link, or both.
  4873.  
  4874. This example illustrates the definition of a link.
  4875.  
  4876. For more information about W3C, please consult the
  4877. <A href="http://www.w3.org/">W3C Web site</A>
  4878.  
  4879. This link designates the home page of the World Wide Web Consortium. When a
  4880. user activates this link in a user agent, the user agent will retrieve the
  4881. resource, in this case, an HTML document.
  4882.  
  4883. User agents generally render links in such a way as to make them obvious to
  4884. users (underlining, reverse video, etc.). Rendering depends on the user
  4885. agent. Rendering may vary according to whether the user has already visited
  4886. the link or not. One possible rendering of the previous link might be:
  4887.  
  4888. For more information about W3C, please consult the W3C Web site.
  4889.                                                    ~~~~~~~~~~~~
  4890.  
  4891. To tell user agents explicitly what the character encoding of the
  4892. destination page is, set the charset attribute:
  4893.  
  4894. For more information about W3C, please consult the
  4895. <A href="http://www.w3.org/" charset="ISO-8859-1">W3C Web site</A>
  4896.  
  4897. The following example illustrates the definition of an anchor. Suppose we
  4898. define an anchor named "anchor-one" in the file "one.html".
  4899.  
  4900. ...text before the anchor...
  4901. <A name="anchor-one">This is the location of anchor one.</A>
  4902. ...text after the anchor...
  4903.  
  4904. This definition assigns an anchor to the entire document zone that contains
  4905. the text "This is the location of anchor one". Usually, the contents of A
  4906. are not rendered in any special way when A defines an anchor only.
  4907.  
  4908. Having defined the anchor, we may link to it from the same or another
  4909. document. URLs that designate anchors end with "#" followed by the anchor
  4910. name. Here are some examples of such URLs:
  4911.  
  4912.    * An absolute URL: http://www.mycompany.com/one.html#anchor-one
  4913.    * A relative URL: ../one.html#anchor-one
  4914.    * When the link is defined in the same document: #anchor-one
  4915.  
  4916. Thus, a link defined in the file "two.html" in the same directory as
  4917. "one.html" would refer to the anchor as follows:
  4918.  
  4919. ...text before the link...
  4920. For more information, please consult <A href="./one.html#anchor-one"> anchor one</A>.
  4921. ...text after the link...
  4922.  
  4923. The A element in the following example specifies an anchor and a link
  4924. simultaneously:
  4925.  
  4926. I just returned from vacation! Here's a
  4927. <A name="anchor-two"
  4928.    href="http://www.somecompany.com/People/Ian/vacation/family.png">
  4929. photo of my family at the lake.</A>.
  4930.  
  4931. This example contains a link to a different type of Web resource (a PNG
  4932. image). Activating the link should cause the image resource to be retrieved
  4933. from the Web (and possibly displayed if the system has been configured to do
  4934. so).
  4935.  
  4936. Note: Some user agents fail to find anchors represented by empty A elements.
  4937. For example, some user agents may not find the "empty-anchor" in the
  4938. following HTML fragment:
  4939.  
  4940. <A name="empty-anchor"></A>
  4941. <EM>...some HTML...</EM>
  4942. <A href="#empty-anchor">Link to empty anchor</A>
  4943.  
  4944. Syntax of link attribute values
  4945.  
  4946. Values of the name, rel, and rev attributes observe the following:
  4947.  
  4948.    * Case sensitivity Values are case-insensitive.
  4949.    * String matching Characters with several possible representations in
  4950.      [ISO10646] (e.g., both precomposed and bsae+diacritic forms) match in
  4951.      two strings only if they have the same representation, except for case
  4952.      differences, in both strings. Case folding must be performed as
  4953.      specified in [UNICODE]. In particular, it is recommended that
  4954.      case-insensitive matching be performed by folding to uppercase letters
  4955.      from lowercase, not vice versa.
  4956.  
  4957. Mailto links
  4958.  
  4959. Authors may create links that do not lead to another document but instead
  4960. cause email to be sent to an email address. When the link is activated, user
  4961. agents should cause a mail program to open that includes the destination
  4962. email address in the "To:" field.
  4963.  
  4964. To cause email to be sent when a link is activated, specify a MAILTO URL as
  4965. the value of the href attribute.
  4966.  
  4967. In this example, when the user activates the link, the user agent should
  4968. open a mail program with the address "joe@somplace.com" in the "To:" field.
  4969.  
  4970. ...this is text...
  4971. For all comments, please send email to
  4972. <A href="mailto:joe@someplace.com">Joe Cool</A>.
  4973.  
  4974. Nested links
  4975.  
  4976. Links and anchors defined by the A element may not be nested.
  4977.  
  4978. ILLEGAL EXAMPLE:
  4979. The following example illustrates nested links. Nested links are not
  4980. permitted.
  4981.  
  4982. This text contains
  4983. <A name="outer-anchor" href="next-outer.html">an outer anchor and
  4984. and link and <A name="inner-anchor" href="next-inner.html">an inner
  4985. anchor and link.</A></A>
  4986.  
  4987. Anchors with the id attribute
  4988.  
  4989. The id attribute may be used to position an anchor at the start tag of any
  4990. element.
  4991.  
  4992. This example illustrates the use of the id attribute to position an anchor
  4993. in an H2 element. The anchor is linked to via the A element.
  4994.  
  4995. You may read more about this in <A href="#section2">Section Two</A>.
  4996. ...later in the document
  4997. <H2 id="section2">Section Two</H2>
  4998. ...later in the document
  4999. Please refer to <A href="#section2">Section Two</A> above
  5000. for more details.
  5001.  
  5002. The id and name attributes share the same name space (see [ISO10646]). This
  5003. means that they cannot both define an anchor with the same name in the same
  5004. document.
  5005.  
  5006. ILLEGAL EXAMPLE:
  5007. The following excerpt is illegal HTML since these attributes declare the
  5008. same name twice in the same document.
  5009.  
  5010. <BODY>
  5011. <A href="#a1">...</A>
  5012. ...
  5013. <H1 id="a1">
  5014. ...pages and pages...
  5015. <A name="a1"></A>
  5016. </BODY>
  5017.  
  5018. Because of its specification in the HTML DTD, the name attribute may contain
  5019. entities. Thus, the value Dürst is a valid name. The id attribute, on
  5020. the other hand, may not contain entities.
  5021.  
  5022. The LINK element
  5023.  
  5024. <!ELEMENT LINK - O EMPTY>
  5025. <!ATTLIST LINK
  5026.   %attrs;                          -- %coreattrs, %i18n, %events --
  5027.   href        %URL       #IMPLIED  -- URL for linked resource --
  5028.   rel         CDATA      #IMPLIED  -- forward link types --
  5029.   rev         CDATA      #IMPLIED  -- reverse link types --
  5030.   type    %ContentType  #IMPLIED  -- advisory Internet content type --
  5031.   media       CDATA      #IMPLIED  -- for rendering on these media --
  5032.   target      CDATA      #IMPLIED  -- where to render linked resource --
  5033.   >
  5034.  
  5035. Start tag: required, End tag: forbidden
  5036.  
  5037. Attributes defined elsewhere
  5038.  
  5039.    * id, class (document-wide identifiers)
  5040.    * lang (language information), dir (text direction)
  5041.    * title (element titles)
  5042.    * style (inline style information)
  5043.    * onclick, ondblclick, onmousedown, onmouseup, onmouseover, onmousemove,
  5044.      onmouseout, onkeypress, onkeydown, onkeyup (intrinsic events)
  5045.    * href, rel, rev (links and anchors)
  5046.    * target (target frame information)
  5047.    * type, media (header style information)
  5048.  
  5049. This element, which must appear in the HEAD section of a document (any
  5050. number of times), defines a media-independent link. Although LINK has no
  5051. content, it conveys relationship information that may be rendered by some
  5052. user agents in a variety of ways (e.g., a toolbar with a drop-down menu of
  5053. links).
  5054.  
  5055. This example illustrates how several LINK definitions may appear in the HEAD
  5056. section of a document. The rel and rev attributes specify where the source
  5057. and destination are for each link. The values "Index", "Next", and
  5058. "Previous" are explained in the section on link types.
  5059.  
  5060. <HTML>
  5061. <HEAD>
  5062. <LINK rel="Index"    href="../index.html">
  5063. <LINK rel="Next"     href="Chapter_3.html">
  5064. <LINK rev="Previous" href="Chapter_1.html">
  5065. </HEAD>
  5066. ...the rest of the document...
  5067.  
  5068. Link types
  5069.  
  5070. The rel attribute specifies the relation the source anchor holds with
  5071. respect to the destination anchor (e.g. rel=owns implies source owns
  5072. destination), while the rev attribute specifies the relation the destination
  5073. anchor plays with respect to the source anchor (e.g. rev=owned-by implies
  5074. destination owned-by source). In both cases, the value or values of the
  5075. attribute describe the nature of the link. Both attributes may be specified
  5076. in the same element start tag.
  5077.  
  5078. Authors may use the following recognized link types, listed here with their
  5079. conventional interpretations. These are defined as being case insensitive,
  5080. i.e.. "Alternate" has the same meaning as "alternate".
  5081.  
  5082. User agents, search engines, etc. may interpret these link types in a
  5083. variety of ways. For example, user agents may provide access to linked
  5084. documents through a navigation bar. Or, when the link type is "Next" user
  5085. agents may preload the next document to save access time.
  5086.  
  5087. Contents
  5088.      The link refers to a document serving as a table of contents.
  5089. Index
  5090.      The link refers to a document providing an index for the current
  5091.      document.
  5092. Glossary
  5093.      The link refers to a document providing a glossary of terms that
  5094.      pertain to the current document.
  5095. Copyright
  5096.      The link refers to a copyright statement for the current document.
  5097. Next
  5098.      The link refers to the next document in an linear sequence of
  5099.      documents. This value is generally used with rel. User agents are
  5100.      recommended to preload the next document, to reduce the the perceived
  5101.      load time.
  5102. Previous or Prev
  5103.      The link refers to the previous document in an ordered series of
  5104.      documents. This value is generally used with rev.
  5105. Start
  5106.      The link refers to the first document in a collection of documents.
  5107.      This link type tells search engines which document in a collection is
  5108.      considered by the author to be the starting point of the collection.
  5109. Help
  5110.      The link refers to a document offering help (more information, links to
  5111.      other sources information, etc.)
  5112. Bookmark
  5113.      The link refers to a bookmark. A bookmark is a link to a key entry
  5114.      point within an extended document. The title attribute may used, for
  5115.      example, to label the bookmark. Note that several bookmarks may be
  5116.      defined in each document.
  5117. Stylesheet
  5118.      The link refers to an external style sheet. See the section on external
  5119.      style sheets for details. This is used together with the link type
  5120.      "Alternate" for user selectable alternative style sheets.
  5121. Alternate
  5122.      The link refers to different versions of the same document. When used
  5123.      together with the lang attribute, implies a translated version of the
  5124.      same document. When used together with the media attribute, implies a
  5125.      version for a different medium.
  5126.  
  5127. Links and external style sheets
  5128.  
  5129. When the LINK element links an external style sheet to a document, the type
  5130. attribute specifies the style sheet language and the media attribute
  5131. specifies the destination medium or media. User agents may save time by
  5132. retrieving from the network only those style sheets that apply to the
  5133. current device.
  5134.  
  5135. Media types are further discussed in the section on style sheets.
  5136.  
  5137. Links and search engines
  5138.  
  5139. Authors may use the LINK element to provide a variety of information to
  5140. search engines, including:
  5141.  
  5142.    * Links to versions of a document written in another language.
  5143.    * Links to versions of a document for different media, such as printable
  5144.      versions.
  5145.    * Links to the front page of a collection of documents.
  5146.  
  5147. The examples below illustrate how language information, media types, and
  5148. link types may be combined to improve document handling by search engines.
  5149.  
  5150. In the following example, we tell search engines where to find Dutch,
  5151. Portuguese, and Arabic versions of a document.
  5152.  
  5153. <HEAD>
  5154. <LINK lang="nl" title="The manual in Dutch"
  5155.       rel="alternate"
  5156.       href="http://someplace.com/manual/dutch.html">
  5157. <LINK lang="pt" title="The manual in Portuguese"
  5158.       rel="alternate"
  5159.       href="http://someplace.com/manual/portuguese.html">
  5160. <LINK lang="ar" title="The manual in Arabic"
  5161.       dir="rtl"
  5162.       rel="alternate"
  5163.       href="http://someplace.com/manual/arabic.html">
  5164. </HEAD>
  5165.  
  5166. In the following example, we tell search engines where to find the printed
  5167. version of a manual.
  5168.  
  5169. <HEAD>
  5170. <LINK media="print" title="The manual in postscript"
  5171.       rel="alternate"
  5172.       href="http://someplace.com/manual/postscript.ps">
  5173. </HEAD>
  5174.  
  5175. In the following example, we tell search engines where to find the front
  5176. page of a collection of documents.
  5177.  
  5178. <HEAD>
  5179. <LINK rel="Start" title="The first page of the manual"
  5180.       href="http://someplace.com/manual/postscript.ps">
  5181. </HEAD>
  5182.  
  5183.                                  Inclusions
  5184.  
  5185. Contents
  5186.  
  5187.   1. Including an object: the OBJECT element
  5188.        1. Object initialization: the PARAM element
  5189.        2. Object declarations and instantiations
  5190.        3. Object alignment
  5191.   2. Including an image: the IMG element
  5192.        1. Image alignment
  5193.   3. Including an applet: the APPLET element
  5194.   4. Including HTML in another HTML document
  5195.   5. Including an image map in an HTML document
  5196.        1. Client-side image maps
  5197.        2. Client-side image maps with MAP and AREA
  5198.        3. Server-side image maps
  5199.   6. Visual presentation of images, objects, and applets
  5200.   7. How to specify alternate text
  5201.  
  5202. The following sections describe the various mechanisms offered by HTML to
  5203. include a resource in a document. HTML allows authors to include objects,
  5204. images, applets, files, and image maps.
  5205.  
  5206. Including an object: the OBJECT element
  5207.  
  5208. <!ENTITY % OAlign "(texttop|middle|textmiddle|baseline|
  5209.                              textbottom|left|center|right)">
  5210.  
  5211. <!ELEMENT OBJECT - - (PARAM | %block)*>
  5212. <!ATTLIST OBJECT
  5213.   %attrs                           -- %coreattrs, %i18n, %events --
  5214.   declare     (declare)  #IMPLIED  -- declare but don't instantiate flag --
  5215.   classid     %URL       #IMPLIED  -- identifies an implementation --
  5216.   codebase    %URL       #IMPLIED  -- some systems need an additional URL --
  5217.   data        %URL       #IMPLIED  -- reference to object's data --
  5218.   type     %ContentType #IMPLIED  -- Internet content type for data --
  5219.   codetype %ContentType #IMPLIED  -- Internet content type for code --
  5220.   standby     CDATA      #IMPLIED  -- message to show while loading --
  5221.   align       %OAlign    #IMPLIED  -- positioning inside document --
  5222.   height      %Length    #IMPLIED  -- suggested height --
  5223.   width       %Length    #IMPLIED  -- suggested width --
  5224.   border      %Length    #IMPLIED  -- suggested link border width --
  5225.   hspace      %Length    #IMPLIED  -- suggested horizontal gutter --
  5226.   vspace      %Length    #IMPLIED  -- suggested vertical gutter --
  5227.   usemap      %URL       #IMPLIED  -- reference to image map --
  5228.   shapes      (shapes)   #IMPLIED  -- object has shaped hypertext links --
  5229.   name        %URL       #IMPLIED  -- submit as part of form --
  5230.   tabindex    NUMBER     #IMPLIED  -- position in tabbing order --
  5231.   >
  5232.  
  5233. Start tag: required, End tag: required
  5234.  
  5235. Attribute definitions
  5236.  
  5237. codebase = url
  5238.      This attribute specifies the base path used to resolve relative URLs
  5239.      specified by classid (i.e., it gives the base URL when the object
  5240.      requires code). If this attribute is not specified, its default value
  5241.      is the base URL of the current document. Not all rendering mechanisms
  5242.      require this attribute.
  5243. classid = url
  5244.      This attribute specifies the location of a rendering mechanism via a
  5245.      URL.
  5246. codetype = cdata
  5247.      This attribute specifies the Internet Media Type (see [MIMETYPES]) of
  5248.      data expected by the rendering mechanism specified by classid. This
  5249.      attribute is optional but recommended when classid is specified since
  5250.      it allows the user agent to avoid loading information for unsupported
  5251.      media types. If no explicit value is given for this attribute, it
  5252.      defaults to the value of the type attribute.
  5253. data = url
  5254.      This attribute specifies the location of the data to be rendered.
  5255. type = cdata
  5256.      This attribute specifies the Internet Media Type (see [MIMETYPES]) for
  5257.      the data specified by data. This attribute is optional but recommended
  5258.      when data is specified since it allows the user agent to avoid loading
  5259.      information for unsupported media types. If no explicit value is given
  5260.      for this attribute, the user agent should attempt to determine the type
  5261.      of the data to be rendered.
  5262. declare
  5263.      When present, this boolean attribute makes the current OBJECT
  5264.      definition a declaration only. The object must be instantiated by a
  5265.      subsequent OBJECT definition referring to this declaration.
  5266. standby = cdata
  5267.      This attribute specifies a message that a user agent may render while
  5268.      loading the object's implementation and data.
  5269. align = texttop|middle|textmiddle|baseline|textbottom|left|center|right
  5270.      Deprecated. This attribute specifies the position of the object with
  5271.      respect its surrounding context. Its possible values are explained in
  5272.      the section on object alignment.
  5273.  
  5274. Attributes defined elsewhere
  5275.  
  5276.    * id, class (document-wide identifiers)
  5277.    * lang (language information), dir (text direction)
  5278.    * title (element titles)
  5279.    * style (inline style information)
  5280.    * onclick, ondblclick, onmousedown, onmouseup, onmouseover, onmousemove,
  5281.      onmouseout, onkeypress, onkeydown, onkeyup (intrinsic events)
  5282.    * tabindex (tabbing navigation)
  5283.    * shapes, usemap (client side image maps)
  5284.    * name (submitting objects with forms)
  5285.    * height, width, border, hspace, vspace (visual presentation of objects,
  5286.      images, and applets)
  5287.  
  5288. Most user agents contain mechanisms for rendering common data types such as
  5289. text, GIF images, colors, fonts, and a handful of graphic elements. To
  5290. render data types they don't support natively, user agents generally run
  5291. external applications. The OBJECT element allows authors to control whether
  5292. included objects are handled by user agents internally or externally.
  5293.  
  5294. In the most general case, an inserted rendering mechanism specifies three
  5295. types of information:
  5296.  
  5297.    * The rendering mechanism's implementation
  5298.    * The data to be rendered
  5299.    * Additional values required by the rendering mechanism at run-time.
  5300.  
  5301. In certain cases, it may not be necessary to specify all of this
  5302. information. For example, some rendering mechanisms may not require data
  5303. (e.g., a self-contained applet that peforms a small animation). Other
  5304. rendering mechanisms may not require run-time initialization. Finally, some
  5305. rendering mechanisms may not require additional implementation information,
  5306. i.e., the user agent itself may already know how to render that type of data
  5307. (e.g., GIF images).
  5308.  
  5309. In HTML, the OBJECT element specifies the location of a rendering mechanism
  5310. and the location of data required by the rendering mechanism. This
  5311. information is specified by the attributes of the OBJECT element. The PARAM
  5312. element specifies a set of run-time values. We discuss this element below,
  5313. in the section on object initialization.
  5314.  
  5315. A user agent must interpret an OBJECT element according to the following
  5316. precedence rules:
  5317.  
  5318.   1. The user agent must first try to render the mechanism specified by the
  5319.      element's attribute.
  5320.   2. If the user agent is not able to render this mechanism for whatever
  5321.      reason (configured not to, lack of resources, wrong architecture,
  5322.      etc.), it must try to render the element's contents.
  5323.  
  5324. In the following example, we insert a fictitious rendering mechanism written
  5325. in the Python language that displays an analog clock. This applet requires
  5326. no additional data or run-time values. The classid attribute specifies the
  5327. location of the applet:
  5328.  
  5329.  
  5330. <OBJECT classid="http://www.miamachina.it/analogclock.py">
  5331. </OBJECT>
  5332.  
  5333. We recommend completing this declaration by including alternate text in the
  5334. contents of OBJECT, in case the user agent cannot render the clock.
  5335.  
  5336.  
  5337. <OBJECT classid="http://www.miamachina.it/analogclock.py">
  5338. An animated clock.
  5339. </OBJECT>
  5340.  
  5341. Note that the clock will be rendered as soon as the user agent interprets
  5342. this OBJECT declaration. It is possible to delay execution of the rendering
  5343. mechanism by first declaring the object (described below).
  5344.  
  5345. One significant consequence of the OBJECT element's design is that it offers
  5346. a mechanism for specifying alternate object renderings; each embedded OBJECT
  5347. declaration may specify an alternate rendering mechanism. If a user agent
  5348. cannot render the outermost OBJECT, it tries to render the contents, which
  5349. may be another OBJECT element, etc.
  5350.  
  5351. In the following example, we embed several OBJECT declarations to illustrate
  5352. how alternate renderings work. User agents will attempt to render the first
  5353. OBJECT element it can, in the following order: (1) an Earth applet written
  5354. in the Python language, (2) an MPEG animation of the Earth, (3) a GIF image
  5355. of the Earth, (4) alternate text.
  5356.  
  5357. <OBJECT title="The Earth as seen from space"
  5358.            classid="http://www.observer.mars/TheEarth.py">
  5359.  <OBJECT data="TheEarth.mpeg" type="application/mpeg">
  5360.   <OBJECT src="TheEarth.gif">
  5361.    The <STRONG>Earth</STRONG> as seen from space.
  5362.   </OBJECT>
  5363.  </OBJECT>
  5364. </OBJECT>
  5365.  
  5366. The outermost declaration specifies an applet that requires no data or
  5367. initial values. The second declaration specifies an MPEG animation and,
  5368. since it does not define a rendering mechanism, relies on the user agent to
  5369. handle the animation. We also set the type attribute so that a user agent
  5370. that cannot render MPEG can elect not to retrieve "TheEarth.mpeg" from the
  5371. network. The third declaration specifies the location of a GIF file and
  5372. furnishes alternate text in case all other mechanisms fail.
  5373.  
  5374. Inline vs. external data. Data to be rendered may be supplied in two ways:
  5375. inline and from an external resource. While the former method will generally
  5376. lead to faster rendering, it is not convenient when rendering large
  5377. quantities of data.
  5378.  
  5379. Object initialization: the PARAM element
  5380.  
  5381. <!ELEMENT PARAM - O EMPTY       -- named property value -->
  5382. <!ATTLIST PARAM
  5383.   name        CDATA      #REQUIRED -- property name --
  5384.   value       CDATA      #IMPLIED  -- property value --
  5385.   valuetype (DATA|REF|OBJECT) DATA -- How to interpret value --
  5386.   type        CDATA      #IMPLIED  -- Internet media type --
  5387.   >
  5388.  
  5389. Start tag: required, End tag: forbidden
  5390.  
  5391. Attribute definitions
  5392.  
  5393. name = cdata
  5394.      This attribute defines the name of a run-time parameter name, assumed
  5395.      to be known by the inserted object. Whether the property name is
  5396.      case-sensitive depends on the object.
  5397. value = cdata
  5398.      This attribute specifies the value of a run-time parameter specified by
  5399.      name. Property values have no meaning to HTML; their meaning is
  5400.      determined by the object in question.
  5401. valuetype = data|ref|object
  5402.      This attribute specifies the type of the value attribute. Possible
  5403.      values:
  5404.         o data: The value specified by value will be passed directly to the
  5405.           rendering mechanism as a string, after resolving any embedded
  5406.           character or numeric character entities. This is the default value
  5407.           for this attribute and may appear alone in the start tag of the
  5408.           element.
  5409.         o ref: The value specified by value is a URL that designates a
  5410.           resource where run-time values are stored. The URL must be passed
  5411.           to the rendering mechanism as is, i.e., unresolved.
  5412.         o object: The value specified by value is a fragment URL that
  5413.           designates an OBJECT declaration in the same document. In this
  5414.           case, the OBJECT definition must be identifiable by its id
  5415.           attribute.
  5416. type = cdata
  5417.      This attribute specifies the Internet Media Type (see [MIMETYPES]) of
  5418.      the resource designated by the value attribute only in the case where
  5419.      valuetype is set to "ref". This attribute thus specifies for the user
  5420.      agent, the type of values that will be found at the URL designated by
  5421.      value.
  5422.  
  5423. The PARAM element specifies a set of values that may be required by a
  5424. rendering mechanism at run-time. Any number of of PARAM elements may appear
  5425. at the beginning of an OBJECT declaration. The syntax of names and values is
  5426. assumed to be understood by the rendering mechanism. Names and values are
  5427. passed to the rendering mechanism on its standard input.
  5428.  
  5429. We return to our clock example. This time, we suppose that the rendering
  5430. mechanism (the clock) is able to handle two run-time parameters that define
  5431. its initial height and width. We set the initial dimensions to 40x40 pixels
  5432. with two PARAM elements.
  5433.  
  5434.  
  5435. <OBJECT classid="http://www.miamachina.it/analogclock.py">
  5436. <PARAM name="height" value="40" valuetype="data">
  5437. <PARAM name="width" value="40" valuetype="data">
  5438. This user agent cannot render Python apps.
  5439. </OBJECT>
  5440.  
  5441. Since the default valuetype for a PARAM element is "data", we could replace
  5442. the above declarations with either:
  5443.  
  5444.  
  5445. <PARAM name="height" value="40">
  5446. <PARAM name="width" value="40" >
  5447.  
  5448. or:
  5449.  
  5450.  
  5451. <PARAM name="height" value="40" data>
  5452. <PARAM name="width" value="40"  data>
  5453.  
  5454. (The latter form -- the value "data" only for valuetype attribute -- is
  5455. possible due to the DTD definition of this attribute.)
  5456.  
  5457. In the following example, run-time data for the rendering mechanism's
  5458. "Init_values" parameter is specified as an external resource (a GIF file).
  5459. The value of the valuetype attribute is thus set to "ref", and the value is
  5460. a URL designating the resource.
  5461.  
  5462. <OBJECT classid="http://www.gifstuff.com/gifappli"
  5463.        standby="Loading Elvis...">
  5464. <PARAM name="Init_values"
  5465.        value="./images/elvis.gif">
  5466.        valuetype="ref">
  5467. </OBJECT>
  5468.  
  5469. Note that we have also set the standby attribute so that the user agent may
  5470. render a message while the rendering mechanism loads.
  5471.  
  5472. Rendering mechanisms are located by URLs. As we discussed in the section on
  5473. URLs, the first segment of an absolute URL specifies the protocol used to
  5474. transfer the data designated by the URL. For HTML documents, this protocol
  5475. is generally "http". Some rendering mechanisms might employ other protocols.
  5476. For instance, when specifying a Java rendering mechanism, you may use URLs
  5477. that begin with "java" and for ActiveX applets, you may use "clsid".
  5478.  
  5479. In the following example, we insert a Java applet into an HTML document.
  5480.  
  5481. <OBJECT classid="java:program.start">
  5482. </OBJECT>
  5483.  
  5484. By setting the codetype attribute, a user agent can decide whether to
  5485. retrieve the Java application based on its ability to do so.
  5486.  
  5487. <OBJECT codetype="application/octet-stream"
  5488.            classid="java:program.start">
  5489. </OBJECT>
  5490.  
  5491. Some rendering schemes require additional information to identify their
  5492. implementation and must be told where to find that information. You may give
  5493. path information to the rendering mechanism via the codebase attribute.
  5494.  
  5495. <OBJECT codetype="application/octet-stream"
  5496.            classid="java:program.start">
  5497.            codebase="http://foooo.bar.com/java/myimplementation/"
  5498. </OBJECT>
  5499.  
  5500. The following example specifies (with the classid attribute) an ActiveX
  5501. rendering mechanism via a URL that begins with the protocol information
  5502. "clsid". The data attribute locates the data to render (another clock).
  5503.  
  5504. <OBJECT classid="clsid:663C8FEF-1EF9-11CF-A3DB-080036F12502"
  5505.            data="http://www.acme.com/ole/clock.stm">
  5506. This application is not supported.
  5507. </OBJECT>
  5508.  
  5509. Object declarations and instantiations
  5510.  
  5511. The preceding examples have only illustrated isolated object definitions.
  5512. When a document is to contain more than one instance of the same object, it
  5513. is possible to separate the declaration of the object from its
  5514. instantiations. Doing so has several advantages:
  5515.  
  5516.    * Data may be retrieved from the network by the user agent one time
  5517.      (during the declaration) and reused for each instantiation.
  5518.    * It is possible to instantiate an object from a different location in
  5519.      the document, for example, by activating a link.
  5520.    * It is possible to specify objects as run-time data for other objects.
  5521.  
  5522. To declare an rendering mechanism so that it is not executed when read by
  5523. the user agent, set the boolean declare attribute in the OBJECT element. At
  5524. the same time, you must identify the declaration by setting the id attribute
  5525. in the OBJECT element to a unique value. Later instantiations of the object
  5526. will refer to this identifier.
  5527.  
  5528. A rendering mechanism defined with the declare attribute is instantiated
  5529. every time the OBJECT is referenced thereafter.
  5530.  
  5531. In the following example, we declare an OBJECT and cause it so be
  5532. instantiated by referring to it from a link. Thus, the object can be
  5533. activated by clicking on some highlighted text, for example.
  5534.  
  5535. <OBJECT declare
  5536.            id="earth_declaration"
  5537.            data="TheEarth.mpeg"
  5538.            type="application/mpeg">
  5539.   <OBJECT src="TheEarth.gif">
  5540.    The <STRONG>Earth</STRONG> as seen from space.
  5541.   </OBJECT>
  5542. </OBJECT>
  5543. ...later in the document...
  5544. Click to see a neat <A href="#earth_declaration">
  5545. animation of The Earth!</A>
  5546.  
  5547. The following example illustrates how to specify run-time values that are
  5548. other objects. In this example, we send text (a poem, in fact) to a
  5549. hypothetical mechanism for viewing poems. The rendering mechanism recognizes
  5550. a run-time parameter named "font" (say, for rendering the poem text in a
  5551. certain font). The value for this parameter is itself an object that inserts
  5552. (but does not render) the font object. The relationship between the font
  5553. object and the poem viewer object is achieved by (1) assigning the id
  5554. "tribune" to the font object declaration and (2) referring to it from the
  5555. PARAM element of the poem viewer object (with valuetype and value).
  5556.  
  5557. <OBJECT declare
  5558.      id="tribune"
  5559.      type="application/x-webfont"
  5560.      data="tribune.gif">
  5561. </OBJECT>
  5562. ...view the poem in KublaKhan.txt here...
  5563. <OBJECT classid="http://foo.bar.com/poem_viewer"
  5564.            data="KublaKhan.txt">
  5565. <PARAM name="font" valuetype="object" value="#tribune">
  5566. <P>You're missing a really cool poem viewer ...
  5567. </OBJECT>
  5568.  
  5569. User agents that don't support the declare attribute must render the
  5570. contents of the OBJECT declaration.
  5571.  
  5572. Object alignment
  5573.  
  5574. The align attribute has been deprecated for this element in favor of style
  5575. sheets.
  5576.  
  5577. The align attribute specifies the position of an object with respect to its
  5578. context.
  5579.  
  5580. The following values place an object in the heart of text:
  5581.  
  5582.    * texttop: means the top of the object should be vertically aligned with
  5583.      the top of the current text line.
  5584.    * middle: means the middle of the object should be vertically aligned
  5585.      with the current baseline.
  5586.    * textmiddle: means the middle of the object should be vertically aligned
  5587.      with the position midway between the baseline and the x-height for the
  5588.      current font. The x-height is defined as the top of a lower case x in
  5589.      Western writing systems. If the text font is an all-caps style, user
  5590.      agents should use the height of a capital X. For other writing systems,
  5591.      user agents should align the middle of the object with the middle of
  5592.      the text.
  5593.    * baseline: means the bottom of the object should be vertically aligned
  5594.      with the current baseline.
  5595.    * textbottom: means the bottom of the object should be vertically aligned
  5596.      with the bottom of the current text line.
  5597.  
  5598. Three other values, left, center, and right, cause an object to float. They
  5599. are discussed in the section on floating objects.
  5600.  
  5601. Including an image: the IMG element
  5602.  
  5603. <!-- To avoid problems with text-only UAs you need to provide
  5604.      a description with ALT, and avoid server-side image maps -->
  5605. <!ELEMENT IMG - O EMPTY      --  Embedded image -->
  5606. <!ATTLIST IMG
  5607.   %attrs;                          -- %coreattrs, %i18n, %events --
  5608.   src         %URL       #REQUIRED -- URL of image to embed --
  5609.   alt         CDATA      #IMPLIED  -- description for text only browsers --
  5610.   align       %IAlign    #IMPLIED  -- vertical or horizontal alignment --
  5611.   height      %Pixels    #IMPLIED  -- suggested height in pixels --
  5612.   width       %Pixels    #IMPLIED  -- suggested width in pixels --
  5613.   border      %Pixels    #IMPLIED  -- suggested link border width --
  5614.   hspace      %Pixels    #IMPLIED  -- suggested horizontal gutter --
  5615.   vspace      %Pixels    #IMPLIED  -- suggested vertical gutter --
  5616.   usemap      %URL       #IMPLIED  -- use client-side image map --
  5617.   ismap       (ismap)    #IMPLIED  -- use server-side image map --
  5618.   >
  5619.  
  5620. Start tag: required, End tag: forbidden
  5621.  
  5622. Attribute definitions
  5623.  
  5624. src = url
  5625.      This attribute specifies the location of the image resource. Examples
  5626.      of widely recognized image formats include GIF, JPEG, and PNG.
  5627. align = bottom|middle|top|left|right
  5628.      Deprecated. This attribute specifies the position of the image with
  5629.      respect its surrounding context. Its values are explained in the
  5630.      section on image alignment.
  5631.  
  5632. Attributes defined elsewhere
  5633.  
  5634.    * id, class (document-wide identifiers)
  5635.    * alt (alternate text)
  5636.    * lang (language information), dir (text direction)
  5637.    * title (element titles)
  5638.    * style (inline style information)
  5639.    * onclick, ondblclick, onmousedown, onmouseup, onmouseover, onmousemove,
  5640.      onmouseout, onkeypress, onkeydown, onkeyup (intrinsic events)
  5641.    * ismap, usemap (client side image maps)
  5642.    * name (submitting objects with forms)
  5643.    * height, width, border, hspace, vspace (visual presentation of objects,
  5644.      images, and applets)
  5645.  
  5646. The IMG element embeds an image in the current document at the location of
  5647. the element's definition. However, we recommend using the OBJECT element to
  5648. insert an image into a document.
  5649.  
  5650. The height and width attributes of this element override the natural height
  5651. and width of the source image. User agents should scale the image
  5652. appropriately.
  5653.  
  5654. In an earlier example, we defined a link to a family photo. Here, we insert
  5655. the photo directly into the current document
  5656.  
  5657. ...preceding text...
  5658. I just returned from vacation! Here's a photo of my family at the lake:
  5659. <IMG src="http://www.somecompany.com/People/Ian/vacation/family.png"
  5660.      alt="A photo of my family at the lake.">
  5661.  
  5662. This may be expressed with the OBJECT element as follows:
  5663.  
  5664. ...preceding text...
  5665. I just returned from vacation! Here's a photo of my family at the lake:
  5666. <OBJECT data="http://www.somecompany.com/People/Ian/vacation/family.png"
  5667.         type="image/png">
  5668. A photo of my family at the lake.
  5669. </OBJECT>
  5670.  
  5671. The alt attribute specifies alternate text when the image cannot be
  5672. displayed (see below for information on how to specify alternate text ).
  5673.  
  5674. Image alignment
  5675.  
  5676. The align attribute has been deprecated for this element in favor of style
  5677. sheets.
  5678.  
  5679. The align attribute specifies the position of an object with respect to its
  5680. context.
  5681.  
  5682. The following values place an object in the heart of text:
  5683.  
  5684.    * bottom: means that the bottom of the image should be vertically aligned
  5685.      with the current baseline. This is the default value.
  5686.    * middle: means that the center of the image should be vertically aligned
  5687.      with the current baseline.
  5688.    * top: means that the top of the image should be vertically aligned with
  5689.      the top of the current text line.
  5690.  
  5691. Two other values, left and right, cause the image to float. They are
  5692. discussed in the section on floating objects.
  5693.  
  5694. Differing interpretations of align. Existing user agents vary in their
  5695. interpretation of the align attribute. Some only take into account what has
  5696. occurred on the text line prior to the element, some take into account the
  5697. text on both sides of the element.
  5698.  
  5699. Including an applet: the APPLET element
  5700.  
  5701. APPLET is deprecated.
  5702.  
  5703. <!ELEMENT APPLET - - (PARAM | %inline)*>
  5704. <!ATTLIST APPLET
  5705.   codebase    %URL       #IMPLIED   -- optional base URL for applet --
  5706.   archive     CDATA      #IMPLIED   -- comma separated archive list --
  5707.   code        CDATA      #IMPLIED   -- applet class file --
  5708.   object      CDATA      #IMPLIED   -- serialized applet file --
  5709.   alt         CDATA      #IMPLIED   -- description for text only browsers --
  5710.   name        CDATA      #IMPLIED   -- allows applets to find each other --
  5711.   width       %Pixels    #REQUIRED  -- suggested width in pixels --
  5712.   height      %Pixels    #REQUIRED  -- suggested height in pixels --
  5713.   align       %IAlign    #IMPLIED   -- vertical or horizontal alignment --
  5714.   hspace      %Pixels    #IMPLIED   -- suggested horizontal gutter --
  5715.   vspace      %Pixels    #IMPLIED   -- suggested vertical gutter --
  5716.   >
  5717.  
  5718. Start tag: required, End tag: required
  5719.  
  5720. Attribute definitions
  5721.  
  5722. codebase = url
  5723.      This attribute specifies the base URL for the applet. If this attribute
  5724.      is not specified, then the base URL for the applet is the same as for
  5725.      the current document.
  5726. code = cdata
  5727.      This attribute specifies the name of the resource that contains the
  5728.      applet's compiled applet subclass. The value must be a relative URL
  5729.      with respect to the applet base URL.
  5730. name = cdata
  5731.      This attribute specifies a name for the applet instance, which makes it
  5732.      possible for applets on the same page to find (and communicate with)
  5733.      each other.
  5734. width = length
  5735.      This attribute specifies the initial width of the applet display area
  5736.      (not counting any windows or dialogs that the applet brings up).
  5737. height = length
  5738.      This attribute specifies the initial height of the applet display area
  5739.      (not counting any windows or dialogs that the applet brings up).
  5740. align = bottom|middle|top|left|right
  5741.      This attribute specifies the position of the object with respect to its
  5742.      surrounding context. Its values are explained in the section on image
  5743.      alignment.
  5744. archive = cdata
  5745.      This attribute specifies the names of one or more comma-separated
  5746.      archives containing classes and other resources that will be
  5747.      "preloaded". The classes are loaded using an instance of an
  5748.      AppletClassLoader with the given codebase. Preloading resources can
  5749.      significantly improve the performance of applets.
  5750. object = cdata
  5751.      This attribute gives the name of the resource that contains a
  5752.      serialized representation of an applet. The applet will be
  5753.      deserialized. The init() method will not be invoked; but its start()
  5754.      method will. Attributes valid when the original object was serialized
  5755.      are not restored. Any attributes passed to this applet instance will be
  5756.      available to the Applet.
  5757.  
  5758. Attributes defined elsewhere
  5759.  
  5760.    * alt (alternate text)
  5761.    * hspace, vspace (visual presentation of objects, images, and applets)
  5762.  
  5763. This element, supported by all Java-enabled browsers, allows designers to
  5764. embed a Java applet in an HTML document. It has been deprecated in favor of
  5765. the OBJECT element.
  5766.  
  5767. The content of the APPLET acts as alternate information for user agents that
  5768. don't support this element or are currently configured not to support
  5769. applets. The content must be ignored otherwise.
  5770.  
  5771. The following sample Java applet:
  5772.  
  5773. <APPLET code="Bubbles.class" width="500" height="500">
  5774. Java applet that draws animated bubbles.
  5775. </APPLET>
  5776.  
  5777. may be rewritten as follows with OBJECT:
  5778.  
  5779. <OBJECT codetype="application/octet-stream"
  5780.         classid="java:Bubbles.class"
  5781.         width="500" height="500">
  5782. Java applet that draws animated bubbles.
  5783. </OBJECT>
  5784.  
  5785. Initial values may be supplied to the applet via the PARAM element.
  5786.  
  5787. The following sample Java applet:
  5788.  
  5789. <APPLET code="AudioItem" width="15" height="15">
  5790. <PARAM name="snd" value="Hello.au|Welcome.au">
  5791. Java applet that plays a welcoming sound.
  5792. </APPLET>
  5793.  
  5794. may be rewritten as follows with OBJECT:
  5795.  
  5796. <OBJECT codetype="application/octet-stream"
  5797.         classid="AudioItem"
  5798.         width="15" height="15">
  5799. <PARAM name="snd" value="Hello.au|Welcome.au">
  5800. Java applet that plays a welcoming sound.
  5801. </OBJECT>
  5802.  
  5803. Including HTML in another HTML document
  5804.  
  5805. Sometimes, rather than linking to another document, it is helpful to include
  5806. the contents of an HTML document in another HTML document. We recommend
  5807. using the OBJECT element with the data attribute for this purpose.
  5808.  
  5809. For instance, the following line will include the contents of
  5810. piece_to_include.html at the location where the OBJECT definition occurs.
  5811.  
  5812. ...text before...
  5813. <OBJECT data="file_to_include.html">
  5814. Warning: file_to_include.html could not be included.
  5815. </OBJECT>
  5816. ...text after...
  5817.  
  5818. The contents of OBJECT must only be rendered if the file specified by the
  5819. data attribute cannot be loaded.
  5820.  
  5821. The behavior of a user agent in cases where a file includes itself is not
  5822. defined.
  5823.  
  5824. Careful file inclusions. Be careful if you attempt to include a section of
  5825. an HTML document defined by an anchor. The entire document after the anchor
  5826. definition will be included, and you might unwittingly include unwanted end
  5827. tags (for elements such as BODY, HTML, etc.) in your document.
  5828.  
  5829. The IFRAME element may also be used to insert an inline frame containing
  5830. text in an HTML document.
  5831.  
  5832. Including an image map in an HTML document
  5833.  
  5834. An image map allows users authors to specify active regions of an image or
  5835. object and assign a specific action to each region (e.g., retrieve a
  5836. document, run a program, etc.)
  5837.  
  5838. An image map is created by associating an object with a specification of
  5839. sensitive geometric areas on the object.
  5840.  
  5841. There are two types of image maps:
  5842.  
  5843.    * Server-side. When a user activates a region of a server-side image map
  5844.      with a mouse, the pixel coordinates of the click are sent to the server
  5845.      where the document is housed. The server interprets the coordinates and
  5846.      performs some action.
  5847.    * Client-side. When a user activates a region of a client-side image map
  5848.      with a mouse, the pixel coordinates are interpreted by the user agent.
  5849.      The user agent selects a link that was specified for the activated
  5850.      region and follows it.
  5851.  
  5852. Client-side image maps are preferred over server-side image maps. It is
  5853. possible to implement client-side image maps with several elements.
  5854.  
  5855. Non-graphical representation of image maps. Non-graphical user agents may
  5856. render client-side image maps as sets of textual links. The textual region
  5857. may be activated by keyboard input.
  5858.  
  5859. Client-side image maps
  5860.  
  5861. The following attributes are defined for several elements (A and AREA). They
  5862. allow authors to specify a set of geometrical regions and associate URLs
  5863. with them.
  5864.  
  5865. Attribute definitions
  5866.  
  5867. shape = default|rect|circle|poly
  5868.      This attribute specifies the shape of a region. Possible values:
  5869.         o default: Specifies the entire region.
  5870.         o rect: Define a rectangular region.
  5871.         o circle: Define a circular region.
  5872.         o poly: Define a polygonal region.
  5873. coords = length-list
  5874.      This attribute specifies the position a shape on the screen. The number
  5875.      and order of values depends on the shape being defined. Possible
  5876.      combinations:
  5877.         o rect: left-x, top-y, right-x, bottom-y.
  5878.         o circle: center-x, center-y, radius.
  5879.         o poly: x1, y1, x2, y2, ..., xN, yN.
  5880.  
  5881.      Coordinates are relative to the top, left corner of the object. All
  5882.      values are lengths (they may be pixel values or percentage values).
  5883.  
  5884. The following attribute is defined for the OBJECT element.
  5885.  
  5886. Attribute definitions
  5887.  
  5888. shapes
  5889.      When set, this boolean attribute specifies that the object being
  5890.      defined is an image map. The contents of the OBJECT element will
  5891.      specify the active regions.
  5892.  
  5893. In the following example, we create a client-side image map for the OBJECT
  5894. element by associating URLs with regions specified by a series of A
  5895. elements.
  5896.  
  5897. <OBJECT data="navbar.gif" shapes>
  5898.  <A href="guide.html" shape="rect" coords="0,0,118,28">Access Guide</a> |
  5899.  <A href="shortcut.html" shape="rect" coords="118,0,184,28">Go</A> |
  5900.  <A href="search.html" shape="circ" coords="184,200,60">Search</A> |
  5901.  <A href="top10.html" shape="poly" coords="276,0,373,28,50,50,276,0">Top Ten</A>
  5902. </OBJECT>
  5903.  
  5904. If the OBJECT element includes a shapes attribute, user agents must parse
  5905. the contents of the element to look for anchors.
  5906.  
  5907. If two or more defined regions overlap, the region defined first takes
  5908. precedence (i.e., responds to user input).
  5909.  
  5910. Client-side image maps with MAP and AREA
  5911.  
  5912. The MAP and AREA elements provide an alternate mechanism for client side
  5913. image maps.
  5914.  
  5915. <!ELEMENT MAP - - (AREA)*>
  5916. <!ATTLIST MAP
  5917.   %coreattrs;                      -- id, class, style, title --
  5918.   name        CDATA     #IMPLIED
  5919.   >
  5920.  
  5921. Start tag: required, End tag: required
  5922.  
  5923. <!ELEMENT AREA - O EMPTY>
  5924. <!ATTLIST AREA
  5925.   shape       %Shape    rect      -- controls interpretation of coords --
  5926.   coords      %Coords   #IMPLIED  -- comma separated list of values --
  5927.   href        %URL      #IMPLIED  -- this region acts as hypertext link --
  5928.   target      CDATA     #IMPLIED  -- where to render linked resource --
  5929.   nohref      (nohref)  #IMPLIED  -- this region has no action --
  5930.   alt         CDATA     #REQUIRED -- description for text only browsers --
  5931.   tabindex    NUMBER    #IMPLIED  -- position in tabbing order --
  5932.   >
  5933.  
  5934. Start tag: required, End tag: forbidden
  5935.  
  5936. Attribute definitions
  5937.  
  5938. nohref
  5939.      When set, this boolean attribute specifies that a region has no
  5940.      associated link.
  5941.  
  5942. Attributes defined elsewhere
  5943.  
  5944.    * id, class (document-wide identifiers)
  5945.    * lang (language information), dir (text direction)
  5946.    * title (element titles)
  5947.    * style (inline style information)
  5948.    * name (submitting objects with forms)
  5949.    * alt (alternate text)
  5950.    * href ( anchor reference) target (frame target information)
  5951.    * tabindex (tabbing navigation)
  5952.    * accesskey (access keys)
  5953.    * shape, coords (image maps)
  5954.  
  5955. Several elements (OBJECT, IMG, and INPUT) allow the following attribute to
  5956. specify an associated client-side image map.
  5957.  
  5958. Attribute definitions
  5959.  
  5960. usemap = url
  5961.      This attribute specifies the location of a map defined by MAP and AREA.
  5962.  
  5963. We can rewrite the previous example in terms of MAP and AREA. We still
  5964. create an OBJECT that will insert an image. We associate the object and the
  5965. image map by setting the usemap attribute on the OBJECT and the name
  5966. attribute of the MAP element to the same value.
  5967.  
  5968. <OBJECT data="navbar1.gif" usemap="#map1"></OBJECT>
  5969.  
  5970. <MAP name="map1">
  5971.  <AREA href="guide.html"
  5972.           alt="Access Guide"
  5973.           shape="rect"
  5974.           coords="0,0,118,28">
  5975.  <AREA href="search.html"
  5976.           alt="Search"
  5977.           shape="rect"
  5978.           coords="184,0,276,28">
  5979.  <AREA href="shortcut.html"
  5980.           alt="Go"
  5981.           shape=circ
  5982.           coords="184,200,60">
  5983.  <AREA href="top10.html"
  5984.           alt="Top Ten"
  5985.           shape="poly"
  5986.           coords="276,0,373,28,50,50,276,0">
  5987. </MAP>
  5988.  
  5989. The alt attribute specifies alternate text for cases when the image map may
  5990. not be displayed (see below for information on how to specify alternate
  5991. text).
  5992.  
  5993. Note: MAP is not backwards compatible with HTML 2.0 user agents.
  5994.  
  5995. Server-side image maps
  5996.  
  5997. Server-side image maps may be interesting in cases where the image map is
  5998. too complicated for a client-side image map.
  5999.  
  6000. It is only possible to define a server-side image map with the IMG element.
  6001. To do so, set the boolean attribute ismap in the IMG definition. The
  6002. associated map of regions must be specified with the usemap attribute.
  6003.  
  6004. When the user activates a region of the image map, the screen coordinates
  6005. are sent directly to the server where the document resides. Screen
  6006. coordinates are expressed as screen pixel values. For normative information
  6007. about the definition of a pixel and how to scale it, please consult [CSS1].
  6008.  
  6009. The location clicked is passed to the server as follows. The user agent
  6010. derives a new URL from the URL specified by the href attribute by appending
  6011. `?' followed by the x and y coordinates, separated by a comma. The link is
  6012. then followed using the new URL. For instance, in the previous example, if
  6013. the user clicks at at the location x=10, y=27 then the derived URL is
  6014. "/cgibin/navbar.map?10,27".
  6015.  
  6016. In the following example, the first active region defines a client-side
  6017. link. The second defines a server-side link, but doesn't assign a specific
  6018. shape to it (this is accomplished with the "default" value of the shape
  6019. attribute). Since the regions of the two links overlap, the first takes
  6020. precedence of the later definition. Thus, a click anywhere but in the
  6021. rectangle will cause the click's coordinates to be sent to the server.
  6022.  
  6023. <OBJECT data="game.gif" shapes>
  6024.   <A href="guide.html" shape="rect" coords="0,0,118,28">
  6025.         Rules of the Game</A>
  6026.   <A href="http://www.acme.com/cgi-bin/competition"
  6027.         ismap
  6028.         shape="default">
  6029.         Guess the location</a>
  6030. </OBJECT>
  6031.  
  6032. Visual presentation of images, objects, and applets
  6033.  
  6034. All IMG and OBJECT attributes that concern visual alignment or presentation
  6035. have been deprecated in favor of style sheets.
  6036.  
  6037. The height and width attributes give user agents an idea of the size of an
  6038. image or object so that they may reserve space for it and continue rendering
  6039. the document while waiting for the image data. Both attributes take values
  6040. of type length. User agents may scale objects and images to match these
  6041. values if appropriate.
  6042.  
  6043. The vspace and hspace attributes specify the amount of white space to be
  6044. inserted to the left and right (hspace) and above and below (vspace) an
  6045. image or object. The default value for this attribute is not specified, but
  6046. is generally a small, non-zero length. Both attributes take values of type
  6047. length.
  6048.  
  6049. Images or objects that are the content of an A element are sometimes
  6050. surrounded by a border. The border attribute specifies the width of this
  6051. border.
  6052.  
  6053. How to specify alternate text
  6054.  
  6055. Attribute definitions
  6056.  
  6057. alt = cdata
  6058.      For user agents that cannot display images, forms, or applets, this
  6059.      attribute specifies alternate text. The language of the alternate text
  6060.      is specified by the lang attribute.
  6061.  
  6062. Several non-textual elements (IMG, AREA, APPLET, and INPUT) allow authors to
  6063. specify alternate text to serve as content when the element cannot be
  6064. rendered normally. Specifying alternate text assists users without graphic
  6065. display terminals, users whose browsers don't support forms, visually
  6066. impaired users, those who use speech synthesizers, those who have configured
  6067. their graphical user agents not to display images, etc.
  6068.  
  6069. While alternate text may be very helpful, it must be handled with care.
  6070. Authors should observe the following guidelines:
  6071.  
  6072.    * Do not specify meaningless alternate text when including images
  6073.      intended to format a page. In this case, the alternate text should be
  6074.      the empty string (""). In any case, authors should not use images to
  6075.      format pages; style sheets should be used instead.
  6076.    * Do not specify meaningless alternate text (e.g., "dummy text"). Not
  6077.      only will this frustrate users, it will slow down user agents that must
  6078.      convert text to speech or braille output.
  6079.  
  6080. The alt attribute is mandatory for the AREA element, but optional for IMG,
  6081. APPLET, and INPUT.
  6082.  
  6083. When an author does not set the alt attribute for the IMG or APPLET
  6084. elements, user agents should supply the alternate text, calculated in the
  6085. following order:
  6086.  
  6087.   1. If the title has been specified, its value should be used as alternate
  6088.      text.
  6089.   2. Otherwise, if HTTP headers provide title information when the included
  6090.      object is retrieved, this information should be used as alternate text.
  6091.   3. Otherwise, if the included object contains text fields (e.g., GIF
  6092.      images contain some text fields), information extracted from the text
  6093.      fields should be used as alternate text. Since user agents may have to
  6094.      retrieve an entire object first in order to extract textual
  6095.      information, user agents may adopt more economical approaches (e.g.,
  6096.      content negotiation).
  6097.   4. Otherwise, in the absence of other information, user agents should use
  6098.      the file name (minus the extension) as alternate text.
  6099.  
  6100. When an author does not set the alt attribute for the INPUT element, user
  6101. agents should supply the alternate text, calculated in the following order:
  6102.  
  6103.   1. If the title has been specified, its value should be used as alternate
  6104.      text.
  6105.   2. Otherwise, if the name has been specified, its value should be used as
  6106.      alternate text.
  6107.   3. Otherwise (submit and reset buttons), the value of the type attribute
  6108.      should be used as alternate text.
  6109.  
  6110.                        Presentation of HTML documents
  6111.  
  6112. Contents
  6113.  
  6114.   1. Style Sheets
  6115.        1. Adding style to HTML
  6116.             1. Setting the default style sheet language
  6117.             2. Inline style information
  6118.             3. Header style information: the STYLE element
  6119.             4. External style sheets
  6120.             5. Setting the default named style
  6121.        2. Inheritance and cascading
  6122.        3. Hiding the Content of Style Elements from non-conforming User
  6123.           Agents
  6124.        4. Specifying style through HTTP headers
  6125.   2. Alignment, font styles, and horizontal rules
  6126.        1. Formatting
  6127.             1. Background color
  6128.             2. Alignment
  6129.             3. Floating objects
  6130.        2. Fonts
  6131.             1. Font style elements: the TT, I, B, BIG, SMALL, STRIKE, S, and
  6132.                U elements
  6133.             2. Font modifier elements: FONT and BASEFONT
  6134.        3. Rules: the HR element
  6135.   3. Frames
  6136.        1. Layout of frames
  6137.             1. The FRAMESET element
  6138.             2. The FRAME element
  6139.        2. Specifying target frame information
  6140.             1. Setting the default target for links
  6141.             2. Target semantics
  6142.             3. Target names
  6143.        3. Alternate content
  6144.             1. The NOFRAMES element
  6145.        4. Inline frames: the IFRAME element
  6146.  
  6147.                                 Style Sheets
  6148.  
  6149. Contents
  6150.  
  6151.   1. Adding style to HTML
  6152.        1. Setting the default style sheet language
  6153.        2. Inline style information
  6154.        3. Header style information: the STYLE element
  6155.        4. External style sheets
  6156.        5. Setting the default named style
  6157.   2. Inheritance and cascading
  6158.   3. Hiding the Content of Style Elements from non-conforming User Agents
  6159.   4. Specifying style through HTTP headers
  6160.  
  6161. Style sheets represent a major breakthrough in how Web page designers work,
  6162. by expanding their ability to improve the appearence of their pages. In the
  6163. scientific environments in which the Web was conceived, people are more
  6164. concerned with the content of their documents than the presentation. As
  6165. people from wider walks of life discovered the Web, the limitations of HTML
  6166. became a source of continuing frustration. These authors were used to paper
  6167. media where they had full control. They learned how to sidestep HTML's
  6168. stylistic limitations. While the intentions have been good - to improve the
  6169. presentation of Web pages - the techniques for doing so have had unfortunate
  6170. side effects. These techniques work for some of the people, some of the
  6171. time, but never for all of the people, all of the time, They include:
  6172.  
  6173.    * Using proprietary HTML extensions
  6174.    * Converting text into images
  6175.    * Using images for white space control
  6176.    * Use of tables for page layout
  6177.    * Writing a program instead of using HTML
  6178.  
  6179. These techniques considerably increase the complexity of Web pages, have
  6180. limited flexibilty as well as suffering from interoperability problems, and
  6181. creating hardships for people with disabilities.
  6182.  
  6183. Style sheets bring back the ease of control over presentation, and supercede
  6184. the limited range of presentation mechanisms added to HTML over the last few
  6185. years. Style sheets make it easy to specify the amount of white space
  6186. between text lines, the amount lines are indented, the colors used for the
  6187. text and the backgrounds, the font size and style, and a host of other
  6188. details.
  6189.  
  6190. HTML 4.0 provides support for the following features:
  6191.  
  6192. Flexible placement of Style Information
  6193.      Placing style sheets in separate files makes them easy to reuse.
  6194.      Sometimes its useful to include rendering instructions within the
  6195.      document to which they apply, either grouped at the start of the
  6196.      document, or in attributes of the elements throughout the body of the
  6197.      document. To make it easier to manage style on a site basis, this
  6198.      specification describes how to use HTTP headers to set the style sheets
  6199.      to be applied to a document.
  6200. Independence from specific style sheet languages
  6201.      This specification doesn't tie HTML to any particular style sheet
  6202.      language. This allows for a range of such languages to be used, for
  6203.      instance simple ones for the majority of users and much more complex
  6204.      ones for the minority of users with highly specialized needs. The
  6205.      examples included below all use the CSS (Cascading Style Sheets)
  6206.      language [CSS1], but other style sheet languages would be possible.
  6207. Cascading Style Sheets
  6208.      This is the capability provided by some style sheet languages such as
  6209.      CSS to allow style information from several sources to be blended
  6210.      together. For instance, corporate style guidelines, styles common to a
  6211.      group of documents, and styles specific to a single document. By
  6212.      storing these separately, style sheets can be reused, simplifying
  6213.      authoring and making more effective use of network caching. The cascade
  6214.      defines an ordered sequence of style sheets where rules in later sheets
  6215.      have greater precedence than earlier ones. Not all style sheet
  6216.      languages support cascading.
  6217. Media Dependencies
  6218.      HTML allows you to specify documents in a media independent way. This
  6219.      allows people to access Web pages using a wide variety of devices and
  6220.      media, e.g. graphical displays for windows, macs, and X11, set-top
  6221.      boxes for television sets, specially adapted phones and pda based
  6222.      portable devices, speech-based browsers, and braille-based tactical
  6223.      devices.
  6224.  
  6225.      Style sheets, by contrast, apply to specific media or media groups. A
  6226.      style sheet intended for screen use, may be applicable when printing,
  6227.      but is of little use for speech-based browsers. This specification
  6228.      allows you to define the broad categories of media a given style sheet
  6229.      is applicable to. This allows user agents to avoid retrieving
  6230.      inappropriate style sheets. Style sheet languages may include features
  6231.      for describing media dependencies within the same style sheet.
  6232. Alternative Styles
  6233.      Authors may wish to offer readers several alternative styles for
  6234.      viewing a document. For instance, a compact version with small fonts,
  6235.      and one with larger fonts for increased legibility. This specification
  6236.      allows you to specify such alternatives, including which one is the
  6237.      default. Users should be given the opportunity of selecting between
  6238.      these styles or switching off style sheets altogether.
  6239.  
  6240. Note: This specification includes more detailed information about style
  6241. sheets in sections on performance issues and new media types.
  6242.  
  6243. Adding style to HTML
  6244.  
  6245. HTML documents may contain style sheet rules directly in them or they may
  6246. import style sheets. Any style sheet language may be used with HTML. A
  6247. simple style sheet language may suffice for the needs of most users, but
  6248. languages may be more suited to highly specialized needs. HTML does not
  6249. depend on one specific style sheet language. For the purposes of this
  6250. document, however, we will present examples that illustrate Cascading Style
  6251. Sheets ([CSS1]), abbreviated CSS.
  6252.  
  6253. Setting the default style sheet language
  6254.  
  6255. The syntax of a style rule is that of the style sheet language, not HTML.
  6256. Since user agents that support style sheets must parse these rules, users
  6257. must declare which style sheet languages are being employed.
  6258.  
  6259. Use the META element to set the default style sheet language for a document.
  6260. For example, to set the default to CSS, put the following declaration in the
  6261. HEAD of your document:
  6262.  
  6263. <META http-equiv="Content-Style-Type" content="text/css">
  6264.  
  6265. The default style sheet language can also be set with HTTP headers. The
  6266. above META declaration is equivalent to the HTTP header:
  6267.  
  6268. Content-Style-Type: text/css
  6269.  
  6270. If two or more META declarations or HTTP headers specify the default style
  6271. sheet language, the last one takes precedence. HTTP headers are considered
  6272. as occuring earlier than the document HEAD for this purpose. In the absence
  6273. of an explicit declaration, the default style sheet language is assumed to
  6274. be CSS. We recommend that authoring tools provide an explicit declaration.
  6275.  
  6276. Conforming HTML parsers must be able to distinguish HTML from style sheet
  6277. rules. HTML elements and attributes define the beginning of style sheet
  6278. data. The end of style sheet data is defined as the end tag open delimiter
  6279. (</) immediately followed by an SGML name start character ([a-zA-Z]). All
  6280. style sheet data must be provided to user agent's appropriate style sheet
  6281. handler.
  6282.  
  6283. Inline style information
  6284.  
  6285. Attribute definitions
  6286.  
  6287. style = cdata
  6288.      This attribute specifies style information for the current element.
  6289.  
  6290. The style attribute specifies style information for a single element. The
  6291. style information is specified using the default style sheet language.
  6292.  
  6293. This example sets color and font size information for the text in a specific
  6294. paragraph.
  6295.  
  6296. <P type="text/css" style="font-size: 12pt; color: fuschia">Aren't style
  6297. sheets wonderful?
  6298.  
  6299. Note the syntax of a CSS declaration: name : value. Property declarations
  6300. are separated by a semi-colon.
  6301.  
  6302. The style attribute is appropriate when you want to apply a particular style
  6303. to an individual HTML element. If the style will be reused for several
  6304. elements, you should consider using the STYLE element. For the best
  6305. flexibility, place styles in separate style sheets.
  6306.  
  6307. Header style information: the STYLE element
  6308.  
  6309. <!ELEMENT STYLE - - CDATA      -- style info -->
  6310. <!ATTLIST STYLE
  6311.   %i18n;                           -- lang, dir, for use with title --
  6312.   type        CDATA      #REQUIRED -- Internet content type
  6313.                                       for style language --
  6314.   media       CDATA      #IMPLIED  -- designed for use with these media --
  6315.   title       CDATA      #IMPLIED  -- advisory title --
  6316.   >
  6317.  
  6318. Start tag: required, End tag: required
  6319.  
  6320. Attribute definitions
  6321.  
  6322. type = cdata
  6323.      This attribute specifies the style sheet language of the element's
  6324.      contents, thus overriding the default style sheet language. The style
  6325.      sheet language is specified as an Internet Media Type (e.g.,
  6326.      "text/css"). Internet Media Types are defined in [MIMETYPES].
  6327. media = cdata-list
  6328.      This attribute specifies the intended destination medium for style
  6329.      information. It may be a single media type or a comma-separated list.
  6330.      Possible media types:
  6331.         o screen: Output is intended for non-paged computer screens. This is
  6332.           the default value.
  6333.         o print: Output is intended for paged, opaque material and for
  6334.           documents on screen viewed in print preview mode.
  6335.         o projection: Output is intended for projectors.
  6336.         o braille: Output is intended for braille tactile feedback devices
  6337.         o speech: Output is intended for a speech synthesizer.
  6338.         o all: Applies to all devices.
  6339.  
  6340. Attributes defined elsewhere
  6341.  
  6342.    * lang (language information), dir (text direction)
  6343.  
  6344. The STYLE element allows authors to put style sheet rules in the header of
  6345. the document. HTML permits any number of STYLE elements in the HEAD section
  6346. of a document.
  6347.  
  6348. User agents that don't support style sheets, or don't support the specific
  6349. style sheet language used by a STYLE element must hide the contents of the
  6350. STYLE element. It is an error to render the content as part of the
  6351. document's text. Some style sheet languages support syntax for hiding the
  6352. content from non-conforming user agents.
  6353.  
  6354. Some style sheet implementations may allow a wider variety of rules in the
  6355. STYLE element than in the style attribute. For example, with CSS, rules may
  6356. be declared within a STYLE element for:
  6357.  
  6358.    * All instances of a specific HTML element (e.g., all P elements, all H1
  6359.      elements, etc.)
  6360.    * All instances of an HTML element belonging to a specific class (i.e.,
  6361.      whose class attribute is set to some value).
  6362.    * Single instances of an HTML element (i.e., whose id attribute is set to
  6363.      some value).
  6364.  
  6365. Rules for style rule precedences and inheritance depend on the style sheet
  6366. language.
  6367.  
  6368. The following CSS STYLE declaration puts a border around every H1 element in
  6369. the document and centers it on the page.
  6370.  
  6371. <HEAD>
  6372.  <STYLE type="text/css">
  6373.    H1 {border-width: 1; border: solid; text-align: center}
  6374.  </STYLE>
  6375. </HEAD>
  6376.  
  6377. To specify that this style information should only apply to H1 elements of a
  6378. specific class, we modify it as follows:
  6379.  
  6380. <HEAD>
  6381.  <STYLE type="text/css">
  6382.    H1.myclass {border-width: 1; border: solid; text-align: center}
  6383.  </STYLE>
  6384. </HEAD>
  6385. <BODY>
  6386.  <H1 class="myclass"> This H1 is affected by our style </H1>
  6387.  <H1> This one is not affected by our style </H1>
  6388. </BODY>
  6389.  
  6390. Finally, to limit the scope of the style information to a single instance of
  6391. H1, set the id attribute:
  6392.  
  6393. <HEAD>
  6394.  <STYLE type="text/css">
  6395.    H1.myid {border-width: 1; border: solid; text-align: center}
  6396.  </STYLE>
  6397. </HEAD>
  6398. <BODY>
  6399.  <H1 class="myclass"> This H1 is not affected </H1>
  6400.  <H1 id="myid"> This H1 is affected by style </H1>
  6401.  <H1> This H1 is not affected </H1>
  6402. </BODY>
  6403.  
  6404. Although style information may be set for almost every HTML element, two
  6405. elements are particularly useful in that they do not impose any predefined
  6406. presentation. Since DIV and SPAN elements define structure only, when
  6407. combined with style sheets, they allow users to extend HTML indefinitely.
  6408.  
  6409. In the following example, we use the SPAN element to set the font style of
  6410. the first few words of a paragraph to small caps.
  6411.  
  6412. <HEAD>
  6413.  <STYLE type="text/css">
  6414.   SPAN.sc-ex { font-variant: small-caps }
  6415.  </STYLE>
  6416. </HEAD>
  6417. <BODY>
  6418.   <P><SPAN id="sc-ex">The first</SPAN> few words of
  6419.   this paragraph are in small-caps.
  6420. </BODY>
  6421.  
  6422. In the following example, we use DIV and the class attribute to set the text
  6423. justification for a series of paragraphs that make up the abstract section
  6424. of a scientific article. This style information could be reused for other
  6425. abstract sections by setting the class attribute elsewhere in the document.
  6426.  
  6427. <HEAD>
  6428.  <STYLE type="text/css">
  6429.    DIV.Abstract { text-align: justify }
  6430.  </STYLE>
  6431. </HEAD>
  6432. <BODY>
  6433.  <DIV class="Abstract">
  6434.    <P>The Chieftain product range is our market winner for
  6435.      the coming year. This report sets out how to position
  6436.      Chieftain against competing products.
  6437.  
  6438.    <P>Chieftain replaces the Commander range, which will
  6439.      remain on the price list until further notice.
  6440.  </DIV>
  6441. </BODY>
  6442.  
  6443. Media types
  6444.  
  6445. HTML enables authors to design documents that do not depend on a specific
  6446. presentational medium. Thus, users may browse the Web with a wide variety of
  6447. user agents: graphical displays for personal computers and workstations,
  6448. set-top boxes for televisions, specially adapted telephones and pda-based
  6449. portable devices, speech-based browsers, and braille-based tactile devices.
  6450.  
  6451. The media attribute specifies the intended output for a style rule. By
  6452. setting the media attribute, authors may allow user agents to avoid
  6453. retrieving from the network style sheets that do not apply to a given
  6454. device.
  6455.  
  6456. The following sample declarations all apply to the H1 element. When
  6457. displayed on a computer screen, all instances will be centered and blue.
  6458. When printed, all instances will be centered. We specify a different style
  6459. altogether for speech synthesizers.
  6460.  
  6461. <HEAD>
  6462.  <STYLE type="text/css" media="screen">
  6463.     H1 { color: blue}
  6464.  </STYLE>
  6465.  
  6466.  <STYLE type="text/css" media="screen, print">
  6467.    H1 { text-align: center }
  6468.  </STYLE>
  6469.  
  6470.  <STYLE type="text/acss" media="speech">
  6471.    H1 { cue-before: url(bell.aiff); cue-after: url(dong.wav)}
  6472.  </STYLE>
  6473. </HEAD>
  6474.  
  6475. Media control is particularly interesting when applied to external style
  6476. sheets since user agents can save time by retrieving from the network only
  6477. those style sheets that apply to the current device.
  6478.  
  6479. The previous example may be rewritten to refer to external style sheets
  6480. (instead of using the STYLE element) in conjunction with the media
  6481. attribute. User agents may consult the media attribute and retrieve only
  6482. those style sheets appropriate for the destination medium.
  6483.  
  6484. <HEAD>
  6485. <LINK href="doc1-screen.css" rel="stylesheet"
  6486.      type="text/css" media="screen">
  6487. <LINK href="doc1-print.css" rel="stylesheet"
  6488.      type="text/css" media="print">
  6489. <LINK href="doc1-speech.css" rel="stylesheet"
  6490.      type="text/css" media="speech">
  6491. </HEAD>
  6492.  
  6493. See the following section on external style sheets for more information.
  6494.  
  6495. External style sheets
  6496.  
  6497. Style sheets may be defined separately from an HTML document. This has the
  6498. advantage of offering the ability:
  6499.  
  6500.    * to share style sheets across a number of documents (and sites)
  6501.    * to change the style sheet without modifications to the document
  6502.  
  6503. When style sheets are enabled, users may be offered a choice of styles. Each
  6504. style is potentially a cascade of several style sheets. Some style sheets
  6505. (known as persistent) are applied independently of the user's choice (as
  6506. long as it refers to the correct media type), while others (known as
  6507. alternate) only apply to specific choices. A default style sheet is one that
  6508. applies when the page is loaded, but which the user can disable in favor of
  6509. an alternate style sheet.
  6510.  
  6511. Use the LINK element to designate an external style sheet. You must set the
  6512. following attributes:
  6513.  
  6514.    * Set the value of href to the location of the style sheet file. The
  6515.      value of href is a URL.
  6516.    * Set the value of the rel attribute to indicate whether the style sheet
  6517.      is persistent (rel="stylesheet"), default (rel="stylesheet"), or
  6518.      alternate (rel="alternate stylesheet").
  6519.    * Set the value of the title attribute when the style sheet is a default
  6520.      style sheet, i.e., when it may be activated or deactivated by the user.
  6521.  
  6522. In this example, we first specify a persistent external style sheet in the
  6523. file mystyle.css.
  6524.  
  6525. <LINK href="mystyle.css" rel="stylesheet">
  6526.  
  6527. Setting the title attribute changes the style sheet from persistent to
  6528. default; user agents should offer users the possibility of applying named
  6529. styles, based upon the title attribute.
  6530.  
  6531. <LINK href="mystyle.css" title="Compact" rel="stylesheet">
  6532.  
  6533. Adding the keyword "alternate" to the rel attribute makes this an alternate
  6534. style sheet.
  6535.  
  6536. <LINK href="mystyle.css" title="Medium" rel="alternate stylesheet">
  6537.  
  6538. All alternate styles sharing the same title will be applied when the user
  6539. (through the user agent) activates that style. Style sheets with different
  6540. titles will not be applied in this case. However, style sheets that do not
  6541. have the title attribute set will always apply (unless the user turns off
  6542. style sheets altogether).
  6543.  
  6544. User agents should provide a means for users to view and pick from the list
  6545. of alternative styles. We recommend that the value of the title attribute be
  6546. used to name each choice.
  6547.  
  6548. Cascading style sheet languages such as CSS allow style information from
  6549. several sources to be blended together. However, not all style sheet
  6550. languages support cascading. To define a cascade you simply provide a
  6551. sequence of LINK and/or STYLE elements. The style information is cascaded in
  6552. the order the elements appear in the HEAD. A cascade can include style
  6553. sheets applicable to different media. The user agent is then responsible to
  6554. filtering out those style sheets which are inapplicable to the current
  6555. situation.
  6556.  
  6557. In the following example, we define two alternate style sheets named
  6558. "compact". If the user selects the "compact" style, both external style
  6559. sheets will be applied, as well as the "common.css" style sheet, (always
  6560. applied since its title attribute is not set). If the user selects the "big
  6561. print" style, the files "bigprint.css" and "common.css" will be applied by
  6562. the user agent, and the "compact" style sheets will not.
  6563.  
  6564. <LINK rel="alternate stylesheet" title="compact" href="small-base.css">
  6565. <LINK rel="alternate stylesheet" title="compact" href="small-extras.css">
  6566. <LINK rel="alternate stylesheet" title="big print" href="bigprint.css">
  6567. <LINK rel=stylesheet href="common.css">
  6568.  
  6569. Here is an example with both LINK and STYLE elements.
  6570.  
  6571.     <LINK REL=stylesheet HREF="corporate.css">
  6572.     <LINK REL=stylesheet HREF="techreport.css">
  6573.     <STYLE TYPE="text/css">
  6574.         p.special { color: rgb(230, 100, 180) }
  6575.     </STYLE>
  6576.  
  6577. Setting the default named style
  6578.  
  6579. Use the META element to set the default named style for a document. For
  6580. example, to set the default named style in a document to "compact" (see the
  6581. preceding example), include the following line in the HEAD:
  6582.  
  6583. <META http-equiv="Default-Style" content="compact">
  6584.  
  6585. The default style can also be set with HTTP headers. The above META
  6586. declaration is equivalent to the HTTP header:
  6587.  
  6588. Default-Style: "compact"
  6589.  
  6590. If two or more META declarations or HTTP headers specify the default style,
  6591. the last one takes precedence. HTTP headers are considered as occuring
  6592. earlier than the document HEAD for this purpose. In the absence of an
  6593. explicit declaration, the default style is defined by the first LINK element
  6594. whose title has been set and whose rel attribute has the value "stylesheet".
  6595.  
  6596. Inheritance and cascading
  6597.  
  6598. When the user agent wants to render a document, it needs to find values for
  6599. style properties, e.g. the font family, font style, size, line height, text
  6600. color and so on. The exact mechanism depends on the style sheet language,
  6601. but the following description is generally applicable:
  6602.  
  6603. The cascading mechanism is used when a number of style rules all apply
  6604. directly to an element. The mechanism allows the user agent to sort the
  6605. rules by specificity, to determine which rule to apply. If no rule can be
  6606. found, the next step depends on whether the style property can be inherited
  6607. or not. Not all properties can be inherited. For these properties the style
  6608. sheet language provides default values for use when there are no explicit
  6609. rules for a particular element.
  6610.  
  6611. If the property can be inherited, the user agent examines the immediately
  6612. enclosing element to see if a rule applies to that. This process continues
  6613. until an applicable rule is found. This mechanism allows style sheets to be
  6614. specified compactly. For instance, you can specify the font family for all
  6615. elements within the BODY by a single rule that applies to the BODY element.
  6616.  
  6617. Hiding the Content of Style Elements from non-conforming User Agents
  6618.  
  6619. Some style sheet languages support syntax intended to allow authors to hide
  6620. the content of STYLE elements from non-conforming user agents.
  6621.  
  6622. This example illustrates for CSS how to comment out the content of STYLE
  6623. elements to ensure that older non-conforming user agents will not render
  6624. them as text.
  6625.  
  6626. <STYLE type="text/css">
  6627. <!--
  6628.    H1 { color: red }
  6629.    P  { color: blue}
  6630.    -->
  6631. </STYLE>
  6632.  
  6633. Specifying style through HTTP headers
  6634.  
  6635. Sometimes its convenient to configure a Web server to specify the style
  6636. sheet to be applied to a group of pages at a site. The HTTP Link header has
  6637. the same effect as a LINK element with the same attributes and values.
  6638. Multiple Link headers correspond to multiple LINK elements occurring in the
  6639. same order. Thus,
  6640.  
  6641. Link: REL=stylesheet HREF="corporate.css"
  6642.  
  6643. corresponds to:
  6644.  
  6645. <LINK rel="stylesheet" href="corporate.css">
  6646.  
  6647. You can specify several alternative styles, using multiple Link headers, and
  6648. then use the rel attribute to determine the default style.
  6649.  
  6650. In the following example, "compact" is applied by default since it omits the
  6651. "alternate" keyword for the rel attribute.
  6652.  
  6653. Link: rel="stylesheet" title="compact" href="compact.css"
  6654. Link: rel="alternate stylesheet" title="big print" href="bigprint.css"
  6655.  
  6656. This should also work when HTML documents are being by transported via
  6657. email. Some email agents can alter the ordering of [RFC822] headers. To
  6658. protect against this affecting the cascading order for style sheets
  6659. specified by Link headers, you can use header concatenation to merge several
  6660. instances of the same header field. The quote marks are only needed when the
  6661. attribute values include whitespace. Use SGML entities to reference
  6662. characters that are otherwise not permitted within HTTP or email headers, or
  6663. that are likely to be affected by transit through gateways.
  6664.  
  6665. LINK and META elements implied by HTTP headers are defined as occurring
  6666. before any explicit LINK and META elements in the document's HEAD.
  6667.  
  6668.                 Alignment, font styles, and horizontal rules
  6669.  
  6670. Contents
  6671.  
  6672.   1. Formatting
  6673.        1. Background color
  6674.        2. Alignment
  6675.        3. Floating objects
  6676.   2. Fonts
  6677.        1. Font style elements: the TT, I, B, BIG, SMALL, STRIKE, S, and U
  6678.           elements
  6679.        2. Font modifier elements: FONT and BASEFONT
  6680.   3. Rules: the HR element
  6681.  
  6682. This section of the specification discusses some HTML elements and
  6683. attributes that may be used for visual formatting. Generally speaking you
  6684. are recommended to use style sheets instead. An exception is when dealing
  6685. with user agents that either don't support style sheets or which don't
  6686. support the particular style sheet features needed. A number of HTML 4.0
  6687. elements and attributes dealing with visual presentation are deprecated and
  6688. may become obsolete in future versions of HTML.
  6689.  
  6690. Formatting
  6691.  
  6692. Background color
  6693.  
  6694. Attribute definitions
  6695.  
  6696. bgcolor = color
  6697.      Deprecated.This attribute sets the background color for the document
  6698.      body or table cells.
  6699.  
  6700. This attribute sets the background color of the canvas for the document body
  6701. (the BODY element) or for tables (the TABLE, TR, TH, and TD elements).
  6702. Additional attributes for specifying text color can be used with the BODY
  6703. element.
  6704.  
  6705. This attribute has been deprecated in favor of style sheets for specifying
  6706. background color information.
  6707.  
  6708. Alignment
  6709.  
  6710. It is possible to align block elements on the canvas (tables, images,
  6711. objects, paragraphs, etc.) with the align element. Although this attribute
  6712. may be set for many HTML elements, its range of possible values sometimes
  6713. differs from element to element.
  6714.  
  6715. Attribute definitions
  6716.  
  6717. align = left|center|right|justify
  6718.      Deprecated. This attribute specifies the horizontal alignment of its
  6719.      element with respect to the surrounding context. Possible values:
  6720.  
  6721.         o left: Left alignment/justification. This is the default value.
  6722.         o center: Center alignment/justification.
  6723.         o right: Right alignment/justification.
  6724.         o justify: Double justification.
  6725.  
  6726. DEPRECATED EXAMPLE:
  6727. This example centers a heading on the canvas.
  6728.  
  6729. <H1 align="center"> How to Carve Wood </H1>
  6730.  
  6731. Using cascading style sheets, for example, you could achieve the same effect
  6732. as follows:
  6733.  
  6734. <HEAD>
  6735. <STYLE>
  6736. H1 { text-align: center}
  6737. </STYLE>
  6738. </HEAD>
  6739. <H1> How to Carve Wood </H1>
  6740.  
  6741. Note that this would center all H1 declarations. You could reduce the scope
  6742. of the style by setting the id attribute on the element:
  6743.  
  6744. <HEAD>
  6745. <STYLE type="text/css">
  6746. H1.wood {text-align: center}
  6747. </STYLE>
  6748. </HEAD>
  6749. <H1 id="wood"> How to Carve Wood </H1>
  6750.  
  6751. Similarly, to double justify a paragraph on the canvas with HTML's align
  6752. attribute:
  6753.  
  6754. <P align="justify">...Lots of paragraph text...
  6755.  
  6756. which, in cascading style sheets, would be:
  6757.  
  6758. <HEAD>
  6759. <STYLE type="text/css">
  6760. P.mypar {text-align: justify}
  6761. </STYLE>
  6762. </HEAD>
  6763. <P id="mypar">...Lots of paragraph text...
  6764.  
  6765. To double justify a series of paragraphs, group them with the DIV element:
  6766.  
  6767. <DIV align="justify">
  6768. <P>...text in first paragraph...
  6769. <P>...text in second paragraph...
  6770. <P>...text in third paragraph...
  6771. </DIV>
  6772.  
  6773. With cascading style sheets, this would be:
  6774.  
  6775. <HEAD>
  6776. <STYLE type="text/css">
  6777. DIV.mypars {text-align: justify}
  6778. </STYLE>
  6779. </HEAD>
  6780. <DIV id="mypars">
  6781. <P>...text in first paragraph...
  6782. <P>...text in second paragraph...
  6783. <P>...text in third paragraph...
  6784. </DIV>
  6785.  
  6786. To justify the entire document with cascading style sheets:
  6787. <HEAD>
  6788. <STYLE type="text/css">
  6789. BODY {text-align: justify}
  6790. </STYLE>
  6791. </HEAD>
  6792. <BODY>
  6793. ...the body is justified...
  6794. </BODY>
  6795.  
  6796. The CENTER element is exactly equivalent to specifying the DIV element with
  6797. the align attribute set to "center". The CENTER element is deprecated.
  6798.  
  6799. Floating objects
  6800.  
  6801. Images and objects may appear directly "in-line" or may be floated to one
  6802. side of the page, temporarily altering the margins of text that may flow on
  6803. either side of the object.
  6804.  
  6805. Float an object
  6806.  
  6807. The align attribute for objects, images, frames, etc., floats the object to
  6808. either the left or right margin. Floating objects generally begin a new
  6809. line. This attribute takes the following values to float an object:
  6810.  
  6811.    * left: Floats the object to the current left margin. Subsequent text
  6812.      flows along the image's right side.
  6813.    * center: Floats the object in the center of the page. Subsequent text
  6814.      flows down the object's left side, then continues down the right side.
  6815.    * right: Floats the object to the current right margin. Subsequent text
  6816.      flows along the image's left side.
  6817.  
  6818. The following example shows how to float an IMG element to the current left
  6819. margin of the canvas.
  6820.  
  6821. <IMG align="left" src="http://foo.com/animage.gif">
  6822.  
  6823. Float text around an object
  6824.  
  6825. Another attribute, defined for the BR element, controls text flow around
  6826. floating objects.
  6827.  
  6828. Attribute definitions
  6829.  
  6830. clear = none|left|right|all
  6831.      Specifies where the next line should appear in a visual browser after
  6832.      the line break caused by this element. This attribute takes into
  6833.      account floating objects (images, tables, etc.). Possible values:
  6834.         o none: The next line will begin normally. This is the default
  6835.           value.
  6836.         o left: The next line will begin at nearest line below any floating
  6837.           objects on the left-hand margin.
  6838.         o right: The next line will begin at nearest line below any floating
  6839.           objects on the right-hand margin.
  6840.         o all: The next line will begin at nearest line below any floating
  6841.           objects on either margin.
  6842.  
  6843. Consider the following visual scenario, where text flows to the right of an
  6844. image until a line is broken by a BR:
  6845.  
  6846. *********  -------
  6847. |       |  -------
  6848. | image |  --<BR>
  6849. |       |
  6850. *********
  6851.  
  6852. If the clear attribute is set to none, the line following BR will begin
  6853. immediately below it at the right margin of the image:
  6854.  
  6855. *********  -------
  6856. |       |  -------
  6857. | image |  --<BR>
  6858. |       |  ------
  6859. *********
  6860.  
  6861. If the clear attribute is set to left or all, next line will appear as
  6862. follows:
  6863.  
  6864. *********  -------
  6865. |       |  -------
  6866. | image |  --<BR clear="left">
  6867. |       |
  6868. *********
  6869. -----------------
  6870.  
  6871. Using style sheets, you could specify that all line breaks should behave
  6872. this way for objects (images, tables, etc.) floating against the left
  6873. margin. In cascading style sheets, you could achieve this as follows:
  6874.  
  6875. <STYLE type="text/css">
  6876. BR {clear: left}
  6877. </STYLE>
  6878.  
  6879. To specify this behavior for a specific instance of the BR element, you
  6880. could combine style information and the id attribute:
  6881.  
  6882. <HEAD>
  6883. ...
  6884. <STYLE type="text/css">
  6885. BR.mybr {clear: left}
  6886. </STYLE>
  6887. </HEAD>
  6888. <BODY>
  6889. ...
  6890. *********  -------
  6891. |       |  -------
  6892. | table |  --<BR id="mybr">
  6893. |       |
  6894. *********
  6895. -----------------
  6896. ...
  6897. </BODY>
  6898.  
  6899. Fonts
  6900.  
  6901. The following HTML elements specify font information. Although they are not
  6902. all deprecated, their use is discouraged in favor of style sheets.
  6903.  
  6904. Font style elements: the TT, I, B, BIG, SMALL, STRIKE, S, and U elements
  6905.  
  6906. <!ENTITY % font
  6907.  "TT | I | B | U | S | STRIKE | BIG | SMALL">
  6908. <!ELEMENT (%font|%phrase) - - (%inline)*>
  6909. <!ATTLIST (%font|%phrase)
  6910.   %attrs;                          -- %coreattrs, %i18n, %events --
  6911.   >
  6912.  
  6913. Start tag: required, End tag: required
  6914.  
  6915. Attributes defined elsewhere
  6916.  
  6917.    * id, class (document-wide identifiers)
  6918.    * lang (language information), dir (text direction)
  6919.    * title (element titles)
  6920.    * style (inline style information)
  6921.    * onclick, ondblclick, onmousedown, onmouseup, onmouseover, onmousemove,
  6922.      onmouseout, onkeypress, onkeydown onkeyup (intrinsic events)
  6923.  
  6924. Rendering of font style elements depends on the user agent. The following is
  6925. an informative description only.
  6926.  
  6927.      TT: Renders as teletype or monospaced text.
  6928.      I: Renders as italic text style.
  6929.      B: Renders as bold text style.
  6930.      BIG: Renders text in a "large" font.
  6931.      SMALL: Renders text in a "small" font.
  6932.      STRIKE and S: Deprecated. Render strike-through style text.
  6933.      U: Deprecated. Renders underlined text.
  6934.  
  6935. The following sentence shows several types of text:
  6936.  
  6937. <b>bold</b>,
  6938. <i>italic</i>, <b><i>bold italic</i></b>, <tt>teletype text</tt>, and
  6939. <big>big</big> and <small>small</small> text.
  6940.  
  6941. Your browser renders the words as follows:
  6942.  
  6943.      bold, italic, bold italic, teletype text, and big and small text.
  6944.  
  6945. It is possible to achieve a much richer variety of font effects using style
  6946. sheets. To specify blue, italic text in a paragraph with cascading style
  6947. sheets:
  6948.  
  6949. <HEAD>
  6950. <STYLE>
  6951. P.mypar {font-style: italic; color: blue}
  6952. </STYLE>
  6953. </HEAD>
  6954. <P id="mypar">...Lots of blue italic text...
  6955.  
  6956. Font style elements may be nested and they must be properly nested.
  6957. Rendering of nested font style elements depends on the user agent.
  6958.  
  6959. Font modifier elements: FONT and BASEFONT
  6960.  
  6961. FONT and BASEFONT are deprecated.
  6962.  
  6963. <!ELEMENT FONT - - (%inline)*   -- local change to font -->
  6964. <!ATTLIST FONT
  6965.   size        CDATA      #IMPLIED  -- [+]nn e.g. size="+1", size=4 --
  6966.   color       CDATA      #IMPLIED  -- #RRGGBB in hex, e.g. red: "#FF0000" --
  6967.   face        CDATA      #IMPLIED  -- comma separated list of font names --
  6968.   >
  6969.  
  6970. Start tag: required, End tag: required
  6971.  
  6972. <!ELEMENT BASEFONT - O EMPTY>
  6973. <!ATTLIST BASEFONT
  6974.   size        CDATA      #REQUIRED -- base font size for FONT elements --
  6975.   color       CDATA      #IMPLIED  -- #RRGGBB in hex, e.g. red: "#FF0000" --
  6976.   face        CDATA      #IMPLIED  -- comma separated list of font names --
  6977.   >
  6978.  
  6979. Start tag: required, End tag: forbidden
  6980.  
  6981. Attribute definitions
  6982.  
  6983. size = cdata
  6984.      Deprecated. This attribute sets the size of the font. Possible values:
  6985.         o An integer between 1 and 7. This sets the font to some fixed size,
  6986.           whose rendering depends on the user agent. Not all user agents may
  6987.           render all seven sizes.
  6988.         o A relative increase in font size. The value "+1" means one size
  6989.           larger. The value "-3" means three sizes smaller. All sizes belong
  6990.           to the scale of 1 to 7.
  6991. color = color
  6992.      Deprecated. This attribute sets the text color.
  6993. face = cdata-list
  6994.      Deprecated. This attribute defines a comma-separated list of font names
  6995.      the user agent should search for in order of preference.
  6996.  
  6997. The FONT element changes the font size and color for text in its contents.
  6998.  
  6999. The BASEFONT element sets the base font size (using the size attribute).
  7000. Font size changes achieved with FONT are relative to the base font size set
  7001. by BASEFONT. If BASEFONT is not used, the default base font size is 4.
  7002.  
  7003. DEPRECATED EXAMPLE:
  7004. The following example will show the difference between the seven font sizes
  7005. available with FONT:
  7006.  
  7007. <P><font size=1>size=1</font>
  7008. <font size=2>size=2</font>
  7009. <font size=3>size=3</font>
  7010. <font size=4>size=4</font>
  7011. <font size=5>size=5</font>
  7012. <font size=6>size=6</font>
  7013. <font size=7>size=7</font>
  7014.  
  7015. Your user agent renders this as follows:
  7016.  
  7017. size=1 size=2 size=3 size=4 size=5 size=6 size=7
  7018.  
  7019. The following shows the effect of relative font sizes using a base font size
  7020. of 3:
  7021.  
  7022. size=-4 size=-3 size=-2 size=-1 size=+1 size=+2 size=+3 size=+4
  7023.  
  7024. The same thing with a base font size of 6:
  7025.  
  7026. size=-4 size=-3 size=-2 size=-1 size=+1 size=+2 size=+3 size=+4
  7027.  
  7028. The base font size does not apply to headings, except where these are
  7029. modified using the FONT element with a relative font size change.
  7030.  
  7031. Rules: the HR element
  7032.  
  7033. <!ELEMENT HR - O EMPTY>
  7034. <!ATTLIST HR
  7035.   %coreattrs;                      -- id, class, style, title --
  7036.   %events;
  7037.   align (left|right|center) #IMPLIED
  7038.   noshade     (noshade)  #IMPLIED
  7039.   size        %Pixels    #IMPLIED
  7040.   width       %Length    #IMPLIED
  7041.   >
  7042.  
  7043. Start tag: required, End tag: forbidden
  7044.  
  7045. Attribute definitions
  7046.  
  7047. noshade
  7048.      When set, this boolean attribute requests that the user agent render
  7049.      the rule in a solid color rather than as the traditional two-color
  7050.      "groove".
  7051. size = length
  7052.      Deprecated. This attribute specifies the height of the rule. The
  7053.      default value for this attribute depends on the user agent.
  7054. width = length
  7055.      Deprecated. This attribute specifies the width of the rule. The default
  7056.      width is 100%, i.e., the rule extends across the entire canvas.
  7057.  
  7058. Attributes defined elsewhere
  7059.  
  7060.    * align (alignment)
  7061.    * onclick, ondblclick, onmousedown, onmouseup, onmouseover, onmousemove,
  7062.      onmouseout, onkeypress, onkeydown, onkeyup (intrinsic events)
  7063.  
  7064. The HR element causes a horizontal rule to be rendered by visual user
  7065. agents.
  7066.  
  7067. The amount of vertical space inserted between a rule and the content that
  7068. surrounds it depends on the user agent.
  7069.  
  7070. DEPRECATED EXAMPLE:
  7071. This example centers the rules, sizing them to half the available width
  7072. between the margins. The top rule has the default thickness while the bottom
  7073. two are set to 5 pixels. The bottom rule should be rendered in a solid color
  7074. without shading:
  7075.  
  7076. <HR width="50%" align="center">
  7077. <HR size="5" width="50%" align="center">
  7078. <HR noshade size="5" width="50%" align="center">
  7079.  
  7080. Your browser renders these rules as follows:
  7081.                    --------------------------------------
  7082.                    --------------------------------------
  7083.                    --------------------------------------
  7084.  
  7085.                                    Frames
  7086.  
  7087. Contents
  7088.  
  7089.   1. Layout of frames
  7090.        1. The FRAMESET element
  7091.        2. The FRAME element
  7092.   2. Specifying target frame information
  7093.        1. Setting the default target for links
  7094.        2. Target semantics
  7095.        3. Target names
  7096.   3. Alternate content
  7097.        1. The NOFRAMES element
  7098.   4. Inline frames: the IFRAME element
  7099.  
  7100. HTML frames allow authors to present documents in multiple views. Views may
  7101. be independent windows or subwindows. Multiple views offer designers a way
  7102. to keep certain information visible, while other views are scrolled or
  7103. replaced. For instance, to use three frames: one for a static banner, one
  7104. for a navigation menu, and one for a main view that can be scrolled though
  7105. or replaced by clicking on an item in the navigation frame.
  7106.  
  7107. Layout of frames
  7108.  
  7109. An HTML document with frames has a slightly different makeup than an HTML
  7110. document without frames. A standard document has one HEAD section and one
  7111. BODY. A document with frames has a HEAD, a FRAMESET, and an optional BODY.
  7112.  
  7113. The FRAMESET section of a document specifies the layout of views in the main
  7114. user agent window.
  7115.  
  7116. The BODY section that follows the FRAMESET declaration provides alternate
  7117. content for user agents that do not support frames or are configured not to
  7118. display frames. We discuss alternate content in more detail below.
  7119.  
  7120. Elements that might normally be placed in the BODY element must not appear
  7121. before the first FRAMESETelement or the FRAMESET will be ignored.
  7122.  
  7123. The FRAMESET element
  7124.  
  7125. <!ELEMENT FRAMESET - - ((FRAMESET|FRAME)+ & NOFRAMES?)>
  7126. <!ATTLIST FRAMESET
  7127.   -- absolute pixel values, percentages or relative scales. --
  7128.   rows        CDATA      #IMPLIED  -- if not given, default is 1 row --
  7129.   cols        CDATA      #IMPLIED  -- if not given, default is 1 column --
  7130.   onload      %Script    #IMPLIED  -- all the frames have been loaded  --
  7131.   onunload    %Script    #IMPLIED  -- all the frames have been removed --
  7132.   >
  7133.  
  7134. Start tag: required, End tag: required
  7135.  
  7136. Attribute definitions
  7137.  
  7138. rows = length-list
  7139.      This attribute specifies the layout of horizontal frames. It is a
  7140.      comma-separated list of lengths. If not specified, the default value is
  7141.      100%.
  7142. cols = length-list
  7143.      This attribute specifies the layout of vertical frames. It is a
  7144.      comma-separated list of lengths. If not specified, the default value is
  7145.      100%.
  7146.  
  7147. Attributes defined elsewhere
  7148.  
  7149.    * onload, onunload (intrinsic events)
  7150.  
  7151. The FRAMESET element specifies the layout of the main user window in terms
  7152. of rectangular subspaces.
  7153.  
  7154. Rows and columns
  7155.  
  7156. Setting the rows attribute defines the number of horizontal subspaces.
  7157. Setting the cols attribute defines the number of vertical subspaces. Both
  7158. attributes may be set simultaneously to create a grid.
  7159.  
  7160. If the rows attribute is not set, each column extends the entire length of
  7161. the page. If the cols attribute is not set, each row extends the entire
  7162. width of the page. If neither attribute is set, the frame takes up exactly
  7163. the size of the page.
  7164.  
  7165. These two attributes have values that are comma-separated lists of lengths.
  7166. A length may be absolute (given as a number of pixels or a percentage of the
  7167. screen) or a relative length, indicated by the form "i*", where "i" is an
  7168. integer. When allotting space to rows and columns, user agents allot
  7169. absolute lengths first, then divide up remaining space among relative length
  7170. rows or columns. The value "*" is equivalent to "1*".
  7171.  
  7172. Views are created left-to-right for columns and top-to-bottom for rows. When
  7173. both attributes are specified, views are created left-to-right in the top
  7174. row, left-to-right in the second row, etc.
  7175.  
  7176. The first example divides the screen vertically in two (i.e., creates a top
  7177. half and a bottom half).
  7178.  
  7179. <FRAMESET rows="50%, 50%">
  7180. ...the rest of the definition...
  7181. </FRAMESET>
  7182.  
  7183. The next example creates three columns: the second has a fixed width of 250
  7184. pixels (useful, for example, to hold an image with a known size). The first
  7185. receives 25% of the remaining space and the third 75% of the remaining
  7186. space.
  7187.  
  7188. <FRAMESET cols="1*,250,3*">
  7189. ...the rest of the definition...
  7190. </FRAMESET>
  7191.  
  7192. The next example creates a 2x3 grid of subspaces.
  7193.  
  7194. <FRAMESET rows="30%,70%" cols="33%,34%,33%">
  7195. ...the rest of the definition...
  7196. </FRAMESET>
  7197.  
  7198. For the next example, suppose the browser window is currently 1000 pixels
  7199. high. The first view is allotted 30% of the total height (300 pixels). The
  7200. second view is specified to be exactly 400 pixels high. This leaves 300
  7201. pixels to be divided between the other two frames. The fourth frame's height
  7202. is specified as "2*", so it is twice as high as the third frame, whose
  7203. height is only "*" (1*). Therefore the third frame will be 100 pixels high
  7204. and the fourth will be 200 pixels high.
  7205.  
  7206. <FRAMESET rows="30%,400,*,2*">
  7207. ...the rest of the definition...
  7208. </FRAMESET>
  7209.  
  7210. Absolute lengths that do not sum to 100% of the real available space should
  7211. be adjusted by the user agent. When underspecified, remaining space should
  7212. be allotted proportionally to each view. When overspecified, each view
  7213. should be reduced according to its specified proportion of the total space.
  7214.  
  7215. Nested frame sets
  7216.  
  7217. Framesets may be nested to any level.
  7218.  
  7219. In the following example, the outer FRAMESET divides the available space
  7220. into three equal columns. The inner FRAMESET then divides the second area
  7221. into two rows of unequal height.
  7222.  
  7223. <FRAMESET cols="33%, 33%, 34%">
  7224.      ...contents of first frame...
  7225.      <FRAMESET rows="40%, 50%">
  7226.         ...contents of second frame, first row...
  7227.         ...contents of second frame, second row...
  7228.      </FRAMESET>
  7229.      ...contents of third frame...
  7230. </FRAMESET>
  7231.  
  7232. The FRAME element
  7233.  
  7234. <!-- reserved frame names start with "_" otherwise starts with letter -->
  7235. <!ELEMENT FRAME - O EMPTY>
  7236. <!ATTLIST FRAME
  7237.   name        CDATA      #IMPLIED  -- name of frame for targetting --
  7238.   src         %URL       #IMPLIED  -- source of frame content --
  7239.   frameborder (1|0)      1         -- request frame borders? --
  7240.   marginwidth %Pixels    #IMPLIED  -- margin widths in pixels --
  7241.   marginheight %Pixels   #IMPLIED  -- margin height in pixels --
  7242.   noresize    (noresize) #IMPLIED  -- allow users to resize frames? --
  7243.   scrolling (yes|no|auto) auto     -- scrollbar or none --
  7244.   >
  7245.  
  7246. Start tag: required, End tag: forbidden
  7247.  
  7248. Attribute definitions
  7249.  
  7250. name = cdata
  7251.      This attribute assigns a name to the current frame. This name may be
  7252.      the target of subsequent links.
  7253. src = url
  7254.      This attribute specifies the location of the initial document to be
  7255.      contained in the frame.
  7256. noresize
  7257.      When present, this boolean attribute tells the user agent that the
  7258.      frame window must not be resizeable.
  7259. scrolling = auto|yes|no
  7260.      This attribute specifies scroll information for the frame window.
  7261.      Possible values
  7262.         o auto: This value tells the user agent to provide scrolling devices
  7263.           for the frame window when necessary. This is the default value.
  7264.         o yes: This value tells the user agent to always provide scrolling
  7265.           devices for the frame window.
  7266.         o no: This value tells the user agent not to provide scrolling
  7267.           devices for the frame window.
  7268. frameborder = 1|0
  7269.      This attribute provides the user agent with information about the frame
  7270.      border. Possible values:
  7271.         o 1: This value tells the user agent to draw a separator between
  7272.           this frame and every adjoining frame. This is the default value.
  7273.         o 0: This value tells the user agent not to draw a separator between
  7274.           this frame and every adjoining frame. Note that separators may be
  7275.           drawn next to this frame nonetheless if specified by other frames.
  7276. marginwidth = length
  7277.      This attribute specifies the amount of space to be left between the
  7278.      frame's contents in its left and right margins. The value must be
  7279.      greater than one pixel. The default value depends on the user agent.
  7280. marginheight = length
  7281.      This attribute specifies the amount of space to be left between the
  7282.      frame's contents in its top and bottom margins. The value must be
  7283.      greater than one pixel. The default value depends on the uesr agent.
  7284.  
  7285. Attributes defined elsewhere
  7286.  
  7287.    * target (target frame information)
  7288.  
  7289. The FRAME element defines the contents and appearance of a single view.
  7290.  
  7291. Setting the initial document in a frame
  7292.  
  7293. The src attribute specifies the initial document the frame will contain. It
  7294. is not possible for the contents of a frame to be in the same document as
  7295. the frame's definition.
  7296.  
  7297. The following example example HTML document:
  7298.  
  7299. <HTML>
  7300. <FRAMESET cols="33%,33%,33%">
  7301.   <FRAMESET rows="*,200">
  7302.       <FRAME src="contents_of_frame1.html">
  7303.       <FRAME src="contents_of_frame2.gif">
  7304.   </FRAMESET>
  7305.   <FRAME src="contents_of_frame3.html">
  7306.   <FRAME src="contents_of_frame4.html">
  7307. </FRAMESET>
  7308. </HTML>
  7309.  
  7310. will create a frame layout something like this:
  7311.  
  7312. --------------------------------------------
  7313. |Frame 1     |Frame 3       |Frame 4       |
  7314. |            |              |              |
  7315. |            |              |              |
  7316. |            |              |              |
  7317. |            |              |              |
  7318. |            |              |              |
  7319. |            |              |              |
  7320. |            |              |              |
  7321. -------------|              |              |
  7322. |Frame 2     |              |              |
  7323. |            |              |              |
  7324. |            |              |              |
  7325. --------------------------------------------
  7326.  
  7327. and cause the user agent to load each file into a separate view.
  7328.  
  7329. ILLEGAL EXAMPLE:
  7330. The following frameset definition is not legal HTML since the contents of
  7331. the second frame are in the same document as the frameset.
  7332.  
  7333. <HTML>
  7334. <FRAMESET cols="50%,50%">
  7335.   <FRAME src="contents_of_frame1.html">
  7336.   <FRAME src="#anchor_in_same_document">
  7337. </FRAMESET>
  7338. <BODY>
  7339. ...some text...
  7340. <H2><A name="anchor_in_same_document">Important section</A></H2>
  7341. ...some text...
  7342. </BODY>
  7343. </HTML>
  7344.  
  7345. Decorating a frame
  7346.  
  7347. The following example illustrates the usage of the decorative FRAME
  7348. attributes. We specify that frame 1 will allow no scroll bars. Frame 2 will
  7349. leave white space around its contents (initially, an image file) and the
  7350. frame will not be resizeable. No border will be drawn between frames 3 and
  7351. 4. Borders will be drawn (by default) between frames 1, 2, and 3.
  7352.  
  7353. <HTML>
  7354. <FRAMESET cols="33%,33%,33%">
  7355.   <FRAMESET rows="*,200">
  7356.       <FRAME src="contents_of_frame1.html" scrolling="no">
  7357.       <FRAME src="contents_of_frame2.gif"
  7358.                 marginwidth="10" marginheight="15"
  7359.                 noresize>
  7360.   </FRAMESET>
  7361.   <FRAME src="contents_of_frame3.html" border="0">
  7362.   <FRAME src="contents_of_frame4.html" border="0">
  7363. </FRAMESET>
  7364. </HTML>
  7365.  
  7366. Specifying target frame information
  7367.  
  7368. Attribute definitions
  7369.  
  7370. target = cdata
  7371.      This attribute specifies the name of a target frame where a document is
  7372.      to be opened.
  7373.  
  7374. By assigning a name to a frame via the name attribute, authors can refer to
  7375. it as the "target" of links defined by other elements. The target attribute
  7376. may be set for elements that create links (A, LINK), image maps (AREA), and
  7377. forms (FORM).
  7378.  
  7379. This example illustrates how targets allow the dynamic modification of a
  7380. frame's contents. First we define a frameset in the document frameset.html,
  7381. shown here:
  7382.  
  7383. <HTML>
  7384. <FRAMESET rows="50%,50%">
  7385.    <FRAME name="fixed" src="init_fixed.html">
  7386.    <FRAME name="dynamic" src="init_dynamic.html">
  7387. </FRAMESET>
  7388. </HTML>
  7389.  
  7390. Then, in init_dynamic.html, we link to the frame named "dynamic".
  7391.  
  7392. <HTML>
  7393. <BODY>
  7394. ...beginning of the document...
  7395. Now you may advance to
  7396.     <A href="slide2.html" target="dynamic">slide 2.</A>
  7397. ...more document...
  7398. You're doing great. Now on to
  7399.     <A href="slide3.html" target="dynamic">slide 3.</A>
  7400. </BODY>
  7401. </HTML>
  7402.  
  7403. Activating either link opens a new document in the frame named "dynamic"
  7404. while the other frame, "fixed", maintains its initial contents.
  7405.  
  7406. Note: Once a frame's content is changed dynamically, the original frameset
  7407. definition no longer reflects the true contents of each frame; the frameset
  7408. definition does not change.
  7409.  
  7410. The is currently no way to encode the entire state of a frameset in a URL.
  7411. Therefore, many user agents do not allow users to assign a bookmark to a
  7412. frameset.
  7413.  
  7414. Framesets may make navigation forward and backward through your user agent's
  7415. history more difficult for users.
  7416.  
  7417. Setting the default target for links
  7418.  
  7419. When many links in the same document designate the same target, it is
  7420. possible to specify the target once and dispense with the target attributes
  7421. in each element. This is done by setting the target attribute of the BASE
  7422. element.
  7423.  
  7424. We return to the previous example, this time factorizing the target
  7425. information by defining it in the BASE element and removing it from the A
  7426. elements.
  7427.  
  7428. <HTML>
  7429. <HEAD>
  7430. <BASE target="dynamic">
  7431. </HEAD>
  7432. <BODY>
  7433. ...beginning of the document...
  7434. Now you may advance to <A href="slide2.html">slide 2.</A>
  7435. ...more document...
  7436. You're doing great. Now on to
  7437.        <A href="slide3.html">slide 3.</A>
  7438. </BODY>
  7439. </HTML>
  7440.  
  7441. Target semantics
  7442.  
  7443. There are several methods for making a frame the target of a link. Here we
  7444. define their interaction.
  7445.  
  7446.   1. If an element has its target attribute set to a known frame, when the
  7447.      element is activated, the document designated by the element will be
  7448.      loaded into the target frame.
  7449.   2. If an element does not have the target attribute set but the BASE
  7450.      element does, the BASE element's target determines the frame, and
  7451.      loading obeys the same semantics as 1.
  7452.   3. If neither the element nor the BASE element refer to a target, the
  7453.      document designated by the element will be loaded into the frame
  7454.      containing the element.
  7455.   4. If any target refers to an unknown frame F, the user agent will create
  7456.      a new window and frame, assign the name F to the frame, and load the
  7457.      document designated by the element in the new frame.
  7458.  
  7459. User agents may provide users with a mechanism to override the target
  7460. attribute.
  7461.  
  7462. Target names
  7463.  
  7464. Except for the reserved names listed below, target names must begin with an
  7465. alphabetic character (a-zA-Z). User agents should ignore all other target
  7466. names.
  7467.  
  7468. The following target names are reserved and have special meanings.
  7469.  
  7470. _blank
  7471.      The user agent should load the designated document in a new, unnamed
  7472.      window.
  7473. _self
  7474.      The user agent should load the document in the same frame as the
  7475.      element that refers to this target.
  7476. _parent
  7477.      The user agent should load the document into the immediate FRAMESET
  7478.      parent of the current frame. This value is equivalent to _self if the
  7479.      current frame has no parent.
  7480. _top
  7481.      The user agent should load the document into the full, original window
  7482.      (thus cancelling all other frames). This value is equivalent to _self
  7483.      if the current frame has no parent.
  7484.  
  7485. Alternate content
  7486.  
  7487. We strongly recommend providing alternate versions of content for those user
  7488. agents that do not support frames or are configured not to display frames.
  7489.  
  7490. User agents that do not support frames must display the BODY section that
  7491. follows the outermost FRAMESET of a document. User agents that do support
  7492. frames must ignore this BODY unless currently configured not to display
  7493. frames.
  7494.  
  7495. The NOFRAMES element
  7496.  
  7497. <!--
  7498.  The following is quite complicated because of the mixed
  7499.  content model. However it's actually only meant to contain
  7500.  either BODY or %block.
  7501.  -->
  7502. <!ELEMENT NOFRAMES - -
  7503.  (#PCDATA,((BODY,#PCDATA)|
  7504.            (((%blocklevel)|%font|%phrase|%special|%formctrl),%block)))>
  7505.  
  7506. Start tag: required, End tag: required
  7507.  
  7508. The NOFRAMES element specifies content that should be displayed only when
  7509. frames are not being displayed. User agents that support frames must only
  7510. display the contents of a NOFRAMES declaration when configured not to
  7511. display frames. User agents that do not support frames must display the
  7512. contents of NOFRAMES in any case.
  7513.  
  7514. Suppose we have a sample frameset defined in "top.html" that designates a
  7515. document ("main.html") and a special table of contents
  7516. ("table_of_contents.html") related to the main document. Here is "top.html":
  7517.  
  7518. <HTML>
  7519. <FRAMESET cols="50%, 50%">
  7520.    <FRAME src="main.html">
  7521.    <FRAME src="table_of_contents.html">
  7522. </FRAMESET>
  7523. </HTML>
  7524.  
  7525. What happens when the user reads "top.html" and the user agent is not
  7526. displaying frames? The user won't see anything since we have not specified
  7527. alternate content in the BODY of "top.html". If we insert
  7528. "table_of_contents.html" and "main.html" directly in the BODY, we solve the
  7529. problem of associating the two documents, but we may cause user agents that
  7530. support frames to retrieve the same data twice: one copy associated with the
  7531. frameset and one copy inserted in the BODY.
  7532.  
  7533. It is more economical to include the table of contents at the top of
  7534. "main.html" within a NOFRAMES element:
  7535.  
  7536. <!-- This is main.html -->
  7537. <HTML>
  7538. <BODY>
  7539. <NOFRAMES>
  7540. ...the table of contents here...
  7541. </NOFRAMES>
  7542. ...the rest of the document...
  7543. </BODY>
  7544. </HTML>
  7545.  
  7546. and to link to "main.html" from "top.html" for the case when frames are not
  7547. displayed:
  7548.  
  7549. <!-- This is top.html -->
  7550. <HTML>
  7551. <FRAMESET cols="50%, 50%">
  7552.    <FRAME src="main.html">
  7553.    <FRAME src="table_of_contents.html">
  7554. </FRAMESET>
  7555. <BODY>
  7556. Click <A href="main.html">here</A> for a non-frames version.
  7557. </BODY>
  7558. </HTML>
  7559.  
  7560. Inline frames: the IFRAME element
  7561.  
  7562. <!ELEMENT IFRAME - - %block>
  7563. <!ATTLIST IFRAME
  7564.   name        CDATA      #IMPLIED  -- name of frame for targetting --
  7565.   src         %URL       #IMPLIED  -- source of frame content --
  7566.   frameborder (1|0)      1         -- request frame borders? --
  7567.   marginwidth %Pixels    #IMPLIED  -- margin widths in pixels --
  7568.   marginheight %Pixels   #IMPLIED  -- margin height in pixels --
  7569.   scrolling (yes|no|auto) auto     -- scrollbar or none --
  7570.   align       %IAlign    #IMPLIED  -- vertical or horizontal alignment --
  7571.   height      %Length    #IMPLIED  -- suggested height --
  7572.   width       %Length    #IMPLIED  -- suggested width --
  7573.   >
  7574.  
  7575. Start tag: required, End tag: required
  7576.  
  7577. Attribute definitions
  7578.  
  7579. width = length
  7580.      The width of the inline frame.
  7581. height = length
  7582.      The height of the inline frame.
  7583.  
  7584.    * name, src, frameborder, marginwidth, marginheight, scrolling (frame
  7585.      controls and decoration)
  7586.    * target (target frame information)
  7587.    * align (alignment)
  7588.  
  7589. The IFRAME element allows authors to insert a frame within a block of text.
  7590. Inserting an inline frame within a section of text is much like inserting an
  7591. object via the OBJECT element: they both allow you to insert an HTML
  7592. document in the middle of another, they may both be aligned with surrounding
  7593. text, etc.
  7594.  
  7595. The information to be inserted inline is designated by the src attribute of
  7596. this element. The contents of the IFRAME element, on the other hand, should
  7597. only be rendered by user agents that do not support frames or are configured
  7598. not to display frames.
  7599.  
  7600. For user agents that support frames, the following example will place an
  7601. inline frame surrounded by a border in the middle of the text.
  7602.  
  7603.   <IFRAME src="foo.html" width="400" height="500"
  7604.              scrolling="auto" frameborder="1">
  7605.   [Your user agent does not support frames or is currently configured
  7606.   not to display frames. Click to retrieve
  7607.   <A href="foo.html">the related document.</A>]
  7608.   </IFRAME>
  7609.  
  7610. Inline frames may not be resized (and thus, they do not take the noresize
  7611. attribute).
  7612.  
  7613. Note: HTML documents may also be embedded in other HTML documents with the
  7614. OBJECT element. See the section on including files in HTML documents for
  7615. details.
  7616.  
  7617.                          Interactive HTML documents
  7618.  
  7619. Contents
  7620.  
  7621.   1. Forms
  7622.        1. The FORM element
  7623.        2. Controls
  7624.             1. The INPUT element
  7625.             2. The BUTTON element
  7626.             3. The SELECT and OPTION elements
  7627.             4. The TEXTAREA element
  7628.             5. The LABEL element
  7629.             6. The FIELDSET and LEGEND elements
  7630.        3. Giving focus to an element
  7631.             1. Tabbing navigation
  7632.             2. Access keys
  7633.        4. Disabled and read-only elements
  7634.             1. Disabled elements
  7635.             2. Read-only elements
  7636.        5. Form submission
  7637.             1. Which element values are submitted
  7638.   2. Scripts
  7639.        1. Designing documents for user agents that support scripting
  7640.             1. The SCRIPT element
  7641.             2. Specifying the scripting language
  7642.             3. Syntax of script content
  7643.             4. Intrinsic events
  7644.             5. Dynamic modification of documents
  7645.        2. Designing documents for user agents that don't support scripting
  7646.             1. The NOSCRIPT element
  7647.             2. Commenting out scripts
  7648.  
  7649.                                    Forms
  7650.  
  7651. Contents
  7652.  
  7653.   1. The FORM element
  7654.   2. Controls
  7655.        1. The INPUT element
  7656.        2. The BUTTON element
  7657.        3. The SELECT and OPTION elements
  7658.        4. The TEXTAREA element
  7659.        5. The LABEL element
  7660.        6. The FIELDSET and LEGEND elements
  7661.   3. Giving focus to an element
  7662.        1. Tabbing navigation
  7663.        2. Access keys
  7664.   4. Disabled and read-only elements
  7665.        1. Disabled elements
  7666.        2. Read-only elements
  7667.   5. Form submission
  7668.        1. Which element values are submitted
  7669.  
  7670. An HTML form is a section of a document containing normal content, markup,
  7671. and special elements called controls. Controls respond to and accept user
  7672. input. Users generally "complete" forms by entering text, selecting menu
  7673. items, etc., and then submitting the form for processing. Submitted forms
  7674. may either be mailed to another user or fed to a program for treatment.
  7675.  
  7676. Controls may be check boxes, radio buttons, labels, menus, etc. Each control
  7677. may be assigned a name. When the form is submitted, some controls (depending
  7678. on their state) have their name and current value submitted along with the
  7679. form. The nature of the value submitted depends on the control (e.g., the
  7680. value of a text box is the input text).
  7681.  
  7682. Note: This specification includes more detailed information about forms in
  7683. sections on form display issues. Further information on encoding form
  7684. contents is expected to be added in later revisions to this draft.
  7685.  
  7686. The FORM element
  7687.  
  7688. <!ELEMENT FORM - - %block -(FORM)>
  7689. <!ATTLIST FORM
  7690.   %attrs;                          -- %coreattrs, %i18n, %events --
  7691.   action      %URL       #REQUIRED -- server-side form handler --
  7692.   method      (GET|POST) GET       -- HTTP method used to submit the form --
  7693.   enctype     %ContentType; "application/x-www-form-urlencoded"
  7694.   onsubmit    %Script    #IMPLIED  -- the form was submitted --
  7695.   onreset     %Script    #IMPLIED  -- the form was reset --
  7696.   target      CDATA      #IMPLIED  -- where to render result --
  7697.   accept-charset CDATA   #IMPLIED  -- list of supported charsets --
  7698.   >
  7699.  
  7700. Start tag: required, End tag: required
  7701.  
  7702. Attribute definitions
  7703.  
  7704. action = url
  7705.      This attribute specifies a program for handling the submitted form. It
  7706.      may be an HTTP URL (to submit the form to a program) or a MAILTO URL
  7707.      (to email the form).
  7708. method = get|post
  7709.      This attribute specifies which HTTP method will be used to submit
  7710.      name/value pairs to the form handler. The Possible values:
  7711.         o post: Use the HTTP POST method. The POST method includes
  7712.           name/value pairs in the body of the form and not in the URL
  7713.           specified by the action attribute.
  7714.         o get:Deprecated. Use the HTTP GET method. The GET method appends
  7715.           name/value pairs to the URL specified by action and sends this new
  7716.           URL to the server. This is the default value for backwards
  7717.           compatibility. This value has been deprecated for reasons of
  7718.           internationalization.
  7719. enctype = cdata
  7720.      This attribute specifies the Internet Media Type (see [MIMETYPES]) used
  7721.      to submit the form to the server (when the value of method is "post").
  7722.      The default value for this attribute is
  7723.      "application/x-www-form-urlencoded". The value "multipart/form-data"
  7724.      should be used when the returned document includes submitted files.
  7725. accept-charset = cdata
  7726.      This attribute specifies the list of character encodings for input data
  7727.      that must be accepted by the server processing this form. The value is
  7728.      a space and/or comma-delimited list of "charsets" as defined in
  7729.      [RFC2045]. The server must interpret this list as an exclusive-or list,
  7730.      i.e., the server must be able to accept any single character encoding
  7731.      per entity received.
  7732.  
  7733.      The default value for this attribute is the reserved string "UNKNOWN".
  7734.      User agents may interpret this value as the character encoding that was
  7735.      used to transmit the document containing this FORM element.
  7736. accept = cdata
  7737.      This attribute specifies a comma-separated list of MIME types that a
  7738.      server processing this form will handle correctly. User agents may use
  7739.      this information to filter out nonconformant files when prompting a
  7740.      user to select files to be sent to the server (cf. the INPUT element
  7741.      when type="file").
  7742.  
  7743. Attributes defined elsewhere
  7744.  
  7745.    * id, class (document-wide identifiers)
  7746.    * lang (language information), dir (text direction)
  7747.    * style (inline style information)
  7748.    * title (element titles)
  7749.    * target (target frame information)
  7750.    * onsubmit, onreset, (intrinsic events)
  7751.    * onclick, ondblclick, onmousedown, onmouseup, onmouseover, onmousemove,
  7752.      onmouseout, onkeypress, onkeydown, onkeyup (intrinsic events)
  7753.  
  7754. The FORM element acts as a container for controls. It specifies:
  7755.  
  7756.    * The layout of the form (given by the contents of the element).
  7757.    * The program that will handle the completed and submitted form (the
  7758.      action attribute). The receiving program must be able to parse
  7759.      name/value pairs in order to make use of them.
  7760.    * The method by which user data will be sent to the server (the method
  7761.      attribute).
  7762.    * A character encoding that must accepted by the server in order to
  7763.      handle this form (the accept-charset attribute). User agents may advise
  7764.      the user of the value of the accept-charset attribute and/or to
  7765.      restrict the user's ability to enter unrecognized characters.
  7766.  
  7767. A form can contain text and markup (paragraphs, lists, etc.) as well as the
  7768. controls listed below.
  7769.  
  7770. The scope of the name attribute for any controls within a FORM element is
  7771. the FORM element.
  7772.  
  7773. The following example specifies that the submitted form will be processed by
  7774. the "adduser" program. The form will be sent to the program using the HTTP
  7775. POST method.
  7776.  
  7777.  <FORM action="http://somesite.com/prog/adduser" method="post">
  7778.  ...form contents...
  7779.  </FORM>
  7780.  
  7781. The following example shows how to send a submitted form to an email
  7782. address.
  7783.  
  7784.  <FORM action="mailto:Kligor.T@gee.whiz.com" method="post">
  7785.  ...form contents...
  7786.  </FORM>
  7787.  
  7788. Controls
  7789.  
  7790. The following control elements generally appear within a FORM element
  7791. declaration. However, these elements may also appear outside of a FORM
  7792. element declaration when they are used to build user interfaces. This is
  7793. discussed later in this specification, in the section on intrinsic events.
  7794.  
  7795. Control labels
  7796. Some form controls automatically have labels associated with them (press
  7797. buttons created by INPUT and BUTTON) while most do not (text fields created
  7798. by INPUT and TEXTAREA, checkboxes and radio buttons created by INPUT, and
  7799. menus created by SELECT).
  7800.  
  7801. For those controls that have implicit labels, user agents should take the
  7802. value of the value attribute for the label string.
  7803.  
  7804. For those controls without implicit labels, authors must provide labels
  7805. before or after the control element's definition. This is illustrated in the
  7806. examples below.
  7807.  
  7808. The INPUT element
  7809.  
  7810. <!ENTITY % InputType
  7811.   "(TEXT | PASSWORD | CHECKBOX |
  7812.     RADIO | SUBMIT | RESET |
  7813.     FILE | HIDDEN | IMAGE | BUTTON)"
  7814.    >
  7815.  
  7816. <!-- HSPACE and VSPACE missing due to lack of widespread support -->
  7817. <!ELEMENT INPUT - O EMPTY>
  7818. <!ATTLIST INPUT
  7819.   %attrs;                          -- %coreattrs, %i18n, %events --
  7820.   type      %InputType   TEXT      -- what kind of widget is needed --
  7821.   name        CDATA      #IMPLIED  -- required for all but submit & reset --
  7822.   value       CDATA      #IMPLIED  -- required for radio and checkboxes --
  7823.   checked   (checked)    #IMPLIED  -- for radio buttons and check boxes --
  7824.   disabled  (disabled)   #IMPLIED  -- control is unavailable in this context --
  7825.   readonly  (readonly)   #IMPLIED  -- for text and passwd --
  7826.   size        CDATA      #IMPLIED  -- specific to each type of field --
  7827.   maxlength   NUMBER     #IMPLIED  -- max chars for text fields --
  7828.   src         %URL       #IMPLIED  -- for fields with images --
  7829.   alt         CDATA      #IMPLIED  -- description for text only browsers --
  7830.   usemap      %URL       #IMPLIED  -- use client-side image map --
  7831.   align       %IAlign    #IMPLIED  -- vertical or horizontal alignment --
  7832.   tabindex    NUMBER     #IMPLIED  -- position in tabbing order --
  7833.   onfocus     %Script    #IMPLIED  -- the element got the focus --
  7834.   onblur      %Script    #IMPLIED  -- the element lost the focus --
  7835.   onselect    %Script    #IMPLIED  -- some text was selected --
  7836.   onchange    %Script    #IMPLIED  -- the element value was changed --
  7837.   accept      CDATA      #IMPLIED  -- list of MIME types for file upload --
  7838.   >
  7839.  
  7840. Start tag: required, End tag: forbidden
  7841.  
  7842. Attribute definitions
  7843.  
  7844. type = text|password|checkbox|radio|submit|reset|file|hidden|image|button
  7845.      This attribute specifies the type of input control to create. We
  7846.      discuss input control types below. The default value for this attribute
  7847.      is "text".
  7848. name = cdata
  7849.      This attribute assigns a name to the control. This name will be paired
  7850.      with the current value of the control if the element's value is
  7851.      submitted along with the form.
  7852. value = cdata
  7853.      This attribute specifies the initial value of the control. It is
  7854.      optional except when the control type is "radio".
  7855. size = cdata
  7856.      This attribute tells the user agent the initial width of the control.
  7857.      The width is given in pixels, except for control types "text" and
  7858.      "password" when it is the (integer) number of characters.
  7859. maxlength = integer
  7860.      When the control type is "text" or "password", this attribute specifies
  7861.      the maximum number of characters that may be entered. This number may
  7862.      exceed the specified size, in which case the user agent should offer a
  7863.      scrolling mechanism. The default value for this attribute is an
  7864.      unlimited number.
  7865. checked
  7866.      When the control type is "radio", this boolean attribute specifies that
  7867.      the radio button is on. This attribute must be ignored for other
  7868.      control types.
  7869. src = url
  7870.      When the control type is "image", this attribute specifies the location
  7871.      of the image to be used to decorate the graphical submit button.
  7872.  
  7873. Attributes defined elsewhere
  7874.  
  7875.    * id, class (document-wide identifiers)
  7876.    * lang (language information), dir (text direction)
  7877.    * title (element titles)
  7878.    * style (inline style information)
  7879.    * alt (alternate text)
  7880.    * align (alignment)
  7881.    * accept (legal MIME types for a server)
  7882.    * readonly (read-only input controls)
  7883.    * disabled (disabled input controls)
  7884.    * tabindex (tabbing navigation)
  7885.    * usemap (client-side image maps)
  7886.    * onfocus, onblur, onselect, onchange (intrinsic events)
  7887.    * onclick, ondblclick, onmousedown, onmouseup, onmouseover, onmousemove,
  7888.      onmouseout, onkeypress, onkeydown, onkeyup (intrinsic events)
  7889.  
  7890. The nature of a control defined by the INPUT element depends on the value of
  7891. the type attribute.
  7892.  
  7893. Input types
  7894.  
  7895. The INPUT element's type attribute determines which control will be created.
  7896.  
  7897. text
  7898.      This type creates a single-line text box. The value submitted by a text
  7899.      control is the input text.
  7900. password
  7901.      Like "text", but the input text is rendered in such a way as to hide
  7902.      the characters (e.g., a series of asterisks). This control is used for
  7903.      sensitive input such as passwords. The value submitted by a password
  7904.      control is the input text (not the rendering).
  7905. checkbox
  7906.      A checkbox is an on/off switch. When the switch is on, the value of the
  7907.      checkbox is "active". When the switch is off, the value is inactive.
  7908.      The checkbox value is only submitted with the form when the switch is
  7909.      on.
  7910.  
  7911.      Several checkboxes within the same form may bear the same name. Upon
  7912.      submission, each "on" checkbox with the same name submits a name/value
  7913.      pair with the same name component. This allows users to select more
  7914.      than one value for a given property.
  7915.  
  7916. radio
  7917.      A radio button is an on/off switch. When the switch is on, the value of
  7918.      the radio button is "active". When the switch is off, the value is
  7919.      inactive. The radio button value is only submitted with the form when
  7920.      the switch is on.
  7921.  
  7922.      Several radio button within the same form may bear the same name.
  7923.      However, only one of these buttons may be "on" at any one time. All
  7924.      related buttons are set to "off" as soon as one is set to "on". Thus,
  7925.      for related radio buttons, only one name/value pair is ever submitted.
  7926.  
  7927. submit
  7928.      Creates a submit button. When this button is activated by the user, the
  7929.      form is submitted to the location specified by the action attribute of
  7930.      the englobing FORM element.
  7931.  
  7932.      A form may contain more than one submit button. Only the name/value
  7933.      pair of the activated submit button is submitted with the form.
  7934.  
  7935. image
  7936.      Creates a graphical submit button. The value of the src attribute
  7937.      specifies the URL of the image that will decorate the button. Some
  7938.      users will be unable to see this image. We strongly recommend you
  7939.      provide a value for the alt attribute as an textual alternative for the
  7940.      image.
  7941.  
  7942.      When a pointing device is used to click on the image, the form is
  7943.      submitted and the location passed to the server. The x value is
  7944.      measured in pixels from the left of the image, and the y value in
  7945.      pixels from the top of the image. The submitted data includes
  7946.      name.x=x-value and name.y=y-value where "name" is the value of the name
  7947.      attribute, and x-value and y-value are the x and y coordinate values
  7948.      respectively.
  7949.  
  7950.      If the server takes different actions depending on the location
  7951.      clicked, users of non-graphical browsers will be disadvantaged. For
  7952.      this reason, you are recommended to consider alternative approaches:
  7953.  
  7954.         o Use multiple submit buttons (each with their own image) in place
  7955.           of a single graphical submit button. You can use style sheets to
  7956.           control the positioning of these buttons.
  7957.         o Use a client-side image map together with scripting.
  7958.  
  7959.      A possible future extension would be to add the usemap attribute to
  7960.      INPUT for use as as client-side image map when "type=image". The AREA
  7961.      element corresponding to the location clicked would contribute the
  7962.      value to be passed to the server. To avoid the need to modify server
  7963.      scripts, it may be appropriate to extend AREA to provide x and y values
  7964.      for use with the INPUT element.
  7965.  
  7966. reset
  7967.      Creates a reset button. When this button is activated by the user, all
  7968.      of the form's controls have their values reset to the initial values
  7969.      specified by their value attributes. The name/value for a reset button
  7970.      are not submitted with the form.
  7971. button
  7972.      Creates a push button that has no default behavior. The behavior of the
  7973.      button is defined by associating the button with client-side scripts
  7974.      that are triggered when events affecting the button occur (e.g.,
  7975.      clicking the button). The value of the value attribute is the label
  7976.      used for the button.
  7977.  
  7978.      For example, the following declaration causes the function named verify
  7979.      to be executed when the button is clicked. The script must be defined
  7980.      by a SCRIPT element.
  7981.  
  7982.      <INPUT type="button" value="Click Me" onclick="verify()">
  7983.  
  7984.      Please consult the section on intrinsic events for more information
  7985.      about scripting and events.
  7986.  
  7987. hidden
  7988.      Creates a element that is not rendered by the user agent. However, the
  7989.      element's name and value are submitted with the form.
  7990.  
  7991.      This control type is generally used to store information between
  7992.      client/server exchanges that would otherwise be loss due to the
  7993.      stateless nature of HTTP.
  7994.  
  7995.      INPUT controls of type hidden have their values submitted with the
  7996.      form. The same holds for controls that are not rendered because of
  7997.      style information. The following control, though hidden by the user
  7998.      agent, will have its value submitted with the form.
  7999.  
  8000.      <INPUT type="password" style="display:none"
  8001.                name="invisible-password"
  8002.                value="mypassword">
  8003.  
  8004. file
  8005.      Prompts the user for a file name. When the form is submitted, the
  8006.      contents of the file are submitted to the server as well as other user
  8007.      input.
  8008.  
  8009.      User agents should encapsulate multiple files in a MIME multipart
  8010.      document (see [RFC2045]). This mechanism encapsulates each file in a a
  8011.      body-part of a multipart MIME body that is sent as the HTTP entity.
  8012.      Each each body part can be labeled with an appropriate "Content-Type",
  8013.      including if necessary a "charset" parameter that specifies the
  8014.      character encoding.
  8015.  
  8016. The following sample HTML fragment defines a simple form that allows the
  8017. user to enter a first name, last name, email address, and sex. When the
  8018. submit button is activated, the form is sent to the program specified by the
  8019. action attribute.
  8020.  
  8021.  <FORM action="http://somesite.com/prog/adduser" method="post">
  8022.     <P>
  8023.     First name: <INPUT type="text" name="firstname"><BR>
  8024.     Last name: <INPUT type="text" name="lastname"><BR>
  8025.     email: <INPUT type="text" name="email"><BR>
  8026.     <INPUT type="radio" name="sex" value="Male"> Male<BR>
  8027.     <INPUT type="radio" name="sex" value="Female"> Female<BR>
  8028.     <INPUT type="submit" value="Send"> <INPUT type="reset">
  8029.  </FORM>
  8030.  
  8031. This form might be rendered as follows:
  8032.  
  8033. [An example form rendering.]
  8034.  
  8035. In the section on the LABEL element, we discuss marking up labels such as
  8036. "First name".
  8037.  
  8038. The following example shows how the contents of a user-specified file may be
  8039. submitted with a form. This example is based on an example from [RFC1867].
  8040.  
  8041. In this example, the user is prompted to enter a name and a list of names of
  8042. files whose contents should be submitted with the form. By specifying the
  8043. enctype value of "multipart/form-data", each file's contents are stored in a
  8044. separate section of a multipart document.
  8045.  
  8046. <FORM action="http://server.dom/cgi/handle"
  8047.     enctype="multipart/form-data"
  8048.     method="post">
  8049.  What is your name? <INPUT type="text" name="name_of_sender">
  8050.  What files are you sending? <INPUT type="file" name="name_of_files">
  8051. </FORM>
  8052.  
  8053. Please consult [RFC1867] for more information about file submissions.
  8054.  
  8055. The ISINDEX element
  8056.  
  8057. ISINDEX is deprecated. Users should use the INPUT element instead of this
  8058. element.
  8059.  
  8060. <!ELEMENT ISINDEX - O EMPTY>
  8061. <!ATTLIST ISINDEX
  8062.   %coreattrs;                      -- id, class, style, title --
  8063.   %i18n;                           -- lang, dir --
  8064.   prompt      CDATA      #IMPLIED  -- prompt message -->
  8065.  
  8066. Start tag: required, End tag: forbidden
  8067.  
  8068. Attribute definitions
  8069.  
  8070. prompt = cdata
  8071.      Deprecated. This attribute specifies a prompt string for the input
  8072.      field.
  8073.  
  8074. Attributes defined elsewhere
  8075.  
  8076.    * id, class (document-wide identifiers)
  8077.    * lang (language information), dir (text direction)
  8078.    * title (element titles)
  8079.    * style (inline style information)
  8080.  
  8081. The ISINDEX element causes the user agent to prompt the user for a single
  8082. line of input (allowing any number of characters). The user agent may use
  8083. the value of the prompt attribute as a title for the prompt.
  8084.  
  8085. DEPRECATED EXAMPLE:
  8086. The following ISINDEX declaration:
  8087.  
  8088. <ISINDEX prompt="Enter your search phrase: ">
  8089.  
  8090. is equivalent to the following INPUT declaration:
  8091.  
  8092. <FORM action="..." method="post">
  8093. Enter your search phrase: <INPUT type="text">
  8094. </FORM>
  8095.  
  8096. Semantics of ISINDEX. Currently, the semantics for ISINDEX are only
  8097. well-defined when the base URL for the enclosing document is an HTTP URL. In
  8098. practice, the input string is restricted to Latin-1 as there is no mechanism
  8099. for the URL to specify a different character set.
  8100.  
  8101. The BUTTON element
  8102.  
  8103. <!ELEMENT BUTTON - -
  8104.      (%inline | %blocklevel)* -(A | %formctrl | FORM | ISINDEX | FIELDSET)>
  8105. <!ATTLIST BUTTON
  8106.   %attrs;                          -- %coreattrs, %i18n, %events --
  8107.   name        CDATA      #IMPLIED  -- for scripting/forms as submit button --
  8108.   value       CDATA      #IMPLIED  -- gets passed to server when submitted --
  8109.   type    (submit|reset) #IMPLIED  -- for use as form submit/reset button --
  8110.   disabled   (disabled)  #IMPLIED  -- control is unavailable in this context --
  8111.   tabindex    NUMBER     #IMPLIED  -- position in tabbing order --
  8112.   onfocus     %Script    #IMPLIED  -- the element got the focus --
  8113.   onblur      %Script    #IMPLIED  -- the element lost the focus --
  8114.   >
  8115.  
  8116. Start tag: required, End tag: required
  8117.  
  8118. Attribute definitions
  8119.  
  8120. name = cdata
  8121.      This attribute assigns a name to the button.
  8122. value = cdata
  8123.      This attribute assigns a value to the button.
  8124. type = button|submit|reset
  8125.      This attribute declares the type of the button. When this attribute is
  8126.      not set, the button's behavior is undefined. Possible values:
  8127.         o button: Creates a simple push button intended to trigger a script.
  8128.         o submit: Creates a button that submits an englobing form. This is
  8129.           the default value.
  8130.         o reset: Creates a button that resets an englobing form.
  8131.  
  8132. Attributes defined elsewhere
  8133.  
  8134.    * disabled (disabled input controls)
  8135.    * tabindex (tabbing navigation)
  8136.    * usemap (client-side image maps)
  8137.    * onfocus, onblur (intrinsic events)
  8138.    * onclick, ondblclick, onmousedown, onmouseup, onmouseover, onmousemove,
  8139.      onmouseout, onkeypress, onkeydown, onkeyup (intrinsic events)
  8140.  
  8141. A BUTTON element whose type is "submit" is very similar to an INPUT element
  8142. whose type is "submit". They both cause a form to be submitted, but the
  8143. BUTTON element allows richer presentational possibilities.
  8144.  
  8145. A BUTTON element whose type is "submit" and whose content is an image (e.g.,
  8146. the IMG element) is very similar to an INPUT element whose type is "image".
  8147. They both cause a form to be submitted, but their presentation is different.
  8148. In this context, an INPUT element is supposed to be rendered as a "flat"
  8149. image, while a BUTTON is supposed to be rendered as a button (e.g., with
  8150. relief and an up/down motion when clicked).
  8151.  
  8152. The following example expands a previous example by substituting the INPUT
  8153. elements that create submit and reset buttons with button BUTTON instances.
  8154. The buttons contain images by way of the IMG element.
  8155.  
  8156.  <FORM action="http://somesite.com/prog/adduser" method="post">
  8157.     <P>
  8158.     First name: <INPUT type="text" name="firstname"><BR>
  8159.     Last name: <INPUT type="text" name="lastname"><BR>
  8160.     email: <INPUT type="text" name="email"><BR>
  8161.     <INPUT type="radio" name="sex" value="Male"> Male<BR>
  8162.     <INPUT type="radio" name="sex" value="Female"> Female<BR>
  8163.     <BUTTON name="submit" value="submit" type="submit">
  8164.     Send<IMG src="/icons/wow.gif" alt="wow"></BUTTON>
  8165.     <BUTTON name="reset" type="reset">
  8166.     Reset<IMG src="/icons/oops.gif" alt="oops"></BUTTON>
  8167.  </FORM>
  8168.  
  8169. If a BUTTON is used with an IMG element, you are recommended to exploit the
  8170. IMG element's alt attribute to provide a description for users unable to see
  8171. the image.
  8172.  
  8173. It is illegal to associate an image map with an IMG that appears as the
  8174. contents of a BUTTON element.
  8175.  
  8176. ILLEGAL EXAMPLE:
  8177. The following is not considered legal HTML.
  8178.  
  8179. <BUTTON>
  8180. <IMG src="foo.gif" usemap="...">
  8181. </BUTTON>
  8182.  
  8183. A BUTTON element whose type is "reset" is very similar to an INPUT element
  8184. whose type is "reset". They both cause controls to regain their initial
  8185. values, but the BUTTON element allows richer presentation.
  8186.  
  8187. The BUTTON element may also be used together with scripts, in which case
  8188. it's type should be "button". When such a button is activated, a client-side
  8189. script is executed. We discuss this use of BUTTON later in the specification
  8190. in the section on intrinsic events.
  8191.  
  8192. The SELECT and OPTION elements
  8193.  
  8194. <!ELEMENT SELECT - - (OPTION+)>
  8195. <!ATTLIST SELECT
  8196.   %attrs;                          -- %coreattrs, %i18n, %events --
  8197.   name        CDATA      #REQUIRED -- field name --
  8198.   size        NUMBER     #IMPLIED  -- rows visible --
  8199.   multiple  (multiple)   #IMPLIED  -- default is single selection --
  8200.   disabled  (disabled)   #IMPLIED  -- control is unavailable in this context --
  8201.   tabindex    NUMBER     #IMPLIED  -- position in tabbing order --
  8202.   onfocus     %Script    #IMPLIED  -- the element got the focus --
  8203.   onblur      %Script    #IMPLIED  -- the element lost the focus --
  8204.   onselect    %Script    #IMPLIED  -- some text was selected --
  8205.   onchange    %Script    #IMPLIED  -- the element value was changed --
  8206.   >
  8207.  
  8208. Start tag: required, End tag: required
  8209.  
  8210. SELECT Attribute definitions
  8211.  
  8212. name = cdata
  8213.      This attribute assigns a name to the element. This name will be paired
  8214.      with any selected values when the form is submitted.
  8215. size = integer
  8216.      This attribute specifies the number of rows to be rendered by the user
  8217.      agent. The number of rows may be smaller than the number of possible
  8218.      choices. In this case, the user agent should provide a scrolling
  8219.      mechanism for accessing all possible choices.
  8220. multiple
  8221.      When set, this boolean attribute allows multiple selections. When not
  8222.      set, the SELECT element only permits single selections. Traditionally,
  8223.      visual user agents render multiple-selection elements as list boxes,
  8224.      while single-selection elements are rendered as drop-down menus.
  8225.  
  8226. The SELECT element creates a list of choices that may be selected by the
  8227. user. Each SELECT element must contain at least one choice. Each choice is
  8228. specified by an instance of the OPTION element.
  8229.  
  8230. <!ELEMENT OPTION - O (#PCDATA)*>
  8231. <!ATTLIST OPTION
  8232.   %attrs;                          -- %coreattrs, %i18n, %events --
  8233.   selected  (selected)   #IMPLIED
  8234.   disabled  (disabled)   #IMPLIED  -- control is unavailable in this context --
  8235.   value       CDATA      #IMPLIED  -- defaults to element content --
  8236.   >
  8237.  
  8238. Start tag: required, End tag: optional
  8239.  
  8240. OPTION Attribute definitions
  8241.  
  8242. selected
  8243.      When set, this boolean attribute specifies that this option is selected
  8244.      (initially or by the user).
  8245. value = cdata
  8246.      This attribute specifies the value to be submitted for this choice if
  8247.      the choice is selected when the form is submitted. The value is paired
  8248.      with the name assigned to the SELECT element. If this attribute is not
  8249.      set, the submitted value defaults to the content of the OPTION element.
  8250.  
  8251. Attributes defined elsewhere
  8252.  
  8253.    * id, class (document-wide identifiers)
  8254.    * lang (language information), dir (text direction)
  8255.    * title (element titles)
  8256.    * style (inline style information)
  8257.    * disabled (disabled input controls)
  8258.    * tabindex (tabbing navigation)
  8259.    * onfocus, onblur, onchange (intrinsic events)
  8260.    * onclick, ondblclick, onmousedown, onmouseup, onmouseover, onmousemove,
  8261.      onmouseout, onkeypress, onkeydown, onkeyup (intrinsic events)
  8262.  
  8263. User agents should use the content of the OPTION element as the displayed
  8264. choice.
  8265.  
  8266. In this example, we create a menu that allows the user to select which of
  8267. seven software components to install. The first and second components are
  8268. initially selected but may be deselected by the user. The remaining
  8269. components are not initially selected. The size attribute states that the
  8270. menu should only have 4 rows even though the user may select from among 7
  8271. options. The other options must be made available through a scrolling
  8272. mechanism.
  8273.  
  8274. The SELECT is followed by submit and reset buttons.
  8275.  
  8276. <FORM action="http://somesite.com/prog/component-select" method="post">
  8277.    <SELECT multiple size="4" name="component-select">
  8278.       <OPTION selected value="Component_1_a">Component_1</OPTION>
  8279.       <OPTION selected value="Component_1_b">Component_2</OPTION>
  8280.       <OPTION>Component_3</OPTION>
  8281.       <OPTION>Component_4</OPTION>
  8282.       <OPTION>Component_5</OPTION>
  8283.       <OPTION>Component_6</OPTION>
  8284.       <OPTION>Component_7</OPTION>
  8285.    </SELECT>
  8286.    <INPUT type="submit" value="Send"><INPUT type="reset">
  8287. </FORM>
  8288.  
  8289. When the form is submitted, each selected choice will be paired with the
  8290. name "component-select" and submitted. The submitted value of each OPTION
  8291. will be its contents, except where overridden by the value attribute (here,
  8292. in the first two components).
  8293.  
  8294. The TEXTAREA element
  8295.  
  8296. <!ELEMENT TEXTAREA - - (#PCDATA)*>
  8297. <!ATTLIST TEXTAREA
  8298.   %attrs;                          -- %coreattrs, %i18n, %events --
  8299.   name        CDATA      #REQUIRED
  8300.   rows        NUMBER     #REQUIRED
  8301.   cols        NUMBER     #REQUIRED
  8302.   disabled  (disabled)   #IMPLIED  -- control is unavailable in this context --
  8303.   readonly  (readonly)   #IMPLIED
  8304.   tabindex    NUMBER     #IMPLIED  -- position in tabbing order --
  8305.   onfocus     %Script    #IMPLIED  -- the element got the focus --
  8306.   onblur      %Script    #IMPLIED  -- the element lost the focus --
  8307.   onselect    %Script    #IMPLIED  -- some text was selected --
  8308.   onchange    %Script    #IMPLIED  -- the element value was changed --
  8309.   >
  8310.  
  8311. Start tag: required, End tag: required
  8312.  
  8313. Attribute definitions
  8314.  
  8315. name = cdata
  8316.      This attribute assigns a name to the element. This name will be paired
  8317.      with the content of the element when submitted to the server.
  8318. rows = integer
  8319.      Specifies the number of visible text lines. Users should be able to
  8320.      enter more lines than this, so user agents should provide some means to
  8321.      scroll through the contents of the textarea field when the contents
  8322.      extend beyond the visible area.
  8323. cols = integer
  8324.      Specifies the visible width in average character widths. Users should
  8325.      be able to enter longer lines than this, so user agents should provide
  8326.      some means to scroll through the contents of the textarea field when
  8327.      the contents extend beyond the visible area. User agents may wrap
  8328.      visible text lines to keep long lines visible without the need for
  8329.      scrolling.
  8330.  
  8331. Attributes defined elsewhere
  8332.  
  8333.    * id, class <<<<<<< forms.src (document-wide identifiers)
  8334.    * lang (language information), dir (text direction)
  8335.    * title (element titles)
  8336.    * style (inline style information)
  8337.    * readonly (read-only input controls)
  8338.    * disabled (disabled input controls)
  8339.    * tabindex (tabbing navigation)
  8340.    * onfocus, onblur, onselect, onchange (intrinsic events)
  8341.    * onclick, ondblclick, onmousedown, onmouseup, onmouseover, onmousemove,
  8342.      onmouseout, onkeypress, onkeydown, onkeyup (intrinsic events)
  8343.  
  8344. The TEXTAREA element creates a multi-line text input control (as opposed to
  8345. a single-line INPUT control). The content of this element provides the
  8346. initial text presented by the control.
  8347.  
  8348. This example creates a TEXTAREA control that is 20 rows by 80 columns and
  8349. contains two lines of text initially. The TEXTAREA is followed by submit and
  8350. reset buttons.
  8351.  
  8352. <FORM action="http://somesite.com/prog/text-read" method="post">
  8353.    <TEXTAREA rows="20" cols="80">
  8354.    First line of initial text.
  8355.    Second line of initial text.
  8356.    </TEXTAREA>
  8357.    <INPUT type="submit" value="Send"><INPUT type="reset">
  8358. </FORM>
  8359.  
  8360. Setting the readonly attribute allows authors to display unmodifiable text
  8361. in a TEXTAREA. This differs from using standard marked-up text in a document
  8362. because the value of TEXTAREA is submitted with the form.
  8363.  
  8364. It is recommended that user agents canonicalize line endings to CR, LF
  8365. (ASCII decimal 13, 10) when submitting the field's contents. The character
  8366. set for submitted data should be ISO Latin-1, unless the server has
  8367. previously indicated that it can support alternative character sets.
  8368.  
  8369. The LABEL element
  8370.  
  8371. <!ELEMENT LABEL - - (%inline)* -(LABEL) -- field label text -->
  8372. <!ATTLIST LABEL
  8373.   %attrs;                          -- %coreattrs, %i18n, %events --
  8374.   for         IDREF      #IMPLIED  -- matches field ID value --
  8375.   disabled    (disabled) #IMPLIED  -- control is unavailable in this context --
  8376.   accesskey   CDATA      #IMPLIED  -- accessibility key character --
  8377.   onfocus     %Script    #IMPLIED  -- the element got the focus --
  8378.   onblur      %Script    #IMPLIED  -- the element lost the focus --
  8379.   >
  8380.  
  8381. Start tag: required, End tag: required
  8382.  
  8383. Attribute definitions
  8384.  
  8385. for = control-name
  8386.      This attribute explicitly associates the label being defined with
  8387.      another control. The value of this attribute must be the value of the
  8388.      id attribute of some other control in the same document. In the absence
  8389.      of this attribute, the label being defined is associated with its
  8390.      contents.
  8391.  
  8392. Attributes defined elsewhere
  8393.  
  8394.    * id, class (document-wide identifiers)
  8395.    * lang (language information), dir (text direction)
  8396.    * title (element titles)
  8397.    * style (inline style information)
  8398.    * disabled (disabled input controls)
  8399.    * accesskey (access keys)
  8400.    * tabindex (tabbing navigation)
  8401.    * onclick,
  8402.    * onfocus, onblur (intrinsic events)
  8403.    * onclick, ondblclick, onmousedown, onmouseup, onmouseover, onmousemove,
  8404.      onmouseout, onkeypress, onkeydown, onkeyup (intrinsic events)
  8405.  
  8406. The LABEL element may be used to attach information to other control
  8407. elements (excluding other LABEL elements). Labels may be rendered by user
  8408. agents in a number of ways (e.g., visually, read by speech synthesizers,
  8409. etc.)
  8410.  
  8411. When a LABEL element receives focus, it passes the focus on to its
  8412. associated control. See the section below on access keys for examples.
  8413.  
  8414. To associate a label with another control explicitly, set the for attribute
  8415. of the LABEL.
  8416.  
  8417. This example creates a table that is used to align two INPUT controls and
  8418. their associated labels. Each label is associated explicitly with one of the
  8419. INPUT elements.
  8420.  
  8421. <FORM action="..." method="post">
  8422. <TABLE>
  8423.   <TR>
  8424.     <TD><LABEL for="fname">First Name</LABEL>
  8425.     <TD><INPUT type="text" name="firstname" id="fname">
  8426.   <TR>
  8427.     <TD><LABEL for="lname">Last Name</LABEL>
  8428.     <TD><INPUT type="text" name="lastname" id="lname">
  8429. </TABLE>
  8430. <FORM>
  8431.  
  8432. This example extends a previous example form to include LABEL elements. Note
  8433. that the LABEL elements are associated to the INPUT elements through the id
  8434. attribute.
  8435.  
  8436.  <FORM action="http://somesite.com/prog/adduser" method="post">
  8437.     <P>
  8438.     <LABEL for="firstname">First name: </LABEL><INPUT
  8439.               type="text" id="firstname"><BR>
  8440.     <LABEL for="lastname">Last name: </LABEL><INPUT
  8441.               type="text" id="lastname"><BR>
  8442.     <LABEL for="email"email: </LABEL><INPUT
  8443.               type="text" id="email"><BR>
  8444.     <INPUT type="radio" name="sex" value="Male"> Male<BR>
  8445.     <INPUT type="radio" name="sex" value="Female"> Female<BR>
  8446.     <INPUT type="submit" value="Send"> <INPUT type="reset">
  8447.  </FORM>
  8448.  
  8449. More than one LABEL may be associated with the same control by creating
  8450. multiple references via the for attribute.
  8451.  
  8452. To associate a label with another control implicitly, make the control the
  8453. contents of the LABEL. In this case, the LABEL may only contain one other
  8454. control element. The label itself may be positioned before or after the
  8455. associated control.
  8456.  
  8457. In this example, we implicitly associate two labels and two INPUT elements.
  8458. Notice that the implicit association prevents us from being able to layout
  8459. the label and its associated control in a table (see the previous example).
  8460.  
  8461. <FORM action="..." method="post">
  8462. <LABEL>
  8463.    First Name
  8464.    <INPUT type="text" name="firstname">
  8465. </LABEL>
  8466. <LABEL>
  8467.    <INPUT type="text" name="lastname">
  8468.    Last Name
  8469. </LABEL>
  8470. </FORM>
  8471.  
  8472. The FIELDSET and LEGEND elements
  8473.  
  8474. <!--
  8475.   #PCDATA is to solve the mixed content problem,
  8476.   per specification only whitespace is allowed there!
  8477.  -->
  8478. <!ELEMENT FIELDSET - - (#PCDATA,LEGEND,%block)>
  8479. <!ATTLIST FIELDSET
  8480.   %attrs;                          -- %coreattrs, %i18n, %events --
  8481.   >
  8482.  
  8483. <!ELEMENT LEGEND - - (%inline;)+>
  8484. <!ENTITY % LAlign "(top|bottom|left|right)">
  8485.  
  8486. <!ATTLIST LEGEND            -- fieldset legend --
  8487.   %attrs;                          -- %coreattrs, %i18n, %events --
  8488.   align       %LAlign;   #IMPLIED  -- relative to fieldset --
  8489.   accesskey   CDATA      #IMPLIED  -- accessibility key character --
  8490.   >
  8491.  
  8492. Start tag: required, End tag: required
  8493.  
  8494. LEGEND Attribute definitions
  8495.  
  8496. align = top|bottom|left|right
  8497.      This attribute specifies the position of the legend with respect to the
  8498. fieldset. Possible values:
  8499.  
  8500.    * top: The legend is above the fieldset. This is the default value.
  8501.    * bottom: The legend is below the fieldset.
  8502.    * left: The legend is to the left of the fieldset.
  8503.    * right: The legend is to the right of the fieldset.
  8504.  
  8505. Attributes defined elsewhere
  8506.  
  8507.    * id, class (document-wide identifiers)
  8508.    * lang (language information), dir (text direction)
  8509.    * title (element titles)
  8510.    * style (inline style information)
  8511.    * accesskey (access keys)
  8512.    * align (alignment)
  8513.    * onclick, ondblclick, onmousedown, onmouseup, onmouseover, onmousemove,
  8514.      onmouseout, onkeypress, onkeydown, onkeyup (intrinsic events)
  8515.  
  8516. The FIELDSET element allows form designers to group thematically related
  8517. controls together. Grouping controls makes it easier for users to understand
  8518. their purpose while simultaneously facilitating tabbing navigation for
  8519. visual user agents and speech navigation for speech-oriented user agents.
  8520. The proper use of this element makes documents more accessible to people
  8521. with disabilities.
  8522.  
  8523. The LEGEND element allows designers to assign a caption to a FIELDSET. The
  8524. legend improves accessibility when the FIELDSET is rendered non-visually.
  8525. When rendered visually, setting the align attribute on the LEGEND element
  8526. aligns it with respect to the FIELDSET.
  8527.  
  8528. In this example, we create a form that one might fill out at the doctor's
  8529. office. It is divided into three sections: personal information, medical
  8530. history, and current medication. Each section contains controls for
  8531. inputting the appropriate information.
  8532.  
  8533. <FORM action="..." method="post">
  8534. <FIELDSET>
  8535. <LEGEND align="top">Personal Information</LEGEND>
  8536. Last Name: <INPUT name="personal_lastname" type="text" tabindex="1">
  8537. First Name: <INPUT name="personal_firstname" type="text" tabindex="2">
  8538. Address: <INPUT name="personal_address" type="text" tabindex="3">
  8539. ...more personal information...
  8540. </FIELDSET>
  8541. <FIELDSET>
  8542. <LEGEND align="top">Medical History</LEGEND>
  8543. <INPUT name="history_illness"
  8544.        type="checkbox"
  8545.        value="Smallpox" tabindex="20"> Smallpox</INPUT>
  8546. <INPUT name="history_illness"
  8547.        type="checkbox"
  8548.        value="Mumps" tabindex="21"> Mumps</INPUT>
  8549. <INPUT name="history_illness"
  8550.        type="checkbox"
  8551.        value="Dizziness" tabindex="22"> Dizziness</INPUT>
  8552. <INPUT name="history_illness"
  8553.        type="checkbox"
  8554.        value="Sneezing" tabindex="23"> Sneezing</INPUT>
  8555. ...more medical history...
  8556. </FIELDSET>
  8557. <FIELDSET>
  8558. <LEGEND align="top">Current Medication</LEGEND>
  8559. Are you currently taking any medication?
  8560. <INPUT name="medication_now"
  8561.        type="radio"
  8562.        value="Yes" tabindex="35">Yes</INPUT>
  8563. <INPUT name="medication_now"
  8564.        type="radio"
  8565.        value="No" tabindex="35">No</INPUT>
  8566.  
  8567. If you are currently taking medication, please indicate
  8568. it in the space below:
  8569. <TEXTAREA name="current_medication"
  8570.           rows="20" cols="50"
  8571.           tabindex="40">
  8572. </TEXTAREA>
  8573. </FIELDSET>
  8574. </FORM>
  8575.  
  8576. Note that in this example, we might improve the presentation of the form by
  8577. aligning elements within each FIELDSET (with style sheets), adding color and
  8578. font information (with style sheets), adding scripting (say, to only open
  8579. the "current medication" text area if the user indicates he or she is
  8580. currently on medication), etc.
  8581.  
  8582. Giving focus to an element
  8583.  
  8584. Active elements in HTML documents must receive focus from the user in order
  8585. to perform their tasks. For example, users must activate a link specified by
  8586. the A element in order to follow the specified link. Similarly, users must
  8587. give a TEXTAREA focus in order to enter text into it.
  8588.  
  8589. There are several ways to give focus to an element:
  8590.  
  8591.    * Designate the element with a pointing device.
  8592.    * Navigate from one element to the next with the keyboard. The document's
  8593.      author may define a tabbing order that specifies the order in which
  8594.      elements will receive focus if the user navigates the document with the
  8595.      keyboard (tabbing navigation). Once selected, an element may be
  8596.      activated by some other key sequence.
  8597.    * Select an element by a series of keyboard actions known as an access
  8598.      key (sometimes called "keyboard shortcut" or "keyboard accelerator").
  8599.  
  8600. Tabbing navigation
  8601.  
  8602. Attribute definitions
  8603.  
  8604. tabindex = integer
  8605.      This attribute specifies the position of the current element in the
  8606.      tabbing order for the current document. This value may be a positive or
  8607.      negative integer.
  8608.  
  8609. The tabbing order defines the order in which elements will receive focus
  8610. when navigated by the user via the keyboard. The tabbing order may include
  8611. elements nested within other elements.
  8612.  
  8613. Elements that may receive focus should be navigated by user agents according
  8614. to the following rules:
  8615.  
  8616.   1. Those elements that support the tabindex attribute and assign a postive
  8617.      value to it are navigated first. Navigation proceeds from the element
  8618.      with the lowest tabindex value to the element with the highest value.
  8619.      Values need not be sequential nor must they begin with any particular
  8620.      value. Elements that have identical tabindex should be navigated in the
  8621.      order they appear in the document.
  8622.   2. Those elements that do not define the tabindex attribute or do not
  8623.      support it are navigated next. These elements are navigated in the
  8624.      order they appear in the document.
  8625.   3. Those elements that support the tabindex attribute and assign a
  8626.      negative value to it do not participate in the tabbing order.
  8627.   4. Elements that are disabled do not participate in the tabbing order.
  8628.  
  8629. The following elements support the tabindex attribute: A, AREA, OBJECT,
  8630. INPUT, SELECT, TEXTAREA, and BUTTON.
  8631.  
  8632. In this example, the tabbing order will be the BUTTON, the INPUT elements in
  8633. order (note that "field1" and the button share the same tabindex, but
  8634. "field1" appears later in the document), and finally the link created by the
  8635. A element.
  8636.  
  8637. <HTML>
  8638. <BODY>
  8639. ...some text...
  8640. Click to go to the
  8641. <A tabindex="10" href="http://www.w3.org/">W3C Website.</A>
  8642. ...some more...
  8643. <BUTTON type="button" name="get-database"
  8644.            tabindex="1" onclick="get-database">
  8645. Click me to receive the current database.
  8646. </BUTTON>
  8647. ...some more...
  8648. <FORM action="..." method="post">
  8649. <INPUT tabindex="1" type="text" name="field1">
  8650. <INPUT tabindex="2" type="text" name="field2">
  8651. <INPUT tabindex="3" type="submit" name="submit">
  8652. </FORM>
  8653. </BODY>
  8654. </HTML>
  8655.  
  8656. Tabbing keys. The actual key sequence that causes tabbing navigation or
  8657. element activation depends on the configuration of the user agent (e.g., the
  8658. "tab" key is used for navigation and the "enter" key is used to activate a
  8659. selected element).
  8660.  
  8661. User agents may also define key sequences to navigate the tabbing order in
  8662. reverse. When the end (or beginning) of the tabbing order is reached, user
  8663. agents may circle back to the beginning (or end).
  8664.  
  8665. Access keys
  8666.  
  8667. Attribute definitions
  8668.  
  8669. accesskey = cdata
  8670.      This attribute assigns an access key to an element. An access key is a
  8671.      single character from the user agent's current character encoding. User
  8672.      agents should treat the value of this attribute as case-insensitive.
  8673.  
  8674. Pressing an access key assigned to an element gives focus to the element.
  8675. The action that is executed when an element receives focus depends on the
  8676. element. Links defined by A are generally followed by the user agent,
  8677. activated radio buttons change values, text fields with focus allow user
  8678. input, etc.
  8679.  
  8680. The following elements support the accesskey attribute: LABEL, A, CAPTION,
  8681. and LEGEND.
  8682.  
  8683. This example assigns the access key "U" to a label associated with an INPUT
  8684. control. Typing the access key gives focus to the label which in turn gives
  8685. it to the associated control. The user may then enter text into the INPUT
  8686. area.
  8687.  
  8688. <FORM action="..." method="post">
  8689. <LABEL for="user" accesskey="U">
  8690. User Name
  8691. </LABEL>
  8692. <INPUT type="text" name="user">
  8693. </FORM>
  8694.  
  8695. In this example, we assign an access key to a link defined by the A element.
  8696. Typing this access key takes the user to another document, in this case, a
  8697. table of contents.
  8698.  
  8699. <A accesskey="C"
  8700.       href="http://somplace.com/specification/contents.html">
  8701.     Table of Contents</A>
  8702.  
  8703. The invocation of access keys depends on the underlying system. For
  8704. instance, on machines running MS Windows, one generally has to press the
  8705. "alt" key in addition to the access key. On Apple systems, one generally has
  8706. to press the "cmd" key in addition to the access key.
  8707.  
  8708. The rendering of access keys depends on the user agent. We recommend that
  8709. authors include the access key in label text or wherever the access key is
  8710. to apply. User agents should render the value of an access key in such a way
  8711. as to emphasize its role and to distinguish it from other characters (e.g.,
  8712. by underlining it).
  8713.  
  8714. Disabled and read-only elements
  8715.  
  8716. In contexts where user input is either undesirable or irrelevant, it is
  8717. important to be able to disable an element or render it read-only. For
  8718. example, one may want to disable a form's submit button until the user has
  8719. entered some required data. Similarly, an author may want to include a piece
  8720. of read-only text that must be submitted as a value along with the form. The
  8721. following sections describe disabled and read-only elements.
  8722.  
  8723. Disabled elements
  8724.  
  8725. Attribute definitions
  8726.  
  8727. disabled
  8728.      When set for a form control, this boolean attribute disables the
  8729.      control for user input.
  8730.  
  8731. When set, the disabled attribute has the following effects on an element:
  8732.  
  8733.    * Disabled elements do not receive focus.
  8734.    * Disabled elements are skipped in tabbing navigation.
  8735.    * Values of disabled controls are not submitted with a form.
  8736.  
  8737. The following elements support the disabled attribute: INPUT, TEXTAREA,
  8738. SELECT, OPTION, OBJECT, LABEL, and BUTTON.
  8739.  
  8740. How disabled elements are rendered depends on the user agent. For example,
  8741. some user agents "gray out" disabled menu items, button labels, etc.
  8742.  
  8743. In this example, the disabled INPUT element cannot receive user input nor
  8744. will its value be submitted with the form.
  8745.  
  8746. <INPUT disabled name="fred" value="stone">
  8747.  
  8748. Note: The only way to modify dynamically the value of the disabled attribute
  8749. is through a script.
  8750.  
  8751. Read-only elements
  8752.  
  8753. Attribute definitions
  8754.  
  8755. readonly
  8756.      When set for a form control, this boolean attribute prohibits changes
  8757.      to control.
  8758.  
  8759. The readonly attribute specifies whether the element may be modified by the
  8760. user.
  8761.  
  8762. When set, the readonly attribute has the following effects on an element:
  8763.  
  8764.    * Read-only elements receive focus but cannot be modified by the user.
  8765.    * Read-only elements are included in tabbing navigation.
  8766.    * Values of read-only controls are submitted with a form.
  8767.  
  8768. The following elements support the readonly attribute: INPUT, TEXT,
  8769. PASSWORD, and TEXTAREA.
  8770.  
  8771. How read-only elements are rendered depends on the user agent.
  8772.  
  8773. Note: The only way to modify dynamically the value of the readonly attribute
  8774. is through a script.
  8775.  
  8776. Form submission
  8777.  
  8778. Which element values are submitted
  8779.  
  8780. Not all elements have their values submitted with a form. Conforming user
  8781. agents should not submit:
  8782.  
  8783.    * Disabled form controls.
  8784.    * Form controls without values for the name attribute.
  8785.    * OBJECT elements without the name attribute.
  8786.    * OBJECT elements with the declare attribute.
  8787.  
  8788.                                   Scripts
  8789.  
  8790. Contents
  8791.  
  8792.   1. Designing documents for user agents that support scripting
  8793.        1. The SCRIPT element
  8794.        2. Specifying the scripting language
  8795.        3. Syntax of script content
  8796.        4. Intrinsic events
  8797.        5. Dynamic modification of documents
  8798.   2. Designing documents for user agents that don't support scripting
  8799.        1. The NOSCRIPT element
  8800.        2. Commenting out scripts
  8801.  
  8802. A client-side script is a program that may accompany an HTML document or be
  8803. embedded directly in it. The program executes on the client's machine when
  8804. the document loads, or at some other time such as when a link is activated.
  8805. HTML's support for scripts is independent of the scripting language.
  8806.  
  8807. Scripts offer authors a means to extend HTML document in highly active and
  8808. interactive ways. For example:
  8809.  
  8810.    * Scripts may be evaluated as a document loads to modify the contents of
  8811.      the document dynamically.
  8812.    * Scripts may accompany a form to process input as it is entered.
  8813.      Designers may dynamically fill out parts of a form based on the values
  8814.      of other fields. They may also ensure that input data conforms to
  8815.      predetermined ranges of values, that fields are mutually consistent,
  8816.      etc.
  8817.    * Scripts may be triggered by events that affect the document, such as
  8818.      loading, unloading, element focus, mouse movement, etc.
  8819.    * Scripts may be linked to form controls (e.g., buttons) to produce
  8820.      graphical user interface elements.
  8821.  
  8822. There are two types of scripts authors may attach to an HTML document:
  8823.  
  8824.    * Those that are executed one time when the document is loaded by the
  8825.      user agent. Scripts that appear within a SCRIPT element are executed
  8826.      when the document is loaded. For user agents that cannot or will not
  8827.      handle scripts, authors may include alternate content via the NOSCRIPT
  8828.      element.
  8829.    * Those that are executed every time a specific event occurs. These
  8830.      scripts may be assigned to a number of elements via the intrinsic event
  8831.      attributes.
  8832.  
  8833. Note: This specification includes more detailed information about scripting
  8834. in sections on script macros.
  8835.  
  8836. Designing documents for user agents that support scripting
  8837.  
  8838. The following sections discuss issues that concern user agents that support
  8839. scripting.
  8840.  
  8841. The SCRIPT element
  8842.  
  8843.  
  8844. <!ELEMENT SCRIPT - - CDATA      -- script statements -->
  8845. <!ATTLIST SCRIPT
  8846.   type        CDATA      #IMPLIED  -- Internet content type for
  8847.                                       script language --
  8848.   language    CDATA      #IMPLIED  -- predefined script language name --
  8849.   src         %URL       #IMPLIED  -- URL for an external script --
  8850.   >
  8851.  
  8852. Start tag: required, End tag: required
  8853.  
  8854. Attribute definitions
  8855.  
  8856. type = cdata
  8857.      This attribute specifies the scripting language of the contents of this
  8858.      element. The value must be an Internet Media Type. There is no default
  8859.      value for this attribute.
  8860. language = cdata
  8861.      Deprecated.This attribute specifies the scripting language of the
  8862.      contents of this element. Its value is an identifier for the language,
  8863.      but since these identifiers are not standard, this attribute has been
  8864.      deprecated in favor of type.
  8865. src = url
  8866.      This attribute specifies the location of an external script.
  8867.  
  8868. The SCRIPT element places a script within a document. This element may
  8869. appear any number of times in the HEAD or BODY of an HTML document.
  8870.  
  8871. The script may be defined within the contents of the SCRIPT element or in an
  8872. external file. If the src attribute is not set, user agents must interpret
  8873. the contents of the element as the script. If the src has a URL value, user
  8874. agents must ignore the element's contents and retrieve the script via the
  8875. URL.
  8876.  
  8877. Scripts are evaluated by script engines that must be known to a user agent.
  8878.  
  8879. Specifying the scripting language
  8880.  
  8881. As HTML does not rely on a specific scripting language, document authors
  8882. must explicitly tell user agents the language of each script. This may be
  8883. done either through a default declaration or a local declaration.
  8884.  
  8885. Documents that contain neither a default scripting language declaration nor
  8886. a local one for a SCRIPT element are incorrect. User agents may still try to
  8887. interpret the script but are not required to.
  8888.  
  8889. The default scripting language
  8890.  
  8891. To specify the default scripting language for all scripts in a document
  8892. include the following META declaration in the HEAD of a document:
  8893.  
  8894. <META http-equiv="Content-Script-Type" content="type">
  8895.  
  8896. where "type" is an Internet Media Type (see [MIMETYPES]) naming the
  8897. scripting language. Examples of values include "text/tcl",
  8898. "text/javascript", "text/vbscript". See [MIMETYPES] for a complete list of
  8899. valid scripting language types.
  8900.  
  8901. In the absence of a META declaration, the default can be set by a
  8902. "Content-Script-Type" HTTP header.
  8903.  
  8904.     Content-Script-Type: type
  8905.  
  8906. where "type" is again an Internet Media Type naming the scripting language.
  8907.  
  8908. When several HTTP headers and META elements occur, the last one defines the
  8909. default scripting language. For our purposes, HTTP headers are considered to
  8910. occur earlier than the document HEAD.
  8911.  
  8912. Local declaration of a scripting language
  8913.  
  8914. It is also possible to specify the scripting language in each SCRIPT element
  8915. via the type attribute. In the absence of a default scripting language
  8916. specification, this attribute must be set on each SCRIPT element. When a
  8917. default scripting language has been specified, the type attribute overrides
  8918. it.
  8919.  
  8920. In this example, we declare the default scripting language to be "text/tcl".
  8921. We include one SCRIPT in the header, whose script is located in an external
  8922. file and is in the scripting language "text/vbscript". We also include one
  8923. SCRIPT in the body, which contains its own script written in
  8924. "text/javascript".
  8925.  
  8926. <HTML>
  8927. <HEAD>
  8928. <META http-equiv="Content-Script-Type" content="text/tcl">
  8929. <SCRIPT type="text/vbscript" src="http://someplace.com/progs/vbcalc">
  8930. </SCRIPT>
  8931. </HEAD>
  8932. <BODY>
  8933. <SCRIPT type="text/javascript">
  8934. ...some JavaScript...
  8935. </SCRIPT>
  8936. </BODY>
  8937. </HTML>
  8938.  
  8939. References to HTML elements from a script
  8940.  
  8941. Each scripting language has its own conventions for referring to HTML
  8942. objects from within a script. This specification does not define a standard
  8943. mechanism for referring to HTML objects.
  8944.  
  8945. However, scripts should refer to an element according to its assigned name.
  8946. Scripting engines should observe the following precedence rules when
  8947. identifying an element: a name attribute takes precedence over a id if both
  8948. are set. Otherwise, one or the other may be used.
  8949.  
  8950. Syntax of script content
  8951.  
  8952. The content of the SCRIPT element is a script, and as such, must not be
  8953. evaluated by the user agent as HTML markup. The user agent must pass it on
  8954. as data to a script engine.
  8955.  
  8956. HTML parsers must be able to recognize script data as beginning immediately
  8957. after the start tag and ending as soon as the ETAGO ("</") delimiters are
  8958. followed by a name character ([a-zA-Z]). The script data does not
  8959. necessarily end with the </SCRIPT> end tag, but is terminated by any "</"
  8960. followed by a name character.
  8961.  
  8962. Consequently, any HTML markup that is meant to be sent to a script engine
  8963. (which may do whatever it wants with the markup) must be "escaped" so as not
  8964. to confuse the HTML parser. Designers of each scripting language should
  8965. recommend language-specific support for resolving this issue.
  8966.  
  8967. ILLEGAL EXAMPLE:
  8968. The following code is invalid due the to presence of the "</EM>" characters
  8969. found inside of the SCRIPT element:
  8970.  
  8971.     <SCRIPT type="text/javascript">
  8972.       document.write ("<EM>This won't work</EM>")
  8973.     </SCRIPT>
  8974.  
  8975. A conforming parser must treat the "</EM>" data as the end of script data,
  8976. which is clearly not what the author intended.
  8977.  
  8978. In JavaScript, this code can be expressed legally by ensuring that the
  8979. apparent ETAGO delimiter does not appear immediately before an SGML name
  8980. start character:
  8981.  
  8982.     <SCRIPT type="text/javascript">
  8983.       document.write ("<EM>This will work<\/EM>")
  8984.     </SCRIPT>
  8985.  
  8986. In Tcl, one may accomplish this as follows:
  8987.  
  8988.     <SCRIPT type="text/tcl">
  8989.       document write "<EM>This will work<\/EM>"
  8990.     </SCRIPT>
  8991.  
  8992. In VBScript, the problem may be avoided with the Chr() function:
  8993.  
  8994.  
  8995.     "<EM>This will work<\" & Chr(47) + "EM>"
  8996.  
  8997. Intrinsic events
  8998.  
  8999. Attribute definitions
  9000.  
  9001. onload = script
  9002.      The onload event occurs when the user agent finishes loading a window
  9003.      or all frames within a FRAMESET. This attribute may be used with BODY
  9004.      and FRAMESET elements.
  9005. onunload = script
  9006.      The onunload event occurs when the user agent removes a document from a
  9007.      window or frame. This attribute may be used with BODY and FRAMESET
  9008.      elements.
  9009. onclick = script
  9010.      The onclick event occurs when the pointing device button is clicked
  9011.      over an element. This attribute may be used with most elements.
  9012. ondblclick = script
  9013.      The ondblclick event occurs when the pointing device button is double
  9014.      clicked over an element. This attribute may be used with most elements.
  9015. onmousedown = script
  9016.      The onmousedown event occurs when the pointing device button is pressed
  9017.      over an element. This attribute may be used with most elements.
  9018. onmouseup = script
  9019.      The onmouseup event occurs when the pointing device button is released
  9020.      over an element. This attribute may be used with most elements.
  9021. onmouseover = script
  9022.      The onmouseover event occurs when the pointing device is moved over an
  9023.      element. This attribute may be used with most elements.
  9024. onmousemove = script
  9025.      The onmousemove event occurs when the pointing device is moved over an
  9026.      element. This attribute may be used with most elements.
  9027. onmouseout = script
  9028.      The onmouseout event occurs when the pointing device is moved away from
  9029.      an element. This attribute may be used with most elements.
  9030. onfocus = script
  9031.      The onfocus event occurs when an element receives focus either by the
  9032.      pointing device or by tabbing navigation. This attribute may be used
  9033.      with the following elements: LABEL, INPUT, SELECT, TEXTAREA, and
  9034.      BUTTON.
  9035. onblur = script
  9036.      The onblur event occurs when an element loses focus either by the
  9037.      pointing device or by tabbing navigation. It may be used with the same
  9038.      elements as onfocus.
  9039. onkeypress = script
  9040.      The onkeypress event occurs when a key is pressed and released over an
  9041.      element. This attribute may be used with most elements.
  9042. onkeydown = script
  9043.      The onkeydown event occurs when a key is pressed down over an element.
  9044.      This attribute may be used with most elements.
  9045. onkeyup = script
  9046.      The onkeyup event occurs when a key is released over an element. This
  9047.      attribute may be used with most elements.
  9048. onsubmit = script
  9049.      The onsubmit event occurs when a form is submitted. It only applies to
  9050.      the FORM element.
  9051. onreset = script
  9052.      The onreset event occurs when a form is reset. It only applies to the
  9053.      FORM element.
  9054. onselect = script
  9055.      The onselect event occurs when a user selects some text in a text
  9056.      field. This attribute may be used with the INPUT and TEXTAREA elements.
  9057. onchange = script
  9058.      The onchange event occurs when a control loses the input focus and its
  9059.      value has been modified since gaining focus. This attribute applies to
  9060.      the following elements: INPUT, SELECT, and TEXTAREA.
  9061.  
  9062. It is possible to associate an action with a certain number of events that
  9063. occur when a user interacts with a user agent. Each of the "intrinsic
  9064. events" listed above takes a value that is a script. The script is executed
  9065. whenever the event occurs for that element.
  9066.  
  9067. Control elements such as INPUT, SELECT, BUTTON, TEXTAREA, and LABEL all
  9068. respond to certain intrinsic events. When these elements do not appear
  9069. within a form, they may be used to augment the graphical user interface of
  9070. the document.
  9071.  
  9072. For instance, designers may want to include press buttons in their documents
  9073. that do not submit a form but still communicate with a server when they are
  9074. activated.
  9075.  
  9076. The following examples show some possible control and user interface
  9077. behavior based on intrinsic events.
  9078.  
  9079. In the following example, userName is a required text field. When a user
  9080. attempts to leave the field, the OnBlur event calls a JavaScript function to
  9081. confirm that userName has an acceptable value.
  9082.  
  9083. <INPUT NAME="userName" onBlur="validUserName(this.value)">
  9084.  
  9085. Here is another JavaScript example:
  9086.  
  9087. <INPUT NAME="num"
  9088.     onChange="if (!checkNum(this.value, 1, 10))
  9089.         {this.focus();this.select();} else {thanks()}"
  9090.     VALUE="0">
  9091.  
  9092. Here is a VBScript example of an event handler for a text field:
  9093.  
  9094.     <INPUT name="edit1" size="50">
  9095.     <SCRIPT type="text/vbscript">
  9096.       Sub edit1_changed()
  9097.         If edit1.value = "abc" Then
  9098.           button1.enabled = True
  9099.         Else
  9100.           button1.enabled = False
  9101.         End If
  9102.       End Sub
  9103.     </SCRIPT>
  9104.  
  9105. Here is the same example using Tcl:
  9106.  
  9107.     <INPUT name="edit1" size="50">
  9108.     <SCRIPT type="text/tcl">
  9109.       proc edit1_changed {} {
  9110.         if {[edit value] == abc} {
  9111.           button1 enable 1
  9112.         } else {
  9113.           button1 enable 0
  9114.         }
  9115.       }
  9116.       edit1 onChange edit1_changed
  9117.     </SCRIPT>
  9118.  
  9119. Here is a JavaScript example for event binding within a script. First,
  9120. here's a simple click handler:
  9121.  
  9122.  
  9123. <BUTTON type="button" name="mybutton" value="10">
  9124. <SCRIPT type="text/javascript">
  9125.       function my_onclick() {
  9126.          . . .
  9127.       }
  9128.     document.form.mybutton.onclick = my_onclick
  9129.  </SCRIPT>
  9130.  </BUTTON>
  9131.  
  9132. Here's a more interesting window handler:
  9133.  
  9134.  
  9135. <SCRIPT type="text/javascript">
  9136.       function my_onload() {
  9137.          . . .
  9138.       }
  9139.  
  9140.       var win = window.open("some/other/URL")
  9141.       if (win) win.onload = my_onload
  9142. </SCRIPT>
  9143.  
  9144. In Tcl this looks like:
  9145.  
  9146.  <SCRIPT type="text/tcl">
  9147.      proc my_onload {} {
  9148.        . . .
  9149.      }
  9150.      set win [window open "some/other/URL"]
  9151.      if {$win != ""} {
  9152.          $win onload my_onload
  9153.      }
  9154.  </SCRIPT>
  9155.  
  9156. Note that "document.write" or equivalent statements in intrinsic event
  9157. handlers create and write to a new document rather than modifying the
  9158. current one.
  9159.  
  9160. Parsing of intrinsic event scripts
  9161.  
  9162. The script attributes for intrinsic events are defined as CDATA. The SGML
  9163. processing of CDATA attribute values requires that (1) entity replacement
  9164. occur within the attribute value; and (2) that the attribute value be
  9165. delimited by matching pairs of double quotes (") or single quotes (').
  9166.  
  9167. Given these lexical restrictions, the delimiters ('), ("), "&", and "&#" may
  9168. not occur freely in the value of a script attribute. To resolve this issue,
  9169. we recommend that script event handler attributes always use (") delimiters
  9170. and that occurrences of (") and "&" inside an event handler attribute be
  9171. written as follows:
  9172.  
  9173.     '"'  should be written as """ or as """
  9174.     '&'  should be written as "&"  or as "&"
  9175.  
  9176. Thus, for example, one could write:
  9177.  
  9178.  <INPUT name="num" value="0"
  9179.  onChange="if (compare(this.value, "help")) {gethelp()}">
  9180.  
  9181. SGML permits (') to be included in attribute strings quoted by ("), and vice
  9182. versa. The following is therefore correct:
  9183.  
  9184. "this is 'fine'" and 'so is "this"'
  9185.  
  9186. Dynamic modification of documents
  9187.  
  9188. Scripts that are executed when a document is loaded may be able to modify
  9189. the document's contents dynamically. The ability to do so depends on the
  9190. scripting language itself (e.g., the "document.write" statement in the HTML
  9191. object model supported by some vendors).
  9192.  
  9193. The dynamic modification of a document may be modeled as follows:
  9194.  
  9195.   1. All SCRIPT elements are evaluated in order as the document is loaded.
  9196.   2. All script constructs within a given SCRIPT element that generate SGML
  9197.      CDATA are evaluted. Their combined generated text is inserted in the
  9198.      document in place of the SCRIPT element.
  9199.   3. The generated CDATA is re-evaluated.
  9200.  
  9201. HTML documents are constrained to conform to the HTML DTD both before and
  9202. after processing any SCRIPT elements.
  9203.  
  9204. The following example illustrates how scripts may modify a document
  9205. dynamically. The following script:
  9206.  
  9207.  <TITLE>Test Document</TITLE>
  9208.  <SCRIPT type="text/javascript">
  9209.      document.write("<p><b>Hello World!<\/b>")
  9210.  </SCRIPT>
  9211.  
  9212. Has the same effect as this HTML markup:
  9213.  
  9214.  <TITLE>Test Document</TITLE>
  9215.  <P><B>Hello World!</B>
  9216.  
  9217. Designing documents for user agents that don't support scripting
  9218.  
  9219. The following sections discuss issues about lack of support for scripting
  9220. that authors should also consider when designing good HTML documents.
  9221.  
  9222. The NOSCRIPT element
  9223.  
  9224. <!ELEMENT NOSCRIPT - - (%block)>
  9225.  
  9226. Start tag: required, End tag: required
  9227.  
  9228. The NOSCRIPT element allows authors to provide alternate content when a
  9229. script is not executed. The content of a NOSCRIPT element should only
  9230. rendered by a script-aware user agent in the following cases:
  9231.  
  9232.    * The user agent is configured not to evaluate scripts.
  9233.    * The user agent doesn't support a scripting language invoked by a SCRIPT
  9234.      element earlier in the document.
  9235.  
  9236. User agents that do not support client-side scripts must render this
  9237. element's contents.
  9238.  
  9239. In the following example, a user agent that executes the SCRIPT will include
  9240. some dynamically created data in the document. If the user agent doesn't
  9241. support scripts, the user may still retrieve the data through a link.
  9242.  
  9243. <SCRIPT type="text/tcl">
  9244.  ...some Tcl script to insert data...
  9245. </SCRIPT>
  9246. <NOSCRIPT>
  9247.  <P>To access the data, click <A href="http://someplace.com/data">here.</A>
  9248. </NOSCRIPT>
  9249.  
  9250. Commenting out scripts
  9251.  
  9252. User agents that don't recognize the SCRIPT element will likely render that
  9253. element's contents as text. Some scripting engines, including those for
  9254. languages JavaScript, VBScript, and Tcl allow the script statements to be
  9255. enclosed in an SGML comment. User agents that don't recognize the SCRIPT
  9256. element will thus ignore the comment while smart scripting engines will
  9257. understand that the script in comments should be executed.
  9258.  
  9259. Another solution to the problem is to keep scripts in external documents and
  9260. refer to them with the src attribute.
  9261.  
  9262. Commenting scripts in JavaScript
  9263. The JavaScript engine allows the string "<!--" to occur at the start of a
  9264. SCRIPT element, and ignores further characters until the end of the line.
  9265. JavaScript interprets "//" as starting a comment extending to the end of the
  9266. current line. This is needed to hide the string "-->" from the JavaScript
  9267. parser.
  9268.  
  9269. <SCRIPT type="text/javascript">
  9270. <!--  to hide script contents from old browsers
  9271.   function square(i) {
  9272.     document.write("The call passed ", i ," to the function.","<BR>")
  9273.     return i * i
  9274.   }
  9275.   document.write("The function returned ",square(5),".")
  9276. // end hiding contents from old browsers  -->
  9277. </SCRIPT>
  9278.  
  9279. Commenting scripts in VBScript
  9280. In VBScript, a single quote character causes the rest of the current line to
  9281. be treated as a comment. It can therefore be used to hide the string "-->"
  9282. from VBScript, for instance:
  9283.  
  9284.    <SCRIPT type="text/vbscript">
  9285.      <!--
  9286.        Sub foo()
  9287.         ...
  9288.        End Sub
  9289.      ' -->
  9290.     </SCRIPT>
  9291.  
  9292. Commenting scripts in TCL
  9293. In Tcl, the "#" character comments out the rest of the line:
  9294.  
  9295. <SCRIPT type="text/tcl">
  9296. <!--  to hide script contents from old browsers
  9297.   proc square {i} {
  9298.     document write "The call passed $i to the function.<BR>"
  9299.     return [expr $i * $i]
  9300.   }
  9301.   document write "The function returned [square 5]."
  9302. # end hiding contents from old browsers  -->
  9303. </SCRIPT>
  9304.  
  9305. Note: Some browsers close comments on the first ">" character, so to hide
  9306. script content from such browsers, you can transpose operands for relational
  9307. and shift operators (e.g., use "y < x" rather than "x > y") or use scripting
  9308. language-dependent escapes for ">".
  9309.  
  9310.                     SGML reference information for HTML
  9311.  
  9312. Contents
  9313.  
  9314.   1. Document Validation
  9315.   2. Sample SGML catalog
  9316.  
  9317. The following sections contain the formal SGML definition of HTML 4.0,
  9318. including the SGML declaration and the Document Type Definition (DTD), as
  9319. well as a sample SGML catalog.
  9320.  
  9321. Document Validation
  9322.  
  9323. Many authors rely on a limited set of browsers to check on the documents
  9324. they produce, assuming that if the browsers can render their documents they
  9325. are valid. Unfortunately, this is a very ineffective means of verifying a
  9326. document's validity precisely because browsers are designed to cope with
  9327. invalid documents by rendering them as well as they can to avoid frustrating
  9328. users.
  9329.  
  9330. The following sample SGML catalog can be used with an SGML parser, such as
  9331. nsgmls, to verify that HTML documents conform to the HTML 4.0 DTD. It
  9332. assumes that the DTD has been saved as the file "HTML4.dtd" and that the
  9333. entities are in the files "HTMLlat1.ent", "HTMLsymbol.ent" and
  9334. "HTMLspecial.ent". See your validation tool documentation for further
  9335. details.
  9336.  
  9337. Beware that such validation, although useful and highly recommended, does
  9338. not guarantee that a document fully conforms to the HTML 4.0 specification.
  9339. This is because an SGML parser relies solely on the given SGML DTD which
  9340. does not express all aspects of a valid HTML 4.0 document. Specifically, an
  9341. SGML parser ensures that the syntax, the structure, the list of elements and
  9342. their attributes are valid. But for instance, it cannot catch errors such as
  9343. setting the width attribute of an IMG element to an invalid value (i.e.,
  9344. "foo", "12.5", or "25%"). Although the specification restricts the value for
  9345. this attribute to an "integer representing a length in pixels", the DTD only
  9346. defines it to be CDATA, which actually allows any value. Only a specialized
  9347. program could capture the complete specification of HTML 4.0.
  9348.  
  9349. Nevertheless, this type of validation is still highly recommended since it
  9350. permits the detection of a large set of errors that make documents invalid.
  9351.  
  9352. Sample SGML catalog
  9353.  
  9354. PUBLIC "-//W3C//DTD HTML 4.0 Draft//EN" HTML4.dtd
  9355. PUBLIC "-//W3C//DTD HTML 4.0 Final//EN" HTML4.dtd
  9356. PUBLIC "-//W3C//DTD HTML 4.0//EN" HTML4.dtd
  9357. PUBLIC "-//W3C//ENTITIES Latin1//EN//HTML" ISOlat1.ent
  9358. PUBLIC "-//W3C//ENTITIES Special//EN//HTML" HTMLmisc.ent
  9359. PUBLIC "-//W3C//ENTITIES Symbols//EN//HTML" HTMLsym.ent
  9360.  
  9361.                               SGML Declaration
  9362.  
  9363. Contents
  9364.  
  9365.   1. The Document Character Set
  9366.        1. Data transfer
  9367.   2. The SGML Declaration
  9368.  
  9369. The Document Character Set
  9370.  
  9371. The HTML 4.0 document character set, in the SGML sense, is the Universal
  9372. Character Set (UCS) of [ISO10646]. Currently, this is code-by-code identical
  9373. with the [UNICODE] standard.
  9374.  
  9375. Data transfer
  9376.  
  9377. When HTML text is transmitted directly in UCS-2 (charset="UNICODE-1-1"), one
  9378. must address the question of byte order: does the high-order byte of each
  9379. two-byte character come first or second? This specification recommends that
  9380. the UCS-2 be transmitted in big-endian byte order (high order byte first),
  9381. which corresponds both to the established network byte order for two-byte
  9382. quantities and to the Unicode ([UNICODE]) recommendation for serialized text
  9383. data. Furthermore, to maximize chances of proper interpretation, it is
  9384. recommended that documents transmitted as UCS-2 always begin with a
  9385. ZERO-WIDTH NON-BREAKING SPACE character (hexadecimal FEFF) which, when
  9386. byte-reversed becomes number FFFE, a character guaranteed to be never
  9387. assigned. Thus, a user-agent receiving an FFFE as the first octets of a text
  9388. would know that bytes have to be reversed for the remainder of the text.
  9389.  
  9390. The UTF-1 transformation format of [ISO10646] (registered by IANA as
  9391. ISO-10646-UTF-1), should not be used.
  9392.  
  9393. The SGML Declaration
  9394.  
  9395.    <!SGML  "ISO 8879:1986"
  9396.    --
  9397.         SGML Declaration for HyperText Markup Language version 4.0
  9398.  
  9399.         With support for Unicode UCS-4 and increased limits
  9400.         for tag and literal lengths etc.
  9401.    --
  9402.  
  9403.    CHARSET
  9404.             BASESET  "ISO Registration Number 177//CHARSET
  9405.                       ISO/IEC 10646-1:1993 UCS-4 with
  9406.                       implementation level 3//ESC 2/5 2/15 4/6"
  9407.             DESCSET  0   9     UNUSED
  9408.                      9   2     9
  9409.                      11  2     UNUSED
  9410.                      13  1     13
  9411.                      14  18    UNUSED
  9412.                      32  95    32
  9413.                      127 1     UNUSED
  9414.                      128 32    UNUSED
  9415.                      160 2147483486 160
  9416.    --
  9417.        In ISO 10646, the positions with hexadecimal
  9418.        values 0000D800 - 0000DFFF, used in the UTF-16
  9419.        encoding of UCS-4, are reserved, as well as the last
  9420.        two code values in each plane of UCS-4, i.e. all
  9421.        values of the hexadecimal form xxxxFFFE or xxxxFFFF.
  9422.        These code values or the corresponding numeric
  9423.        character references must not be included when
  9424.        generating a new HTML document, and they should be
  9425.        ignored if encountered when processing a HTML
  9426.        document.
  9427.    --
  9428.  
  9429.    CAPACITY        SGMLREF
  9430.                    TOTALCAP        150000
  9431.                    GRPCAP          150000
  9432.              ENTCAP         150000
  9433.  
  9434.    SCOPE    DOCUMENT
  9435.    SYNTAX
  9436.             SHUNCHAR CONTROLS 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
  9437.               17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 127
  9438.             BASESET  "ISO 646IRV:1991//CHARSET
  9439.                       International Reference Version
  9440.                       (IRV)//ESC 2/8 4/2"
  9441.             DESCSET  0 128 0
  9442.  
  9443.             FUNCTION
  9444.                      RE            13
  9445.                      RS            10
  9446.                      SPACE         32
  9447.                      TAB SEPCHAR    9
  9448.  
  9449.             NAMING   LCNMSTRT ""
  9450.                      UCNMSTRT ""
  9451.                      LCNMCHAR ".-"  -- ?include "~/_" for URLs? --
  9452.                      UCNMCHAR ".-"
  9453.                      NAMECASE GENERAL YES
  9454.                               ENTITY  NO
  9455.             DELIM    GENERAL  SGMLREF
  9456.                      SHORTREF SGMLREF
  9457.             NAMES    SGMLREF
  9458.             QUANTITY SGMLREF
  9459.                      ATTSPLEN 65536   -- These are the largest values --
  9460.                      LITLEN   65536   -- permitted in the declaration --
  9461.                      NAMELEN  65536   -- Avoid fixed limits in actual --
  9462.                      PILEN    65536   -- implementations of HTML UA's --
  9463.                      TAGLVL   100
  9464.                      TAGLEN   65536
  9465.                      GRPGTCNT 150
  9466.                      GRPCNT   64
  9467.  
  9468.    FEATURES
  9469.      MINIMIZE
  9470.        DATATAG  NO
  9471.        OMITTAG  YES
  9472.        RANK     NO
  9473.        SHORTTAG YES
  9474.      LINK
  9475.        SIMPLE   NO
  9476.        IMPLICIT NO
  9477.        EXPLICIT NO
  9478.      OTHER
  9479.        CONCUR   NO
  9480.        SUBDOC   NO
  9481.        FORMAL   YES
  9482.    >
  9483.  
  9484.                           Document Type Definition
  9485.  
  9486. <!--
  9487.         This is an EXPERIMENTAL version of HTML 4.0 that
  9488.         extends HTML 3.2 to add support for proposals under review by
  9489.         the W3C HTML Working Group, including style sheets, scripting,
  9490.         the object tag, internationalization and some extensions to
  9491.         forms for improved accessibility by people with disabilities.
  9492.         The frame tags have been added in acknowledgement of their
  9493.         widespread deployment.
  9494.  
  9495.             Draft: $Date: 1997/07/08 10:47:55 $
  9496.  
  9497.             Authors:
  9498.                 Dave Raggett <dsr@w3.org>
  9499.                 Arnaud Le Hors <lehors@w3.org>
  9500.  
  9501.         This is work in progress, subject to change at any time.
  9502.         It does not imply endorsement by, or the consensus of,
  9503.         either W3C or members of the HTML working group. Further
  9504.         information about HTML 4.0 is available at:
  9505.  
  9506.             http://www.w3.org/TR/WD-html40-970708/.
  9507. -->
  9508. <!ENTITY % HTML.Version "http://www.w3.org/TR/WD-html40-970708/HTML4.dtd"
  9509.   -- Typical usage:
  9510.  
  9511.     <!DOCTYPE HTML SYSTEM "http://www.w3.org/TR/WD-html40-970708/HTML4.dtd">
  9512.     <html>
  9513.     ...
  9514.     </html>
  9515.   --
  9516. >
  9517.  
  9518. <!--================== Imported Names ====================================-->
  9519.  
  9520. <!ENTITY % ContentType "CDATA"
  9521.     -- an Internet media type, as per [RFC2045]
  9522.     -->
  9523.  
  9524. <!ENTITY % URL "CDATA"
  9525.     -- a Uniform Resource Locator,
  9526.        see [RFC1808] and [RFC1738]
  9527.     -->
  9528.  
  9529. <!ENTITY % Script "CDATA" -- scriptlet -->
  9530.  
  9531. <!-- Parameter Entities -->
  9532.  
  9533. <!ENTITY % head.misc "SCRIPT|STYLE|META|LINK" -- repeatable head elements -->
  9534.  
  9535. <!ENTITY % heading "H1|H2|H3|H4|H5|H6">
  9536.  
  9537. <!ENTITY % list "UL | OL |  DIR | MENU">
  9538.  
  9539. <!ENTITY % preformatted "PRE">
  9540.  
  9541. <!--================ Character mnemonic entities =========================-->
  9542.  
  9543. <!ENTITY % HTMLlat1 PUBLIC
  9544.    "-//W3C//ENTITIES Latin1//EN//HTML">
  9545. %HTMLlat1;
  9546.  
  9547. <!ENTITY % HTMLsymbol PUBLIC
  9548.    "-//W3C//ENTITIES Symbols//EN//HTML">
  9549. %HTMLsymbol;
  9550.  
  9551. <!ENTITY % HTMLspecial PUBLIC
  9552.    "-//W3C//ENTITIES Special//EN//HTML">
  9553. %HTMLspecial;
  9554.  
  9555. <!--=================== Generic Attributes ===============================-->
  9556.  
  9557. <!ENTITY % coreattrs
  9558.  "id          ID         #IMPLIED  -- document-wide unique id --
  9559.   class       CDATA      #IMPLIED  -- space separated list of classes --
  9560.   style       CDATA      #IMPLIED  -- associated style info --
  9561.   title       CDATA      #IMPLIED  -- advisory title/amplification --"
  9562.   >
  9563.  
  9564. <!ENTITY % i18n
  9565.  "lang        NAME       #IMPLIED  -- [RFC1766] language value --
  9566.   dir         (ltr|rtl)  #IMPLIED  -- direction for weak/neutral text --"
  9567.   >
  9568.  
  9569. <!ENTITY % events
  9570.  "onclick     %Script    #IMPLIED  -- the pointing device button was clicked --
  9571.   ondblclick  %Script    #IMPLIED  -- the pointing device button was double clicked --
  9572.   onmousedown %Script    #IMPLIED  -- the pointing device button was pressed down --
  9573.   onmouseup   %Script    #IMPLIED  -- the pointing device button was released --
  9574.   onmouseover %Script    #IMPLIED  -- the pointing device was moved over --
  9575.   onmousemove %Script    #IMPLIED  -- the pointing device was moved --
  9576.   onmouseout  %Script    #IMPLIED  -- the pointing device was moved away --
  9577.   onkeypress  %Script    #IMPLIED  -- a key was pressed and released --
  9578.   onkeydown   %Script    #IMPLIED  -- a key was pressed down --
  9579.   onkeyup     %Script    #IMPLIED  -- a key was released --"
  9580.   >
  9581.  
  9582. <!ENTITY % attrs "%coreattrs %i18n %events">
  9583.  
  9584. <!ENTITY % align "align (left|center|right|justify)  #IMPLIED"
  9585.                    -- default is left for ltr paragraphs, right for rtl --
  9586.   >
  9587.  
  9588. <!--=================== Text Markup ======================================-->
  9589.  
  9590. <!ENTITY % font
  9591.  "TT | I | B | U | S | STRIKE | BIG | SMALL">
  9592.  
  9593. <!ENTITY % phrase "EM | STRONG | DFN | CODE |
  9594.                    SAMP | KBD | VAR | CITE | ACRONYM">
  9595.  
  9596. <!ENTITY % special
  9597.    "A | IMG | APPLET | OBJECT | FONT | BASEFONT | BR | SCRIPT |
  9598.     MAP | Q | SUB | SUP | SPAN | BDO | IFRAME">
  9599.  
  9600. <!ENTITY % formctrl "INPUT | SELECT | TEXTAREA | LABEL | BUTTON">
  9601.  
  9602. <!-- %inline covers inline or "text-level" elements -->
  9603. <!ENTITY % inline "#PCDATA | %font | %phrase | %special | %formctrl">
  9604.  
  9605. <!ELEMENT (%font|%phrase) - - (%inline)*>
  9606. <!ATTLIST (%font|%phrase)
  9607.   %attrs;                          -- %coreattrs, %i18n, %events --
  9608.   >
  9609.  
  9610. <!-- subscripts and superscripts -->
  9611. <!ELEMENT (SUB|SUP) - - (%inline)*>
  9612. <!ATTLIST (SUB|SUP)
  9613.   %attrs;                          -- %coreattrs, %i18n, %events --
  9614.   >
  9615.  
  9616. <!ELEMENT SPAN - - (%inline)*     -- generic language/style container -->
  9617. <!ATTLIST SPAN
  9618.   %attrs;                          -- %coreattrs, %i18n, %events --
  9619.   >
  9620.  
  9621. <!-- INS/DEL are handled by inclusion on BODY -->
  9622. <!ELEMENT (INS|DEL) - - (%inline)* -- inserted/deleted text -->
  9623. <!ATTLIST (INS|DEL)
  9624.   %attrs                           -- %coreattrs, %i18n, %events --
  9625.   cite        %URL      #IMPLIED   -- info on reason for change --
  9626.   datetime    CDATA     #IMPLIED   -- when changed: ISO date format --
  9627.   >
  9628.  
  9629. <!ELEMENT BDO - - (%inline)*      -- I18N BiDi over-ride -->
  9630. <!ATTLIST BDO
  9631.   lang        NAME       #IMPLIED  -- [RFC1766] language value --
  9632.   dir         (ltr|rtl)  #REQUIRED -- directionality --
  9633.   >
  9634.  
  9635. <!ELEMENT BASEFONT - O EMPTY>
  9636. <!ATTLIST BASEFONT
  9637.   size        CDATA      #REQUIRED -- base font size for FONT elements --
  9638.   color       CDATA      #IMPLIED  -- #RRGGBB in hex, e.g. red: "#FF0000" --
  9639.   face        CDATA      #IMPLIED  -- comma separated list of font names --
  9640.   >
  9641.  
  9642. <!ELEMENT FONT - - (%inline)*   -- local change to font -->
  9643. <!ATTLIST FONT
  9644.   size        CDATA      #IMPLIED  -- [+]nn e.g. size="+1", size=4 --
  9645.   color       CDATA      #IMPLIED  -- #RRGGBB in hex, e.g. red: "#FF0000" --
  9646.   face        CDATA      #IMPLIED  -- comma separated list of font names --
  9647.   >
  9648.  
  9649. <!ELEMENT BR - O EMPTY          -- forced line break -->
  9650. <!ATTLIST BR
  9651.   %coreattrs;                      -- id, class, style, title --
  9652.   clear (left|all|right|none) none -- control of text flow --
  9653.   >
  9654.  
  9655. <!--================== HTML content models ===============================-->
  9656.  
  9657. <!--
  9658.     HTML has two basic content models:
  9659.  
  9660.         %inline     character level elements and text strings
  9661.         %block      block-like elements e.g. paragraphs and lists
  9662. -->
  9663.  
  9664. <!ENTITY % blocklevel
  9665.      "P | %heading | %list | %preformatted | DL | DIV | CENTER |
  9666.       NOSCRIPT | NOFRAMES | BLOCKQUOTE | FORM | ISINDEX | HR |
  9667.       TABLE | FIELDSET | ADDRESS">
  9668.  
  9669. <!--=================== Document Body ====================================-->
  9670.  
  9671. <!ENTITY % block "(%blocklevel | %inline)*">
  9672.  
  9673. <!ENTITY % Color "CDATA" -- a color using sRGB: #RRGGBB as Hex values -->
  9674.  
  9675. <!-- There are also 16 widely known color names with their sRGB values:
  9676.  
  9677.     Black  = #000000    Green  = #008000
  9678.     Silver = #C0C0C0    Lime   = #00FF00
  9679.     Gray   = #808080    Olive  = #808000
  9680.     White  = #FFFFFF    Yellow = #FFFF00
  9681.     Maroon = #800000    Navy   = #000080
  9682.     Red    = #FF0000    Blue   = #0000FF
  9683.     Purple = #800080    Teal   = #008080
  9684.     Fuchsia= #FF00FF    Aqua   = #00FFFF
  9685.  -->
  9686.  
  9687. <!ENTITY % bodycolors "
  9688.   bgcolor %Color #IMPLIED
  9689.   text  %Color   #IMPLIED
  9690.   link  %Color   #IMPLIED
  9691.   vlink %Color   #IMPLIED
  9692.   alink %Color   #IMPLIED
  9693.   ">
  9694.  
  9695. <!ELEMENT BODY O O  (%block) -(BODY) +(INS|DEL)>
  9696. <!ATTLIST BODY
  9697.   %attrs;                          -- %coreattrs, %i18n, %events --
  9698.   background  %URL       #IMPLIED  -- texture tile for document background --
  9699.   %bodycolors;                     -- bgcolor, text, link, vlink, alink --
  9700.   onload      %Script    #IMPLIED  -- the document has been loaded --
  9701.   onunload    %Script    #IMPLIED  -- the document has been removed --
  9702.   >
  9703.  
  9704. <!ELEMENT ADDRESS - - ((%inline;) | P)*>
  9705. <!ATTLIST ADDRESS
  9706.   %attrs;                          -- %coreattrs, %i18n, %events --
  9707.   >
  9708.  
  9709. <!ELEMENT DIV - - %block>
  9710. <!ATTLIST DIV
  9711.   %attrs;                          -- %coreattrs, %i18n, %events --
  9712.   %align;                          -- align, text alignment --
  9713.   >
  9714.  
  9715. <!-- CENTER is a shorthand for DIV with ALIGN=CENTER -->
  9716. <!ELEMENT CENTER - - %block>
  9717. <!ATTLIST CENTER
  9718.   %attrs;                          -- %coreattrs, %i18n, %events --
  9719.   >
  9720.  
  9721. <!--================== The Anchor Element ================================-->
  9722.  
  9723. <!ENTITY % Shape "(rect|circle|poly|default)">
  9724. <!ENTITY % Coords "CDATA" -- comma separated list of numbers -->
  9725.  
  9726. <!ELEMENT A - - (%inline)* -(A)>
  9727. <!ATTLIST A
  9728.   %attrs;                          -- %coreattrs, %i18n, %events --
  9729.   charset     CDATA      #IMPLIED  -- char encoding of linked resource --
  9730.   name        CDATA      #IMPLIED  -- named link end --
  9731.   href        %URL       #IMPLIED  -- URL for linked resource --
  9732.   target      CDATA      #IMPLIED  -- where to render resource --
  9733.   rel         CDATA      #IMPLIED  -- forward link types --
  9734.   rev         CDATA      #IMPLIED  -- reverse link types --
  9735.   accesskey   CDATA      #IMPLIED  -- accessibility key character --
  9736.   shape       %Shape     rect      -- for use with OBJECT SHAPES --
  9737.   coords      %Coords    #IMPLIED  -- for use with OBJECT SHAPES --
  9738.   tabindex    NUMBER     #IMPLIED  -- position in tabbing order --
  9739.   >
  9740.  
  9741. <!--================== Client-side image maps ============================-->
  9742.  
  9743. <!-- These can be placed in the same document or grouped in a
  9744.      separate document although this isn't yet widely supported -->
  9745.  
  9746. <!ELEMENT MAP - - (AREA)*>
  9747. <!ATTLIST MAP
  9748.   %coreattrs;                      -- id, class, style, title --
  9749.   name        CDATA     #IMPLIED
  9750.   >
  9751.  
  9752. <!ELEMENT AREA - O EMPTY>
  9753. <!ATTLIST AREA
  9754.   shape       %Shape    rect      -- controls interpretation of coords --
  9755.   coords      %Coords   #IMPLIED  -- comma separated list of values --
  9756.   href        %URL      #IMPLIED  -- this region acts as hypertext link --
  9757.   target      CDATA     #IMPLIED  -- where to render linked resource --
  9758.   nohref      (nohref)  #IMPLIED  -- this region has no action --
  9759.   alt         CDATA     #REQUIRED -- description for text only browsers --
  9760.   tabindex    NUMBER    #IMPLIED  -- position in tabbing order --
  9761.   >
  9762.  
  9763. <!--================== The LINK Element ==================================-->
  9764.  
  9765. <!--
  9766.   Relationship values can be used in principle:
  9767.  
  9768.    a) for document specific toolbars/menus when used
  9769.       with the LINK element in document head e.g.
  9770.         start, contents, previous, next, index, end, help
  9771.    b) to link to a separate style sheet (rel=stylesheet)
  9772.    c) to make a link to a script (rel=script)
  9773.    d) by stylesheets to control how collections of
  9774.       html nodes are rendered into printed documents
  9775.    e) to make a link to a printable version of this document
  9776.       e.g. a postscript or pdf version (rel=print)
  9777. -->
  9778.  
  9779. <!ELEMENT LINK - O EMPTY>
  9780. <!ATTLIST LINK
  9781.   %attrs;                          -- %coreattrs, %i18n, %events --
  9782.   href        %URL       #IMPLIED  -- URL for linked resource --
  9783.   rel         CDATA      #IMPLIED  -- forward link types --
  9784.   rev         CDATA      #IMPLIED  -- reverse link types --
  9785.   type    %ContentType  #IMPLIED  -- advisory Internet content type --
  9786.   media       CDATA      #IMPLIED  -- for rendering on these media --
  9787.   target      CDATA      #IMPLIED  -- where to render linked resource --
  9788.   >
  9789.  
  9790. <!--=================== Images ===========================================-->
  9791.  
  9792. <!ENTITY % Length "CDATA" -- nn for pixels or nn% for percentage length -->
  9793. <!ENTITY % Pixels "CDATA" -- integer representing length in pixels -->
  9794.  
  9795. <!ENTITY % IAlign "(top|middle|bottom|left|right)"  -- center? -->
  9796.  
  9797. <!-- To avoid problems with text-only UAs you need to provide
  9798.      a description with ALT, and avoid server-side image maps -->
  9799. <!ELEMENT IMG - O EMPTY      --  Embedded image -->
  9800. <!ATTLIST IMG
  9801.   %attrs;                          -- %coreattrs, %i18n, %events --
  9802.   src         %URL       #REQUIRED -- URL of image to embed --
  9803.   alt         CDATA      #IMPLIED  -- description for text only browsers --
  9804.   align       %IAlign    #IMPLIED  -- vertical or horizontal alignment --
  9805.   height      %Pixels    #IMPLIED  -- suggested height in pixels --
  9806.   width       %Pixels    #IMPLIED  -- suggested width in pixels --
  9807.   border      %Pixels    #IMPLIED  -- suggested link border width --
  9808.   hspace      %Pixels    #IMPLIED  -- suggested horizontal gutter --
  9809.   vspace      %Pixels    #IMPLIED  -- suggested vertical gutter --
  9810.   usemap      %URL       #IMPLIED  -- use client-side image map --
  9811.   ismap       (ismap)    #IMPLIED  -- use server-side image map --
  9812.   >
  9813.  
  9814. <!-- USEMAP points to a MAP element which may be in this document
  9815.   or an external document, although the latter is not widely supported -->
  9816.  
  9817. <!--==================== OBJECT tag ======================================-->
  9818. <!-- PARAM elements should precede other content. SGML mixed content model
  9819.   technicality precludes specifying this formally ...
  9820. -->
  9821.  
  9822. <!ENTITY % OAlign "(texttop|middle|textmiddle|baseline|
  9823.                              textbottom|left|center|right)">
  9824.  
  9825. <!ELEMENT OBJECT - - (PARAM | %block)*>
  9826. <!ATTLIST OBJECT
  9827.   %attrs                           -- %coreattrs, %i18n, %events --
  9828.   declare     (declare)  #IMPLIED  -- declare but don't instantiate flag --
  9829.   classid     %URL       #IMPLIED  -- identifies an implementation --
  9830.   codebase    %URL       #IMPLIED  -- some systems need an additional URL --
  9831.   data        %URL       #IMPLIED  -- reference to object's data --
  9832.   type     %ContentType #IMPLIED  -- Internet content type for data --
  9833.   codetype %ContentType #IMPLIED  -- Internet content type for code --
  9834.   standby     CDATA      #IMPLIED  -- message to show while loading --
  9835.   align       %OAlign    #IMPLIED  -- positioning inside document --
  9836.   height      %Length    #IMPLIED  -- suggested height --
  9837.   width       %Length    #IMPLIED  -- suggested width --
  9838.   border      %Length    #IMPLIED  -- suggested link border width --
  9839.   hspace      %Length    #IMPLIED  -- suggested horizontal gutter --
  9840.   vspace      %Length    #IMPLIED  -- suggested vertical gutter --
  9841.   usemap      %URL       #IMPLIED  -- reference to image map --
  9842.   shapes      (shapes)   #IMPLIED  -- object has shaped hypertext links --
  9843.   name        %URL       #IMPLIED  -- submit as part of form --
  9844.   tabindex    NUMBER     #IMPLIED  -- position in tabbing order --
  9845.   >
  9846.  
  9847. <!ELEMENT PARAM - O EMPTY       -- named property value -->
  9848. <!ATTLIST PARAM
  9849.   name        CDATA      #REQUIRED -- property name --
  9850.   value       CDATA      #IMPLIED  -- property value --
  9851.   valuetype (DATA|REF|OBJECT) DATA -- How to interpret value --
  9852.   type        CDATA      #IMPLIED  -- Internet media type --
  9853.   >
  9854.  
  9855. <!--=================== Java APPLET tag ==================================-->
  9856. <!--
  9857.   One of code or object attributes must be present.
  9858.   Place PARAM elements before other content.
  9859. -->
  9860. <!ELEMENT APPLET - - (PARAM | %inline)*>
  9861. <!ATTLIST APPLET
  9862.   codebase    %URL       #IMPLIED   -- optional base URL for applet --
  9863.   archive     CDATA      #IMPLIED   -- comma separated archive list --
  9864.   code        CDATA      #IMPLIED   -- applet class file --
  9865.   object      CDATA      #IMPLIED   -- serialized applet file --
  9866.   alt         CDATA      #IMPLIED   -- description for text only browsers --
  9867.   name        CDATA      #IMPLIED   -- allows applets to find each other --
  9868.   width       %Pixels    #REQUIRED  -- suggested width in pixels --
  9869.   height      %Pixels    #REQUIRED  -- suggested height in pixels --
  9870.   align       %IAlign    #IMPLIED   -- vertical or horizontal alignment --
  9871.   hspace      %Pixels    #IMPLIED   -- suggested horizontal gutter --
  9872.   vspace      %Pixels    #IMPLIED   -- suggested vertical gutter --
  9873.   >
  9874.  
  9875. <!--=================== Horizontal Rule ==================================-->
  9876.  
  9877. <!ELEMENT HR - O EMPTY>
  9878. <!ATTLIST HR
  9879.   %coreattrs;                      -- id, class, style, title --
  9880.   %events;
  9881.   align (left|right|center) #IMPLIED
  9882.   noshade     (noshade)  #IMPLIED
  9883.   size        %Pixels    #IMPLIED
  9884.   width       %Length    #IMPLIED
  9885.   >
  9886.  
  9887. <!--=================== Paragraphs =======================================-->
  9888.  
  9889. <!ELEMENT P - O (%inline)*>
  9890. <!ATTLIST P
  9891.   %attrs;                          -- %coreattrs, %i18n, %events --
  9892.   %align;                          -- align, text alignment --
  9893.   >
  9894.  
  9895. <!--=================== Headings =========================================-->
  9896.  
  9897. <!--
  9898.   There are six levels of headings from H1 (the most important)
  9899.   to H6 (the least important).
  9900. -->
  9901.  
  9902. <!ELEMENT (%heading)  - -  (%inline;)*>
  9903. <!ATTLIST (%heading)
  9904.   %attrs;                          -- %coreattrs, %i18n, %events --
  9905.   %align;                          -- align, text alignment --
  9906.   >
  9907.  
  9908. <!--=================== Preformatted Text ================================-->
  9909.  
  9910. <!-- excludes markup for images and changes in font size -->
  9911. <!ENTITY % pre.exclusion "IMG|BIG|SMALL|SUB|SUP|FONT">
  9912.  
  9913. <!ELEMENT PRE - - (%inline)* -(%pre.exclusion)>
  9914. <!ATTLIST PRE
  9915.   %attrs;                          -- %coreattrs, %i18n, %events --
  9916.   width       NUMBER     #IMPLIED
  9917.   >
  9918.  
  9919. <!--===================== Inline Quotes ==================================-->
  9920.  
  9921. <!ELEMENT Q - - (%inline)*>
  9922. <!ATTLIST Q
  9923.   %attrs;                          -- %coreattrs, %i18n, %events --
  9924.   cite        %URL       #IMPLIED  -- URL for source document or msg --
  9925.   >
  9926.  
  9927. <!--=================== Block-like Quotes ================================-->
  9928.  
  9929. <!ELEMENT BLOCKQUOTE - - %block>
  9930. <!ATTLIST BLOCKQUOTE
  9931.   %attrs;                          -- %coreattrs, %i18n, %events --
  9932.   cite        %URL       #IMPLIED  -- URL for source document or msg --
  9933.   >
  9934.  
  9935. <!--=================== Lists ============================================-->
  9936.  
  9937. <!-- definition lists - DT for term, DD for its definition -->
  9938.  
  9939. <!ELEMENT DL - -  (DT|DD)+>
  9940. <!ATTLIST DL
  9941.   %attrs;                          -- %coreattrs, %i18n, %events --
  9942.   compact     (compact)  #IMPLIED  -- reduced interitem spacing --
  9943.   >
  9944.  
  9945. <!ELEMENT DT - O  (%inline)*>
  9946. <!ELEMENT DD - O  %block>
  9947. <!ATTLIST (DT|DD)
  9948.   %attrs                          -- %coreattrs, %i18n, %events --
  9949.   >
  9950.  
  9951. <!-- Ordered lists (OL) Numbering style
  9952.  
  9953.     1   arablic numbers     1, 2, 3, ...
  9954.     a   lower alpha         a, b, c, ...
  9955.     A   upper alpha         A, B, C, ...
  9956.     i   lower roman         i, ii, iii, ...
  9957.     I   upper roman         I, II, III, ...
  9958.  
  9959.     The style is applied to the sequence number which by default
  9960.     is reset to 1 for the first list item in an ordered list.
  9961.  
  9962.     This can't be expressed directly in SGML due to case folding.
  9963. -->
  9964.  
  9965. <!ENTITY % OLStyle "CDATA"      -- constrained to: [1|a|A|i|I] -->
  9966.  
  9967. <!ELEMENT OL - -  (LI)+>
  9968. <!ATTLIST OL -- ordered lists --
  9969.   %attrs;                          -- %coreattrs, %i18n, %events --
  9970.   type        %OLStyle   #IMPLIED  -- numbering style --
  9971.   compact     (compact)  #IMPLIED  -- reduced interitem spacing --
  9972.   start       NUMBER     #IMPLIED  -- starting sequence number --
  9973.   >
  9974.  
  9975. <!-- Unordered Lists (UL) bullet styles -->
  9976. <!ENTITY % ULStyle "disc|square|circle">
  9977.  
  9978. <!ELEMENT UL - -  (LI)+>
  9979. <!ATTLIST UL                    -- unordered lists --
  9980.   %attrs;                          -- %coreattrs, %i18n, %events --
  9981.   type        (%ULStyle) #IMPLIED  -- bullet style --
  9982.   compact     (compact)  #IMPLIED  -- reduced interitem spacing --
  9983.   >
  9984.  
  9985. <!ELEMENT (DIR|MENU) - -  (LI)+ -(%blocklevel)>
  9986. <!ATTLIST DIR
  9987.   %attrs;                          -- %coreattrs, %i18n, %events --
  9988.   compact     (compact)  #IMPLIED
  9989.   >
  9990. <!ATTLIST MENU
  9991.   %attrs;                          -- %coreattrs, %i18n, %events --
  9992.   compact     (compact)  #IMPLIED
  9993.   >
  9994.  
  9995. <!-- <DIR>              Directory list                  -->
  9996. <!-- <DIR COMPACT>      Compact list style              -->
  9997. <!-- <MENU>             Menu list                       -->
  9998. <!-- <MENU COMPACT>     Compact list style              -->
  9999.  
  10000. <!-- The type attribute can be used to change the bullet style
  10001.      in unordered lists and the numbering style in ordered lists -->
  10002.  
  10003. <!ENTITY % LIStyle "CDATA" -- constrained to: "(%ULStyle|%OLStyle)" -->
  10004.  
  10005. <!ELEMENT LI - O %block -- list item -->
  10006. <!ATTLIST LI
  10007.   %attrs;                          -- %coreattrs, %i18n, %events --
  10008.   type        %LIStyle   #IMPLIED  -- list item style --
  10009.   value       NUMBER     #IMPLIED  -- reset sequence number --
  10010.   >
  10011.  
  10012. <!--================ Forms ===============================================-->
  10013. <!ELEMENT FORM - - %block -(FORM)>
  10014. <!ATTLIST FORM
  10015.   %attrs;                          -- %coreattrs, %i18n, %events --
  10016.   action      %URL       #REQUIRED -- server-side form handler --
  10017.   method      (GET|POST) GET       -- HTTP method used to submit the form --
  10018.   enctype     %ContentType; "application/x-www-form-urlencoded"
  10019.   onsubmit    %Script    #IMPLIED  -- the form was submitted --
  10020.   onreset     %Script    #IMPLIED  -- the form was reset --
  10021.   target      CDATA      #IMPLIED  -- where to render result --
  10022.   accept-charset CDATA   #IMPLIED  -- list of supported charsets --
  10023.   >
  10024.  
  10025. <!-- Each label must not contain more than ONE field -->
  10026. <!ELEMENT LABEL - - (%inline)* -(LABEL) -- field label text -->
  10027. <!ATTLIST LABEL
  10028.   %attrs;                          -- %coreattrs, %i18n, %events --
  10029.   for         IDREF      #IMPLIED  -- matches field ID value --
  10030.   disabled    (disabled) #IMPLIED  -- control is unavailable in this context --
  10031.   accesskey   CDATA      #IMPLIED  -- accessibility key character --
  10032.   onfocus     %Script    #IMPLIED  -- the element got the focus --
  10033.   onblur      %Script    #IMPLIED  -- the element lost the focus --
  10034.   >
  10035.  
  10036. <!ENTITY % InputType
  10037.   "(TEXT | PASSWORD | CHECKBOX |
  10038.     RADIO | SUBMIT | RESET |
  10039.     FILE | HIDDEN | IMAGE | BUTTON)"
  10040.    >
  10041.  
  10042. <!-- HSPACE and VSPACE missing due to lack of widespread support -->
  10043. <!ELEMENT INPUT - O EMPTY>
  10044. <!ATTLIST INPUT
  10045.   %attrs;                          -- %coreattrs, %i18n, %events --
  10046.   type      %InputType   TEXT      -- what kind of widget is needed --
  10047.   name        CDATA      #IMPLIED  -- required for all but submit & reset --
  10048.   value       CDATA      #IMPLIED  -- required for radio and checkboxes --
  10049.   checked   (checked)    #IMPLIED  -- for radio buttons and check boxes --
  10050.   disabled  (disabled)   #IMPLIED  -- control is unavailable in this context --
  10051.   readonly  (readonly)   #IMPLIED  -- for text and passwd --
  10052.   size        CDATA      #IMPLIED  -- specific to each type of field --
  10053.   maxlength   NUMBER     #IMPLIED  -- max chars for text fields --
  10054.   src         %URL       #IMPLIED  -- for fields with images --
  10055.   alt         CDATA      #IMPLIED  -- description for text only browsers --
  10056.   usemap      %URL       #IMPLIED  -- use client-side image map --
  10057.   align       %IAlign    #IMPLIED  -- vertical or horizontal alignment --
  10058.   tabindex    NUMBER     #IMPLIED  -- position in tabbing order --
  10059.   onfocus     %Script    #IMPLIED  -- the element got the focus --
  10060.   onblur      %Script    #IMPLIED  -- the element lost the focus --
  10061.   onselect    %Script    #IMPLIED  -- some text was selected --
  10062.   onchange    %Script    #IMPLIED  -- the element value was changed --
  10063.   accept      CDATA      #IMPLIED  -- list of MIME types for file upload --
  10064.   >
  10065.  
  10066. <!ELEMENT SELECT - - (OPTION+)>
  10067. <!ATTLIST SELECT
  10068.   %attrs;                          -- %coreattrs, %i18n, %events --
  10069.   name        CDATA      #REQUIRED -- field name --
  10070.   size        NUMBER     #IMPLIED  -- rows visible --
  10071.   multiple  (multiple)   #IMPLIED  -- default is single selection --
  10072.   disabled  (disabled)   #IMPLIED  -- control is unavailable in this context --
  10073.   tabindex    NUMBER     #IMPLIED  -- position in tabbing order --
  10074.   onfocus     %Script    #IMPLIED  -- the element got the focus --
  10075.   onblur      %Script    #IMPLIED  -- the element lost the focus --
  10076.   onselect    %Script    #IMPLIED  -- some text was selected --
  10077.   onchange    %Script    #IMPLIED  -- the element value was changed --
  10078.   >
  10079.  
  10080. <!ELEMENT OPTION - O (#PCDATA)*>
  10081. <!ATTLIST OPTION
  10082.   %attrs;                          -- %coreattrs, %i18n, %events --
  10083.   selected  (selected)   #IMPLIED
  10084.   disabled  (disabled)   #IMPLIED  -- control is unavailable in this context --
  10085.   value       CDATA      #IMPLIED  -- defaults to element content --
  10086.   >
  10087.  
  10088. <!-- Multi-line text input field. -->
  10089. <!ELEMENT TEXTAREA - - (#PCDATA)*>
  10090. <!ATTLIST TEXTAREA
  10091.   %attrs;                          -- %coreattrs, %i18n, %events --
  10092.   name        CDATA      #REQUIRED
  10093.   rows        NUMBER     #REQUIRED
  10094.   cols        NUMBER     #REQUIRED
  10095.   disabled  (disabled)   #IMPLIED  -- control is unavailable in this context --
  10096.   readonly  (readonly)   #IMPLIED
  10097.   tabindex    NUMBER     #IMPLIED  -- position in tabbing order --
  10098.   onfocus     %Script    #IMPLIED  -- the element got the focus --
  10099.   onblur      %Script    #IMPLIED  -- the element lost the focus --
  10100.   onselect    %Script    #IMPLIED  -- some text was selected --
  10101.   onchange    %Script    #IMPLIED  -- the element value was changed --
  10102.   >
  10103.  
  10104. <!--
  10105.   #PCDATA is to solve the mixed content problem,
  10106.   per specification only whitespace is allowed there!
  10107.  -->
  10108. <!ELEMENT FIELDSET - - (#PCDATA,LEGEND,%block)>
  10109. <!ATTLIST FIELDSET
  10110.   %attrs;                          -- %coreattrs, %i18n, %events --
  10111.   >
  10112.  
  10113. <!ELEMENT LEGEND - - (%inline;)+>
  10114. <!ENTITY % LAlign "(top|bottom|left|right)">
  10115.  
  10116. <!ATTLIST LEGEND            -- fieldset legend --
  10117.   %attrs;                          -- %coreattrs, %i18n, %events --
  10118.   align       %LAlign;   #IMPLIED  -- relative to fieldset --
  10119.   accesskey   CDATA      #IMPLIED  -- accessibility key character --
  10120.   >
  10121.  
  10122. <!ELEMENT BUTTON - -
  10123.      (%inline | %blocklevel)* -(A | %formctrl | FORM | ISINDEX | FIELDSET)>
  10124. <!ATTLIST BUTTON
  10125.   %attrs;                          -- %coreattrs, %i18n, %events --
  10126.   name        CDATA      #IMPLIED  -- for scripting/forms as submit button --
  10127.   value       CDATA      #IMPLIED  -- gets passed to server when submitted --
  10128.   type    (submit|reset) #IMPLIED  -- for use as form submit/reset button --
  10129.   disabled   (disabled)  #IMPLIED  -- control is unavailable in this context --
  10130.   tabindex    NUMBER     #IMPLIED  -- position in tabbing order --
  10131.   onfocus     %Script    #IMPLIED  -- the element got the focus --
  10132.   onblur      %Script    #IMPLIED  -- the element lost the focus --
  10133.   >
  10134.  
  10135. <!--======================= Tables =======================================-->
  10136.  
  10137. <!-- IETF HTML table standard, see [RFC1942] -->
  10138.  
  10139. <!--
  10140.  The BORDER attribute sets the thickness of the frame around the
  10141.  table. The default units are screen pixels.
  10142.  
  10143.  The FRAME attribute specifies which parts of the frame around
  10144.  the table should be rendered. The values are not the same as
  10145.  CALS to avoid a name clash with the VALIGN attribute.
  10146.  
  10147.  The value "border" is included for backwards compatibility with
  10148.  <TABLE BORDER> which yields frame=border and border=implied
  10149.  For <TABLE BORDER=1> you get border=1 and frame=implied. In this
  10150.  case, it is appropriate to treat this as frame=border for backwards
  10151.  compatibility with deployed browsers.
  10152. -->
  10153. <!ENTITY % TFrame "(void|above|below|hsides|lhs|rhs|vsides|box|border)">
  10154.  
  10155. <!--
  10156.  The RULES attribute defines which rules to draw between cells:
  10157.  
  10158.  If RULES is absent then assume:
  10159.      "none" if BORDER is absent or BORDER=0 otherwise "all"
  10160. -->
  10161.  
  10162. <!ENTITY % TRules "(none | groups | rows | cols | all)">
  10163.  
  10164. <!-- horizontal placement of table relative to document -->
  10165. <!ENTITY % TAlign "(left|center|right)">
  10166.  
  10167. <!-- horizontal alignment attributes for cell contents -->
  10168. <!ENTITY % cellhalign
  10169.   "align (left|center|right|justify|char) #IMPLIED
  10170.    char       CDATA      #IMPLIED  -- alignment char, e.g. char=':' --
  10171.    charoff    CDATA      #IMPLIED  -- offset for alignment char --"
  10172.   >
  10173.  
  10174. <!-- vertical alignment attributes for cell contents -->
  10175. <!ENTITY % cellvalign
  10176.   "valign (top|middle|bottom|baseline) #IMPLIED"
  10177.   >
  10178.  
  10179. <!ELEMENT TABLE - - (CAPTION?, (COL*|COLGROUP*), THEAD?, TFOOT?, TBODY+)>
  10180. <!ELEMENT CAPTION - - (%inline;)+>
  10181. <!ELEMENT THEAD - O (TR+)>
  10182. <!ELEMENT TFOOT - O (TR+)>
  10183. <!ELEMENT TBODY O O (TR+)>
  10184. <!ELEMENT COLGROUP - O (col*)>
  10185. <!ELEMENT COL - O EMPTY>
  10186. <!ELEMENT TR - O (TH|TD)+>
  10187. <!ELEMENT (TH|TD) - O %block>
  10188.  
  10189. <!ATTLIST TABLE                 -- table element --
  10190.   %attrs;                          -- %coreattrs, %i18n, %events --
  10191.   align       %TAlign;   #IMPLIED  -- table position relative to window --
  10192.   bgcolor     %Color     #IMPLIED  -- background color for cells --
  10193.   width       CDATA      #IMPLIED  -- table width relative to window --
  10194.   cols        NUMBER     #IMPLIED  -- used for immediate display mode --
  10195.   border      CDATA      #IMPLIED  -- controls frame width around table --
  10196.   frame       %TFrame;   #IMPLIED  -- which parts of table frame to include --
  10197.   rules       %TRules;   #IMPLIED  -- rulings between rows and cols --
  10198.   cellspacing CDATA      #IMPLIED  -- spacing between cells --
  10199.   cellpadding CDATA      #IMPLIED  -- spacing within cells --
  10200.   >
  10201.  
  10202. <!ENTITY % CAlign "(top|bottom|left|right)">
  10203.  
  10204. <!ATTLIST CAPTION               -- table caption --
  10205.   %attrs;                          -- %coreattrs, %i18n, %events --
  10206.   align       %CAlign;   #IMPLIED  -- relative to table --
  10207.   >
  10208.  
  10209. <!--
  10210. COLGROUP groups a set of COL elements. It allows you to group
  10211. several columns together.
  10212. -->
  10213. <!ATTLIST COLGROUP
  10214.   %attrs;                          -- %coreattrs, %i18n, %events --
  10215.   span        NUMBER     1         -- default number of columns in group --
  10216.   width       CDATA      #IMPLIED  -- default width for enclosed COLs --
  10217.   %cellhalign;                     -- horizontal alignment in cells --
  10218.   %cellvalign;                     -- vertical alignment in cells --
  10219.   >
  10220.  
  10221. <!--
  10222.  COL elements define the alignment properties for cells in a given
  10223.  column or spanned columns. The WIDTH attribute specifies the
  10224.  width of the columns, e.g.
  10225.  
  10226.      width=64        width in screen pixels
  10227.      width=0.5*      relative width of 0.5
  10228. -->
  10229. <!ATTLIST COL                   -- column groups and properties --
  10230.   %attrs;                          -- %coreattrs, %i18n, %events --
  10231.   span        NUMBER     1         -- number of columns spanned by group --
  10232.   width       CDATA      #IMPLIED  -- column width specification --
  10233.   %cellhalign;                     -- horizontal alignment in cells --
  10234.   %cellvalign;                     -- vertical alignment in cells --
  10235.   >
  10236.  
  10237. <!--
  10238.     Use THEAD to duplicate headers when breaking table
  10239.     across page boundaries, or for static headers when
  10240.     TBODY sections are rendered in scrolling panel.
  10241.  
  10242.     Use TFOOT to duplicate footers when breaking table
  10243.     across page boundaries, or for static footers when
  10244.     TBODY sections are rendered in scrolling panel.
  10245.  
  10246.     Use multiple TBODY sections when rules are needed
  10247.     between groups of table rows.
  10248. -->
  10249. <!ATTLIST (THEAD|TBODY|TFOOT)   -- table section --
  10250.   %attrs;                          -- %coreattrs, %i18n, %events --
  10251.   %cellhalign;                     -- horizontal alignment in cells --
  10252.   %cellvalign;                     -- vertical alignment in cells --
  10253.   >
  10254.  
  10255. <!ATTLIST TR                    -- table row --
  10256.   %attrs;                          -- %coreattrs, %i18n, %events --
  10257.   %cellhalign;                     -- horizontal alignment in cells --
  10258.   %cellvalign;                     -- vertical alignment in cells --
  10259.   bgcolor     %Color     #IMPLIED  -- background color for row --
  10260.   >
  10261.  
  10262. <!ATTLIST (TH|TD)               -- header or data cell --
  10263.   %attrs;                          -- %coreattrs, %i18n, %events --
  10264.   axis        CDATA      #IMPLIED  -- defaults to cell content --
  10265.   axes        CDATA      #IMPLIED  -- list of axis names --
  10266.   nowrap      (nowrap)   #IMPLIED  -- suppress word wrap --
  10267.   bgcolor     %Color     #IMPLIED  -- cell background color --
  10268.   rowspan     NUMBER     1         -- number of rows spanned by cell --
  10269.   colspan     NUMBER     1         -- number of cols spanned by cell --
  10270.   %cellhalign;                     -- horizontal alignment in cells --
  10271.   %cellvalign;                     -- vertical alignment in cells --
  10272.   >
  10273.  
  10274. <!--================== Document Frames ===================================-->
  10275.  
  10276. <!ELEMENT FRAMESET - - ((FRAMESET|FRAME)+ & NOFRAMES?)>
  10277. <!ATTLIST FRAMESET
  10278.   -- absolute pixel values, percentages or relative scales. --
  10279.   rows        CDATA      #IMPLIED  -- if not given, default is 1 row --
  10280.   cols        CDATA      #IMPLIED  -- if not given, default is 1 column --
  10281.   onload      %Script    #IMPLIED  -- all the frames have been loaded  --
  10282.   onunload    %Script    #IMPLIED  -- all the frames have been removed --
  10283.   >
  10284.  
  10285. <!-- reserved frame names start with "_" otherwise starts with letter -->
  10286. <!ELEMENT FRAME - O EMPTY>
  10287. <!ATTLIST FRAME
  10288.   name        CDATA      #IMPLIED  -- name of frame for targetting --
  10289.   src         %URL       #IMPLIED  -- source of frame content --
  10290.   frameborder (1|0)      1         -- request frame borders? --
  10291.   marginwidth %Pixels    #IMPLIED  -- margin widths in pixels --
  10292.   marginheight %Pixels   #IMPLIED  -- margin height in pixels --
  10293.   noresize    (noresize) #IMPLIED  -- allow users to resize frames? --
  10294.   scrolling (yes|no|auto) auto     -- scrollbar or none --
  10295.   >
  10296.  
  10297. <!ELEMENT IFRAME - - %block>
  10298. <!ATTLIST IFRAME
  10299.   name        CDATA      #IMPLIED  -- name of frame for targetting --
  10300.   src         %URL       #IMPLIED  -- source of frame content --
  10301.   frameborder (1|0)      1         -- request frame borders? --
  10302.   marginwidth %Pixels    #IMPLIED  -- margin widths in pixels --
  10303.   marginheight %Pixels   #IMPLIED  -- margin height in pixels --
  10304.   scrolling (yes|no|auto) auto     -- scrollbar or none --
  10305.   align       %IAlign    #IMPLIED  -- vertical or horizontal alignment --
  10306.   height      %Length    #IMPLIED  -- suggested height --
  10307.   width       %Length    #IMPLIED  -- suggested width --
  10308.   >
  10309.  
  10310. <!--
  10311.  The following is quite complicated because of the mixed
  10312.  content model. However it's actually only meant to contain
  10313.  either BODY or %block.
  10314.  -->
  10315. <!ELEMENT NOFRAMES - -
  10316.  (#PCDATA,((BODY,#PCDATA)|
  10317.            (((%blocklevel)|%font|%phrase|%special|%formctrl),%block)))>
  10318.  
  10319. <!--================ Document Head =======================================-->
  10320. <!-- %head.misc defined earlier on as "SCRIPT | STYLE | META | LINK" -->
  10321. <!ENTITY % head.content "TITLE & ISINDEX? & BASE?">
  10322.  
  10323. <!ELEMENT HEAD O O  (%head.content) +(%head.misc)>
  10324. <!ATTLIST HEAD
  10325.   %i18n;                           -- lang, dir --
  10326.   profile     %URL       #IMPLIED  -- named dictionary of meta info --
  10327.   >
  10328.  
  10329. <!ELEMENT TITLE - -  (#PCDATA)* -(%head.misc)
  10330.     -- The TITLE element is not considered part of the flow of text.
  10331.        It should be displayed, for example as the page header or
  10332.        window title. Exactly one title is required per document.
  10333.     -->
  10334. <!ATTLIST TITLE %i18n>
  10335.  
  10336. <!ELEMENT ISINDEX - O EMPTY>
  10337. <!ATTLIST ISINDEX
  10338.   %coreattrs;                      -- id, class, style, title --
  10339.   %i18n;                           -- lang, dir --
  10340.   prompt      CDATA      #IMPLIED  -- prompt message -->
  10341.  
  10342. <!ELEMENT BASE - O EMPTY>
  10343. <!ATTLIST BASE
  10344.   href        %URL       #REQUIRED
  10345.   target      CDATA      #IMPLIED  -- where to render linked resource --
  10346.   >
  10347.  
  10348. <!ELEMENT META - O EMPTY        -- Generic Metainformation -->
  10349. <!ATTLIST META
  10350.   %i18n;                           -- lang, dir, for use with content string --
  10351.   http-equiv  NAME       #IMPLIED  -- HTTP response header name  --
  10352.   name        NAME       #IMPLIED  -- metainformation name --
  10353.   content     CDATA      #REQUIRED -- associated information --
  10354.   scheme      CDATA      #IMPLIED  -- select form of content --
  10355.   >
  10356.  
  10357. <!ELEMENT STYLE - - CDATA      -- style info -->
  10358. <!ATTLIST STYLE
  10359.   %i18n;                           -- lang, dir, for use with title --
  10360.   type        CDATA      #REQUIRED -- Internet content type
  10361.                                       for style language --
  10362.   media       CDATA      #IMPLIED  -- designed for use with these media --
  10363.   title       CDATA      #IMPLIED  -- advisory title --
  10364.   >
  10365.  
  10366.  
  10367. <!ELEMENT SCRIPT - - CDATA      -- script statements -->
  10368. <!ATTLIST SCRIPT
  10369.   type        CDATA      #IMPLIED  -- Internet content type for
  10370.                                       script language --
  10371.   language    CDATA      #IMPLIED  -- predefined script language name --
  10372.   src         %URL       #IMPLIED  -- URL for an external script --
  10373.   >
  10374.  
  10375. <!ELEMENT NOSCRIPT - - (%block)>
  10376.  
  10377. <!--================ Document Structure ==================================-->
  10378. <!ENTITY % version "version CDATA #FIXED '%HTML.Version;'">
  10379.  
  10380. <!ENTITY % html.content "HEAD, (FRAMESET|BODY)">
  10381.  
  10382. <!ELEMENT HTML O O (%html.content)>
  10383. <!ATTLIST HTML
  10384.   %version;
  10385.   %i18n;                           -- lang, dir --
  10386.   >
  10387.  
  10388.                           Named character entities
  10389.  
  10390. Contents
  10391.  
  10392.   1. Named entities for ISO 8859-1 characters
  10393.        1. The list of characters
  10394.   2. Named entities for symbols, mathematical symbols, and Greek letters
  10395.        1. The list of characters
  10396.   3. Named entities for markup-significant and internationalization
  10397.      characters
  10398.        1. The list of characters
  10399.  
  10400. A character entity is an SGML construct that references a character of the
  10401. document character set. The document character set for HTML is the Universal
  10402. Character Set (UCS) of [ISO10646]. This set is character-by-character
  10403. equivalent to Unicode 2.0 ([UNICODE]).
  10404.  
  10405. This version of HTML supports several sets of named character entities:
  10406.  
  10407.    * ISO 8859-1 (Latin-1) characters In accordance with section 14 of
  10408.      [RFC1866], the set of Latin-1 entities has been extended by this
  10409.      specification to cover the whole right part of ISO-8859-1 (all code
  10410.      positions with the high-order bit set), including the already commonly
  10411.      used  , © and ®. The names of the entities are taken from
  10412.      the appendices of SGML ([ISO8879]).
  10413.    * symbols, mathematical symbols, and Greek letters. These characters may
  10414.      be represented by glyphs in the Adobe font "Symbol".
  10415.    * arkup-significant and internationalization characters (e.g., for
  10416.      bidirectional text).
  10417.  
  10418. The following sections present the complete lists of named character
  10419. entities. Although by convention, [ISO10646] names are written with upper
  10420. case letters, we have converted them to lower case in this specification for
  10421. reasons of readability.
  10422.  
  10423. Named entities for ISO 8859-1 characters
  10424.  
  10425. The named character entities in this section produce characters whose
  10426. numeric equivalents should already be supported by conforming HTML 2.0 user
  10427. agents. Thus, the named character entity ÷ is a more convenient form
  10428. than ÷ for obtaining the division sign (≈).
  10429.  
  10430. To support these named entities, user agents need only recognize the entity
  10431. names and convert them to characters that lie within the repertoire of
  10432. [ISO88591].
  10433.  
  10434. Character 65533 (FFFD hexadecimal) is the last valid character in UCS-2.
  10435. 65534 (FFFE hexadecimal) is unassigned and reserved as the byte-swapped
  10436. version of ZERO WIDTH NON-BREAKING SPACE for byte-order detection purposes.
  10437. 65535 (FFFF hexadecimal) is unassigned.
  10438.  
  10439. The list of characters
  10440.  
  10441. <!-- Portions ⌐ International Organization for Standardization 1986
  10442.      Permission to copy in any form is granted for use with
  10443.      conforming SGML systems and applications as defined in
  10444.      ISO 8879, provided this notice is included in all copies.
  10445. -->
  10446. <!-- Character entity set. Typical invocation:
  10447.      <!ENTITY % HTMLlat1 PUBLIC
  10448.        "-//W3C//ENTITIES Full Latin 1//EN//HTML">
  10449.      %HTMLlat1;
  10450. -->
  10451.  
  10452. <!ENTITY nbsp   CDATA " " -- no-break space -->
  10453. <!ENTITY iexcl  CDATA "¡" -- inverted exclamation mark -->
  10454. <!ENTITY cent   CDATA "¢" -- cent sign -->
  10455. <!ENTITY pound  CDATA "£" -- pound sterling sign -->
  10456. <!ENTITY curren CDATA "¤" -- general currency sign -->
  10457. <!ENTITY yen    CDATA "¥" -- yen sign -->
  10458. <!ENTITY brvbar CDATA "¦" -- broken (vertical) bar -->
  10459. <!ENTITY sect   CDATA "§" -- section sign -->
  10460. <!ENTITY uml    CDATA "¨" -- umlaut (dieresis) -->
  10461. <!ENTITY copy   CDATA "©" -- copyright sign -->
  10462. <!ENTITY ordf   CDATA "ª" -- ordinal indicator, feminine -->
  10463. <!ENTITY laquo  CDATA "«" -- angle quotation mark, left -->
  10464. <!ENTITY not    CDATA "¬" -- not sign -->
  10465. <!ENTITY shy    CDATA "­" -- soft hyphen -->
  10466. <!ENTITY reg    CDATA "®" -- registered sign -->
  10467. <!ENTITY macr   CDATA "¯" -- macron -->
  10468. <!ENTITY deg    CDATA "°" -- degree sign -->
  10469. <!ENTITY plusmn CDATA "±" -- plus-or-minus sign -->
  10470. <!ENTITY sup2   CDATA "²" -- superscript two -->
  10471. <!ENTITY sup3   CDATA "³" -- superscript three -->
  10472. <!ENTITY acute  CDATA "´" -- acute accent -->
  10473. <!ENTITY micro  CDATA "µ" -- micro sign -->
  10474. <!ENTITY para   CDATA "¶" -- pilcrow (paragraph sign) -->
  10475. <!ENTITY middot CDATA "·" -- middle dot -->
  10476. <!ENTITY cedil  CDATA "¸" -- cedilla -->
  10477. <!ENTITY sup1   CDATA "¹" -- superscript one -->
  10478. <!ENTITY ordm   CDATA "º" -- ordinal indicator, masculine -->
  10479. <!ENTITY raquo  CDATA "»" -- angle quotation mark, right -->
  10480. <!ENTITY frac14 CDATA "¼" -- fraction one-quarter -->
  10481. <!ENTITY frac12 CDATA "½" -- fraction one-half -->
  10482. <!ENTITY frac34 CDATA "¾" -- fraction three-quarters -->
  10483. <!ENTITY iquest CDATA "¿" -- inverted question mark -->
  10484. <!ENTITY Agrave CDATA "À" -- capital A, grave accent -->
  10485. <!ENTITY Aacute CDATA "Á" -- capital A, acute accent -->
  10486. <!ENTITY Acirc  CDATA "Â" -- capital A, circumflex accent -->
  10487. <!ENTITY Atilde CDATA "Ã" -- capital A, tilde -->
  10488. <!ENTITY Auml   CDATA "Ä" -- capital A, dieresis or umlaut mark -->
  10489. <!ENTITY Aring  CDATA "Å" -- capital A, ring -->
  10490. <!ENTITY AElig  CDATA "Æ" -- capital AE diphthong (ligature) -->
  10491. <!ENTITY Ccedil CDATA "Ç" -- capital C, cedilla -->
  10492. <!ENTITY Egrave CDATA "È" -- capital E, grave accent -->
  10493. <!ENTITY Eacute CDATA "É" -- capital E, acute accent -->
  10494. <!ENTITY Ecirc  CDATA "Ê" -- capital E, circumflex accent -->
  10495. <!ENTITY Euml   CDATA "Ë" -- capital E, dieresis or umlaut mark -->
  10496. <!ENTITY Igrave CDATA "Ì" -- capital I, grave accent -->
  10497. <!ENTITY Iacute CDATA "Í" -- capital I, acute accent -->
  10498. <!ENTITY Icirc  CDATA "Î" -- capital I, circumflex accent -->
  10499. <!ENTITY Iuml   CDATA "Ï" -- capital I, dieresis or umlaut mark -->
  10500. <!ENTITY ETH    CDATA "Ð" -- capital Eth, Icelandic -->
  10501. <!ENTITY Ntilde CDATA "Ñ" -- capital N, tilde -->
  10502. <!ENTITY Ograve CDATA "Ò" -- capital O, grave accent -->
  10503. <!ENTITY Oacute CDATA "Ó" -- capital O, acute accent -->
  10504. <!ENTITY Ocirc  CDATA "Ô" -- capital O, circumflex accent -->
  10505. <!ENTITY Otilde CDATA "Õ" -- capital O, tilde -->
  10506. <!ENTITY Ouml   CDATA "Ö" -- capital O, dieresis or umlaut mark -->
  10507. <!ENTITY times  CDATA "×" -- multiply sign -->
  10508. <!ENTITY Oslash CDATA "Ø" -- capital O, slash -->
  10509. <!ENTITY Ugrave CDATA "Ù" -- capital U, grave accent -->
  10510. <!ENTITY Uacute CDATA "Ú" -- capital U, acute accent -->
  10511. <!ENTITY Ucirc  CDATA "Û" -- capital U, circumflex accent -->
  10512. <!ENTITY Uuml   CDATA "Ü" -- capital U, dieresis or umlaut mark -->
  10513. <!ENTITY Yacute CDATA "Ý" -- capital Y, acute accent -->
  10514. <!ENTITY THORN  CDATA "Þ" -- capital THORN, Icelandic -->
  10515. <!ENTITY szlig  CDATA "ß" -- small sharp s, German (sz ligature) -->
  10516. <!ENTITY agrave CDATA "à" -- small a, grave accent -->
  10517. <!ENTITY aacute CDATA "á" -- small a, acute accent -->
  10518. <!ENTITY acirc  CDATA "â" -- small a, circumflex accent -->
  10519. <!ENTITY atilde CDATA "ã" -- small a, tilde -->
  10520. <!ENTITY auml   CDATA "ä" -- small a, dieresis or umlaut mark -->
  10521. <!ENTITY aring  CDATA "å" -- small a, ring -->
  10522. <!ENTITY aelig  CDATA "æ" -- small ae diphthong (ligature) -->
  10523. <!ENTITY ccedil CDATA "ç" -- small c, cedilla -->
  10524. <!ENTITY egrave CDATA "è" -- small e, grave accent -->
  10525. <!ENTITY eacute CDATA "é" -- small e, acute accent -->
  10526. <!ENTITY ecirc  CDATA "ê" -- small e, circumflex accent -->
  10527. <!ENTITY euml   CDATA "ë" -- small e, dieresis or umlaut mark -->
  10528. <!ENTITY igrave CDATA "ì" -- small i, grave accent -->
  10529. <!ENTITY iacute CDATA "í" -- small i, acute accent -->
  10530. <!ENTITY icirc  CDATA "î" -- small i, circumflex accent -->
  10531. <!ENTITY iuml   CDATA "ï" -- small i, dieresis or umlaut mark -->
  10532. <!ENTITY eth    CDATA "ð" -- small eth, Icelandic -->
  10533. <!ENTITY ntilde CDATA "ñ" -- small n, tilde -->
  10534. <!ENTITY ograve CDATA "ò" -- small o, grave accent -->
  10535. <!ENTITY oacute CDATA "ó" -- small o, acute accent -->
  10536. <!ENTITY ocirc  CDATA "ô" -- small o, circumflex accent -->
  10537. <!ENTITY otilde CDATA "õ" -- small o, tilde -->
  10538. <!ENTITY ouml   CDATA "ö" -- small o, dieresis or umlaut mark -->
  10539. <!ENTITY divide CDATA "÷" -- divide sign -->
  10540. <!ENTITY oslash CDATA "ø" -- small o, slash -->
  10541. <!ENTITY ugrave CDATA "ù" -- small u, grave accent -->
  10542. <!ENTITY uacute CDATA "ú" -- small u, acute accent -->
  10543. <!ENTITY ucirc  CDATA "û" -- small u, circumflex accent -->
  10544. <!ENTITY uuml   CDATA "ü" -- small u, dieresis or umlaut mark -->
  10545. <!ENTITY yacute CDATA "ý" -- small y, acute accent -->
  10546. <!ENTITY thorn  CDATA "þ" -- small thorn, Icelandic -->
  10547. <!ENTITY yuml   CDATA "ÿ" -- small y, dieresis or umlaut mark -->
  10548.  
  10549. Named entities for symbols, mathematical symbols, and Greek letters
  10550.  
  10551. The named character entities in this section produce characters that may be
  10552. represented by glyphs in the widely available Adobe Symbol font, including
  10553. Greek characters, various bracketing symbols, and a selection of
  10554. mathematical operators such as gradient, product, and summation symbols.
  10555.  
  10556. To support these entities, user agents may support full [ISO10646] or use
  10557. other means. Display of glyphs for these characters may be obtained by being
  10558. able to display the relevant [ISO10646] characters or by other means, such
  10559. as internally mapping the listed entities, numeric character references, and
  10560. characters to the appropriate position in some font that contains the
  10561. requisite glyphs.
  10562.  
  10563. When to use Greek entities. This entity set contains all the letters used in
  10564. modern Greek. However, it does not include Greek punctuation, precomposed
  10565. accented characters nor the non-spacing accents (tonos, dialytika) required
  10566. to compose them. There are no archaic letters, Coptic-unique letters, or
  10567. precomposed letters for Polytonic Greek. The entities defined here are not
  10568. intended for the representation of modern Greek text and would not be an
  10569. efficient representation; rather, they are intended for occasional Greek
  10570. letters used in technical and mathematical works.
  10571.  
  10572. The list of characters
  10573.  
  10574. <!-- Mathematical, Greek and Symbolic characters for HTML -->
  10575.  
  10576. <!-- Character entity set. Typical invocation:
  10577.      <!ENTITY % HTMLsymbol PUBLIC
  10578.        "-//W3C//ENTITIES Symbolic//EN//HTML">
  10579.      %HTMLsymbol; -->
  10580.  
  10581. <!-- Portions ⌐ International Organization for Standardization 1986:
  10582.      Permission to copy in any form is granted for use with
  10583.      conforming SGML systems and applications as defined in
  10584.      ISO 8879, provided this notice is included in all copies.
  10585. -->
  10586.  
  10587. <!-- Relevant ISO entity set is given unless names are newly introduced.
  10588.      New names (i.e., not in ISO 8879 list) do not clash with any
  10589.      existing ISO 8879 entity names. ISO 10646 character numbers
  10590.      are given for each character, in hex. CDATA values are decimal
  10591.      conversions of the ISO 10646 values and refer to the document
  10592.      character set. Names are Unicode 2.0 names.
  10593.  
  10594. -->
  10595.  
  10596. <!-- Latin Extended-B -->
  10597. <!ENTITY fnof     CDATA "ƒ"  -- latin small f with hook, =function, =florin, u+0192 ISOtech -->
  10598.  
  10599. <!-- Greek -->
  10600. <!ENTITY Alpha    CDATA "Α" -- greek capital letter alpha,  u+0391 -->
  10601. <!ENTITY Beta     CDATA "Β" -- greek capital letter beta,  u+0392 -->
  10602. <!ENTITY Gamma    CDATA "Γ" -- greek capital letter gamma,  u+0393 ISOgrk3 -->
  10603. <!ENTITY Delta    CDATA "Δ" -- greek capital letter delta,  u+0394 ISOgrk3 -->
  10604. <!ENTITY Epsilon  CDATA "Ε" -- greek capital letter epsilon,  u+0395 -->
  10605. <!ENTITY Zeta     CDATA "Ζ" -- greek capital letter zeta,  u+0396 -->
  10606. <!ENTITY Eta      CDATA "Η" -- greek capital letter eta,  u+0397 -->
  10607. <!ENTITY Theta    CDATA "Θ" -- greek capital letter theta,  u+0398 ISOgrk3 -->
  10608. <!ENTITY Iota     CDATA "Ι" -- greek capital letter iota,  u+0399 -->
  10609. <!ENTITY Kappa    CDATA "Κ" -- greek capital letter kappa,  u+039A -->
  10610. <!ENTITY Lambda   CDATA "Λ" -- greek capital letter lambda,  u+039B ISOgrk3 -->
  10611. <!ENTITY Mu       CDATA "Μ" -- greek capital letter mu,  u+039C -->
  10612. <!ENTITY Nu       CDATA "Ν" -- greek capital letter nu,  u+039D -->
  10613. <!ENTITY Xi       CDATA "Ξ" -- greek capital letter xi,  u+039E ISOgrk3 -->
  10614. <!ENTITY Omicron  CDATA "Ο" -- greek capital letter omicron,  u+039F -->
  10615. <!ENTITY Pi       CDATA "Π" -- greek capital letter pi,  u+03A0 ISOgrk3 -->
  10616. <!ENTITY Rho      CDATA "Ρ" -- greek capital letter rho,  u+03A1 -->
  10617. <!-- (there is no Sigmaf, and no u+03A2 character either) -->
  10618. <!ENTITY Sigma    CDATA "Σ" -- greek capital letter sigma,  u+03A3 ISOgrk3 -->
  10619. <!ENTITY Tau      CDATA "Τ" -- greek capital letter tau,  u+03A4 -->
  10620. <!ENTITY Upsilon     CDATA "Υ" -- greek capital letter upsilon,  u+03A5 ISOgrk3 -->
  10621. <!ENTITY Phi      CDATA "Φ" -- greek capital letter phi,  u+03A6 ISOgrk3 -->
  10622. <!ENTITY Chi      CDATA "Χ" -- greek capital letter chi,  u+03A7 -->
  10623. <!ENTITY Psi      CDATA "Ψ" -- greek capital letter psi,  u+03A8 ISOgrk3 -->
  10624. <!ENTITY Omega    CDATA "Ω" -- greek capital letter omega,  u+03A9 ISOgrk3 -->
  10625.  
  10626. <!ENTITY alpha    CDATA "α" -- greek small letter alpha, u+03B1 ISOgrk3 -->
  10627. <!ENTITY beta     CDATA "β" -- greek small letter beta,  u+03B2 ISOgrk3 -->
  10628. <!ENTITY gamma    CDATA "γ" -- greek small letter gamma,  u+03B3 ISOgrk3 -->
  10629. <!ENTITY delta    CDATA "δ" -- greek small letter delta,  u+03B4 ISOgrk3 -->
  10630. <!ENTITY epsilon     CDATA "ε" -- greek small letter epsilon,  u+03B5 ISOgrk3 -->
  10631. <!ENTITY zeta     CDATA "ζ" -- greek small letter zeta,  u+03B6 ISOgrk3 -->
  10632. <!ENTITY eta      CDATA "η" -- greek small letter eta,  u+03B7 ISOgrk3 -->
  10633. <!ENTITY theta    CDATA "θ" -- greek small letter theta,  u+03B8 ISOgrk3 -->
  10634. <!ENTITY iota     CDATA "ι" -- greek small letter iota,  u+03B9 ISOgrk3 -->
  10635. <!ENTITY kappa    CDATA "κ" -- greek small letter kappa,  u+03BA ISOgrk3 -->
  10636. <!ENTITY lambda   CDATA "λ" -- greek small letter lambda,  u+03BB ISOgrk3 -->
  10637. <!ENTITY mu       CDATA "μ" -- greek small letter mu,  u+03BC ISOgrk3 -->
  10638. <!ENTITY nu       CDATA "ν" -- greek small letter nu,  u+03BD ISOgrk3 -->
  10639. <!ENTITY xi       CDATA "ξ" -- greek small letter xi,  u+03BE ISOgrk3 -->
  10640. <!ENTITY omicron  CDATA "ο" -- greek small letter omicron,  u+03BF NEW -->
  10641. <!ENTITY pi       CDATA "π" -- greek small letter pi,  u+03C0 ISOgrk3 -->
  10642. <!ENTITY rho      CDATA "ρ" -- greek small letter rho,  u+03C1 ISOgrk3 -->
  10643. <!ENTITY sigmaf   CDATA "ς" -- greek small letter final sigma,  u+03C2 ISOgrk3 -->
  10644. <!ENTITY sigma    CDATA "σ" -- greek small letter sigma,  u+03C3 ISOgrk3 -->
  10645. <!ENTITY tau      CDATA "τ" -- greek small letter tau,  u+03C4 ISOgrk3 -->
  10646. <!ENTITY upsilon     CDATA "υ" -- greek small letter upsilon,  u+03C5 ISOgrk3 -->
  10647. <!ENTITY phi      CDATA "φ" -- greek small letter phi,  u+03C6 ISOgrk3 -->
  10648. <!ENTITY chi      CDATA "χ" -- greek small letter chi,  u+03C7 ISOgrk3 -->
  10649. <!ENTITY psi      CDATA "ψ" -- greek small letter psi,  u+03C8 ISOgrk3 -->
  10650. <!ENTITY omega    CDATA "ω" -- greek small letter omega,  u+03C9 ISOgrk3 -->
  10651. <!ENTITY thetasym    CDATA "ϑ" -- greek small letter theta symbol,  u+03D1 NEW -->
  10652. <!ENTITY upsih    CDATA "ϒ" -- greek upsilon with hook symbol,  u+03D2 NEW -->
  10653. <!ENTITY piv      CDATA "ϖ" -- greek pi symbol,  u+03D6 ISOgrk3 -->
  10654.  
  10655. <!-- General Punctuation -->
  10656. <!ENTITY bull     CDATA "•" -- bullet, =black small circle, u+2022 ISOpub  -->
  10657. <!-- bullet is NOT the same as bullet operator, u+2219 -->
  10658. <!ENTITY hellip   CDATA "…" -- horizontal ellipsis, =three dot leader, u+2026 ISOpub  -->
  10659. <!ENTITY prime    CDATA "′" -- prime, =minutes, =feet, u+2032 ISOtech -->
  10660. <!ENTITY Prime    CDATA "″" -- double prime, =seconds, =inches, u+2033 ISOtech -->
  10661. <!ENTITY oline    CDATA "‾" -- overline, =spacing overscore, u+203E NEW -->
  10662. <!ENTITY frasl    CDATA "⁄" -- fraction slash, u+2044 NEW -->
  10663.  
  10664. <!-- Letterlike Symbols -->
  10665. <!ENTITY weierp   CDATA "℘" -- script capital P, =power set, =Weierstrass p, u+2118 ISOamso -->
  10666. <!ENTITY image    CDATA "ℑ" -- blackletter capital I, =imaginary part, u+2111 ISOamso -->
  10667. <!ENTITY real     CDATA "ℜ" -- blackletter capital R, =real part symbol, u+211C ISOamso -->
  10668. <!ENTITY trade    CDATA "™" -- trade mark sign, u+2122 ISOnum -->
  10669. <!ENTITY alefsym  CDATA "ℵ" -- alef symbol, =first transfinite cardinal, u+2135 NEW -->
  10670. <!-- alef symbol is NOT the same as hebrew letter alef, u+05D0 although the same glyph
  10671.      could be used to depict both characters -->
  10672.  
  10673. <!-- Arrows -->
  10674. <!ENTITY larr     CDATA "←" -- leftwards arrow, u+2190 ISOnum -->
  10675. <!ENTITY uarr     CDATA "↑" -- upwards arrow, u+2191 ISOnum-->
  10676. <!ENTITY rarr     CDATA "→" -- rightwards arrow, u+2192 ISOnum -->
  10677. <!ENTITY darr     CDATA "↓" -- downwards arrow, u+2193 ISOnum -->
  10678. <!ENTITY harr     CDATA "↔" -- left right arrow, u+2194 ISOamsa -->
  10679. <!ENTITY crarr    CDATA "↵" -- downwards arrow with corner leftwards, =carriage return, u+21B5 NEW -->
  10680. <!ENTITY lArr     CDATA "⇐" -- leftwards double arrow, u+21D0 ISOtech -->
  10681. <!-- Unicode does not say that lArr is the same as the 'is implied by' arrow but also
  10682.      does not have any other character for that function. So ? lArr can be used for
  10683.      'is implied by' as ISOtech suggests -->
  10684. <!ENTITY uArr     CDATA "⇑" -- upwards double arrow, u+21D1 ISOamsa -->
  10685. <!ENTITY rArr     CDATA "⇒" -- rightwards double arrow, u+21D2 ISOtech -->
  10686. <!-- Unicode does not say this is the 'implies' character but does not have another
  10687.      character with this function so ? rArr can be used for 'implies' as ISOtech suggests -->
  10688. <!ENTITY dArr     CDATA "⇓" -- downwards double arrow, u+21D3 ISOamsa -->
  10689. <!ENTITY hArr     CDATA "⇔" -- left right double arrow, u+21D4 ISOamsa -->
  10690.  
  10691. <!-- Mathematical Operators -->
  10692. <!ENTITY forall   CDATA "∀" -- for all, u+2200 ISOtech -->
  10693. <!ENTITY part     CDATA "∂" -- partial differential, u+2202 ISOtech  -->
  10694. <!ENTITY exist    CDATA "∃" -- there exists, u+2203 ISOtech -->
  10695. <!ENTITY empty    CDATA "∅" -- empty set, =null set, =diameter, u+2205 ISOamso -->
  10696. <!ENTITY nabla    CDATA "∇" -- nabla, =backward difference, u+2207 ISOtech -->
  10697. <!ENTITY isin     CDATA "∈" -- element of, u+2208 ISOtech -->
  10698. <!ENTITY notin    CDATA "∉" -- not an element of, u+2209 ISOtech -->
  10699. <!ENTITY ni       CDATA "∋" -- contains as member, u+220B ISOtech -->
  10700. <!-- should there be a more memorable name than 'ni'? -->
  10701. <!ENTITY prod     CDATA "∏" -- n-ary product, =product sign, u+220F ISOamsb -->
  10702. <!-- prod is NOT the same character as u+03A0 'greek capital letter pi' though the same
  10703.      glyph might be used for both -->
  10704. <!ENTITY sum      CDATA "∑" -- n-ary sumation, u+2211 ISOamsb -->
  10705. <!-- sum is NOT the same character as u+03A3 'greek capital letter sigma' though the same
  10706.      glyph might be used for both -->
  10707. <!ENTITY minus    CDATA "−" -- minus sign, u+2212 ISOtech -->
  10708. <!ENTITY lowast   CDATA "∗" -- asterisk operator, u+2217 ISOtech -->
  10709. <!ENTITY radic    CDATA "√" -- square root, =radical sign, u+221A ISOtech -->
  10710. <!ENTITY prop     CDATA "∝" -- proportional to, u+221D ISOtech -->
  10711. <!ENTITY infin    CDATA "∞" -- infinity, u+221E ISOtech -->
  10712. <!ENTITY ang      CDATA "∠" -- angle, u+2220 ISOamso -->
  10713. <!ENTITY and      CDATA "⊥" -- logical and, =wedge, u+2227 ISOtech -->
  10714. <!ENTITY or       CDATA "⊦" -- logical or, =vee, u+2228 ISOtech -->
  10715. <!ENTITY cap      CDATA "∩" -- intersection, =cap, u+2229 ISOtech -->
  10716. <!ENTITY cup      CDATA "∪" -- union, =cup, u+222A ISOtech -->
  10717. <!ENTITY int      CDATA "∫" -- integral, u+222B ISOtech -->
  10718. <!ENTITY there4   CDATA "∴" -- therefore, u+2234 ISOtech -->
  10719. <!ENTITY sim      CDATA "∼" -- tilde operator, =varies with, =similar to, u+223C ISOtech -->
  10720. <!-- tilde operator is NOT the same character as the tilde, u+007E, although the same
  10721.      glyph might be used to represent both  -->
  10722. <!ENTITY cong     CDATA "≅" -- approximately equal to, u+2245 ISOtech -->
  10723. <!ENTITY asymp    CDATA "≈" -- almost equal to, =asymptotic to, u+2248 ISOamsr -->
  10724. <!ENTITY ne       CDATA "≠" -- not equal to, u+2260 ISOtech -->
  10725. <!ENTITY equiv    CDATA "≡" -- identical to, u+2261 ISOtech -->
  10726. <!ENTITY le       CDATA "≤" -- less-than or equal to, u+2264 ISOtech -->
  10727. <!ENTITY ge       CDATA "≥" -- greater-than or equal to, u+2265 ISOtech -->
  10728. <!ENTITY sub      CDATA "⊂" -- subset of, u+2282 ISOtech -->
  10729. <!ENTITY sup      CDATA "⊃" -- superset of, u+2283 ISOtech -->
  10730. <!-- note that nsup, 'not a superset of, u+2283' is not covered by the Symbol font
  10731.      encoding and is not included. Should it be, for symmetry? It is in ISOamsn  -->
  10732. <!ENTITY nsub     CDATA "⊄" -- not a subset of, u+2284 ISOamsn -->
  10733. <!ENTITY sube     CDATA "⊆" -- subset of or equal to, u+2286 ISOtech -->
  10734. <!ENTITY supe     CDATA "⊇" -- superset of or equal to, u+2287 ISOtech -->
  10735. <!ENTITY oplus    CDATA "⊕" -- circled plus, =direct sum, u+2295 ISOamsb -->
  10736. <!ENTITY otimes   CDATA "⊗" -- circled times, =vector product, u+2297 ISOamsb -->
  10737. <!ENTITY perp     CDATA "⊥" -- up tack, =orthogonal to, =perpendicular, u+22A5 ISOtech -->
  10738. <!ENTITY sdot     CDATA "⋅" -- dot operator, u+22C5 ISOamsb -->
  10739. <!-- dot operator is NOT the same character as u+00B7 middle dot -->
  10740.  
  10741. <!-- Miscellaneous Technical -->
  10742. <!ENTITY lceil    CDATA "⌈" -- left ceiling, =apl upstile, u+2308, ISOamsc  -->
  10743. <!ENTITY rceil    CDATA "⌉" -- right ceiling, u+2309, ISOamsc  -->
  10744. <!ENTITY lfloor   CDATA "⌊" -- left floor, =apl downstile, u+230A, ISOamsc  -->
  10745. <!ENTITY rfloor   CDATA "⌋" -- right floor, u+230B, ISOamsc  -->
  10746. <!ENTITY lang     CDATA "〈" -- left-pointing angle bracket, =bra, u+2329 ISOtech -->
  10747. <!-- lang is NOT the same character as u+003C 'less than'
  10748.      or u+2039 'single left-pointing angle quotation mark' -->
  10749. <!ENTITY rang     CDATA "〉" -- right-pointing angle bracket, =ket, u+232A ISOtech -->
  10750. <!-- rang is NOT the same character as u+003E 'greater than'
  10751.      or u+203A 'single right-pointing angle quotation mark' -->
  10752.  
  10753. <!-- Geometric Shapes -->
  10754. <!ENTITY loz      CDATA "◊" -- lozenge, u+25CA ISOpub -->
  10755.  
  10756. <!-- Miscellaneous Symbols -->
  10757. <!ENTITY spades   CDATA "♠" -- black spade suit, u+2660 ISOpub -->
  10758. <!-- black here seems to mean filled as opposed to hollow -->
  10759. <!ENTITY clubs    CDATA "♣" -- black club suit, =shamrock, u+2663 ISOpub -->
  10760. <!ENTITY hearts   CDATA "♥" -- black heart suit, =valentine, u+2665 ISOpub -->
  10761. <!ENTITY diams    CDATA "♦" -- black diamond suit, u+2666 ISOpub -->
  10762.  
  10763. Named entities for markup-significant and internationalization characters
  10764.  
  10765. The named character entities in this section are for escaping
  10766. markup-significant characters (these are the same as those in HTML 2.0 and
  10767. 3.2), for denoting spaces and dashes. Other characters in this section apply
  10768. to internationalization issues such as the disambiguation of bidirectional
  10769. text (see the section on bidirectional text for details).
  10770.  
  10771. Entities have also been added for the remaining characters occuring in
  10772. CP-1252 which do not occur in the HTMLlat1 or HTMLsymbol entity sets. These
  10773. all occur in the 128 to 159 range within the cp-1252 charset. These entities
  10774. permit the characters to be denoted in a platform-independent manner.
  10775.  
  10776. To support these entities, user agents may support full [ISO10646] or use
  10777. other means. Display of glyphs for these characters may be obtained by being
  10778. able to display the relevant [ISO10646] characters or by other means, such
  10779. as internally mapping the listed entities, numeric character references, and
  10780. characters to the appropriate position in some font that contains the
  10781. requisite glyphs.
  10782.  
  10783. The list of characters
  10784.  
  10785. <!-- Special characters for HTML -->
  10786.  
  10787. <!-- Character entity set. Typical invocation:
  10788.      <!ENTITY % HTMLspecial PUBLIC
  10789.        "-//W3C//ENTITIES Special//EN//HTML">
  10790.      %HTMLspecial; -->
  10791.  
  10792. <!-- Portions ⌐ International Organization for Standardization 1986:
  10793.      Permission to copy in any form is granted for use with
  10794.      conforming SGML systems and applications as defined in
  10795.      ISO 8879, provided this notice is included in all copies.
  10796. -->
  10797.  
  10798. <!-- Relevant ISO entity set is given unless names are newly introduced.
  10799.      New names (i.e., not in ISO 8879 list) do not clash with any
  10800.      existing ISO 8879 entity names. ISO 10646 character numbers
  10801.      are given for each character, in hex. CDATA values are decimal
  10802.      conversions of the ISO 10646 values and refer to the document
  10803.      character set. Names are Unicode 2.0 names.
  10804.  
  10805. -->
  10806.  
  10807. <!-- C0 Controls and Basic Latin -->
  10808. <!ENTITY quot    CDATA """    -- quotation mark, =apl quote, u+0022 ISOnum -->
  10809. <!ENTITY amp     CDATA "&"    -- ampersand, u+0026 ISOnum -->
  10810. <!ENTITY lt      CDATA "<"    -- less-than sign, u+003C ISOnum -->
  10811. <!ENTITY gt      CDATA ">"    -- greater-than sign, u+003E ISOnum -->
  10812.  
  10813. <!-- Latin Extended-A -->
  10814. <!ENTITY OElig   CDATA "Œ"  -- latin capital ligature oe, u+0152 ISOlat2 -->
  10815. <!ENTITY oelig   CDATA "œ"  -- latin small ligature oe, u+0153 ISOlat2 -->
  10816. <!-- ligature is a misnomer, this is a separate character in some languages -->
  10817. <!ENTITY Scaron  CDATA "Š"  -- latin capital letter s with caron, u+0160 ISOlat2 -->
  10818. <!ENTITY scaron  CDATA "š"  -- latin small letter s with caron, u+0161 ISOlat2 -->
  10819. <!ENTITY Yuml    CDATA "Ÿ"  -- latin capital letter y with diaeresis, u+0178 ISOlat2 -->
  10820.  
  10821. <!-- Spacing Modifier Letters -->
  10822. <!ENTITY circ    CDATA "ˆ"   -- modifier letter circumflex accent, u+02C6 ISOpub -->
  10823. <!ENTITY tilde   CDATA "˜"   -- small tilde, u+02DC ISOdia -->
  10824.  
  10825. <!-- General Punctuation -->
  10826. <!ENTITY ensp    CDATA " "  -- en space, u+2002 ISOpub -->
  10827. <!ENTITY emsp    CDATA " "  -- em space, u+2003 ISOpub -->
  10828. <!ENTITY thinsp  CDATA " "  -- thin space, u+2009 ISOpub -->
  10829. <!ENTITY zwnj    CDATA "‌"  -- zero width non-joiner, u+200C NEW RFC 2070 -->
  10830. <!ENTITY zwj     CDATA "‍"  -- zero width joiner, u+200D NEW RFC 2070 -->
  10831. <!ENTITY lrm     CDATA "‎"  -- left-to-right mark, u+200E NEW RFC 2070 -->
  10832. <!ENTITY rlm     CDATA "‏"  -- right-to-left mark, u+200F NEW RFC 2070 -->
  10833. <!ENTITY ndash   CDATA "–"  -- en dash, u+2013 ISOpub -->
  10834. <!ENTITY mdash   CDATA "—"  -- em dash, u+2014 ISOpub -->
  10835. <!ENTITY lsquo   CDATA "‘"  -- left single quotation mark, u+2018 ISOnum -->
  10836. <!ENTITY rsquo   CDATA "’"  -- right single quotation mark, u+2019 ISOnum -->
  10837. <!ENTITY sbquo   CDATA "‚"  -- single low-9 quotation mark, u+201A NEW -->
  10838. <!ENTITY ldquo   CDATA "“"  -- left double quotation mark, u+201C ISOnum -->
  10839. <!ENTITY rdquo   CDATA "”"  -- right double quotation mark, u+201D ISOnum -->
  10840. <!ENTITY bdquo   CDATA "„"  -- double low-9 quotation mark, u+201E NEW -->
  10841. <!ENTITY dagger  CDATA "†"  -- dagger, u+2020 ISOpub -->
  10842. <!ENTITY Dagger  CDATA "‡"  -- double dagger, u+2021 ISOpub -->
  10843. <!ENTITY permil  CDATA "‰"  -- per mille sign, u+2030 ISOtech -->
  10844. <!ENTITY lsaquo  CDATA "‹"  -- single left-pointing angle quotation mark, u+2039 ISO proposed -->
  10845. <!-- lsaquo is proposed but not yet ISO standardised -->
  10846. <!ENTITY rsaquo  CDATA "›"  -- single right-pointing angle quotation mark, u+203A ISO proposed -->
  10847. <!-- rsaquo is proposed but not yet ISO standardised -->
  10848.  
  10849.                                  References
  10850.  
  10851. Contents
  10852.  
  10853.   1. Normative references
  10854.   2. Informative references
  10855.  
  10856. Normative references
  10857.  
  10858. [RFC822]
  10859.      "Standard for the Format of ARPA Internet Text Messages", Revised by
  10860.      David H. Crocker, August 1982.
  10861.      Download from ftp://ds.internic.net/rfc/rfc822.txt.
  10862. [RFC1123]
  10863.      "Requirements for Internet Hosts -- Application and Support", R.
  10864.      Braden, October 1989.
  10865.      Download from ftp://ds.internic.net/rfc/rfc1123.txt.
  10866. [RFC1468]
  10867.      "Japanese Character Encoding for Internet Messages", J. Murai, M.
  10868.      Crispin, and E. van der Poel, June 1993.
  10869.      Download from ftp://ds.internic.net/rfc/rfc1468.txt.
  10870. [RFC1555]
  10871.      "Hebrew Character Encoding for Internet Messages", H. Nussbacher and Y.
  10872.      Bourvine, December 1993.
  10873.      Download from ftp://ds.internic.net/rfc/rfc1555.txt.
  10874. [RFC1556]
  10875.      "Handling of Bi-directional Texts in MIME", H. Nussbacher, December
  10876.      1993.
  10877.      Download from ftp://ds.internic.net/rfc/rfc1556.txt.
  10878. [RFC1590]
  10879.      "Media Type Registration Procedure", J. Postel, March 1994.
  10880.      Download from ftp://ds.internic.net/rfc/rfc1590.txt.
  10881. [RFC1738]
  10882.      "Uniform Resource Locators", T. Berners-Lee, L. Masinter, and M.
  10883.      McCahill, December 1994.
  10884.      Download from ftp://ds.internic.net/rfc/rfc1738.txt.
  10885. [RFC1766]
  10886.      "Tags for the Identification of Languages", H. Alvestrand, March 1995.
  10887.      Download from ftp://ds.internic.net/rfc/rfc1766.txt.
  10888. [RFC1808]
  10889.      "Relative Uniform Resource Locators", R. Fielding, June 1995.
  10890.      Download from ftp://ds.internic.net/rfc/rfc1808.txt.
  10891. [RFC1867]
  10892.      "Form-based File Upload in HTML", E. Nebel and L. Masinter, November
  10893.      1995.
  10894.      Download from ftp://ds.internic.net/rfc/rfc1867.txt.
  10895. [RFC2045]
  10896.      "Multipurpose Internet Mail Extensions (MIME) Part One: Format of
  10897.      Internet Message Bodies", N. Freed and N. Borenstein, November 1996.
  10898.      Download from ftp://ds.internic.net/rfc/rfc2045.txt. Note that this RFC
  10899.      obsoletes RFC1521, RFC1522, and RFC1590.
  10900. [RFC2046]
  10901.      "Multipurpose Internet Mail Extensions (MIME) Part Two: Media Types",
  10902.      N. Freed and N. Borenstein, November 1996.
  10903.      Download from ftp://ds.internic.net/rfc/rfc2046.txt. Note that this RFC
  10904.      obsoletes RFC1521, RFC1522, and RFC1590.
  10905. [RFC2068]
  10906.      "HTTP Version 1.1 ", R. Fielding, J. Gettys, J. Mogul, H. Frystyk
  10907.      Nielsen, and T. Berners-Lee, January 1997.
  10908.      Download from ftp://ds.internic. net/rfc/rfc2068.txt.
  10909. [RFC2070]
  10910.      "Internationalization of the HyperText Markup Language", F. Yergeau, G.
  10911.      Nicol, G. Adams, and M. Dⁿrst, January 1997.
  10912.      Download from ftp://ds.internic.net/rfc/rfc2070.txt.
  10913. [RFC2119]
  10914.      "Key words for use in RFCs to Indicate Requirement Levels", S. Bradner,
  10915.      March 1997.
  10916.      Download from ftp://ds.internic.net/rfc/rfc2119.txt.
  10917. [ISO639]
  10918.      "Code for the representation of names of languages", ISO 639:1988.
  10919.      For more information, consult http://www.iso.ch/cate/d4766.html.
  10920.      See also http://www.sil.org/sgml/iso639a.html.
  10921. [ISO646]
  10922.      "Information technology -- ISO 7-bit coded character set for
  10923.      information interchange, ISO/IEC 646:1991.
  10924. [ISO1000]
  10925.      "SI units and recommendations for the user of their multiples and of
  10926.      certain other units", ISO 1000:1992.
  10927. [ISO3166]
  10928.      "Codes for the representation of names of countries", ISO 3166:1993.
  10929. [ISO4217]
  10930.      "Codes for the representation of currencies and funds", ISO 4217:1995.
  10931. [ISO8601]
  10932.      "Data elements and interchange formats -- Information interchange --
  10933.      Representation of dates and times", ISO 8601:1988.
  10934. [ISO88591]
  10935.      "Information processing -- 8-bit single-byte coded graphic character
  10936.      sets -- Part 1: Latin alphabet No. 1", ISO 8859-1:1987.
  10937. [ISO8879]
  10938.      "Information Processing -- Text and Office Systems -- Standard
  10939.      Generalized Markup Language (SGML)", ISO 8879:1986.
  10940.      For the list of SGML entities, consult
  10941.      ftp://ftp.ifi.uio.no/pub/SGML/ENTITIES/.
  10942. [ISO10646]
  10943.      "Information Technology - Universal Multiple- Octet Coded Character Set
  10944.      (UCS) - Part 1: Architecture and Basic Multilingual Plane", ISO/IEC
  10945.      10646-1:1993. The current specification also takes into consideration
  10946.      the first five amendments to ISO/IEC 10646-1:1993.
  10947. [UNICODE]
  10948.      "The Unicode Standard: Version 2.0", The Unicode Consortium,
  10949.      Addison-Wesley Developers Press, 1996.
  10950.      For more information, consult the Unicode Consortium's home page at
  10951.      http://www.unicode.org/
  10952. [SRGB]
  10953.      "A Standard Default color Space for the Internet", version 1.10, M.
  10954.      Stokes, M. Anderson, S. Chandrasekar, and R. Motta, 5 November 1996.
  10955.      Download from http://www.w3.org/Graphics/Color/sRGB.html
  10956. [CSS1]
  10957.      "Cascading Style Sheets, level 1", H. W. Lie and B. Bos, 17 December
  10958.      1996.
  10959.      Download from http://www.w3.org/TR/REC-CSS1-961217.html
  10960. [ADOBE90]
  10961.      "Postscript Language Reference Manual", 2nd Edition, Appendix E.,
  10962.      Addison-Wesley Publishing Co., 1990.
  10963. [ERCS]
  10964.      "Extended Reference Concrete Syntax for SGML", 30 May 1995.
  10965.      Download from http://www.sgmlopen.org/sgml/docs/ercs/ercs-home.html
  10966.  
  10967. Informative references
  10968.  
  10969. [MIMETYPES]
  10970.      Download a list of registered Internet Media Types (MIME types) from
  10971.      ftp://ftp.isi.edu/in-notes/iana/assignments/media-types/.
  10972. [RFC850]
  10973.      "Standard for Interchange of USENET Messages", M. Horton, June 1983.
  10974.      Download from ftp://ds.internic.net/rfc/rfc850.txt.
  10975. [RFC1866]
  10976.      "HyperText Markup Language 2.0", T. Berners-Lee and D. Connolly,
  10977.      November 1995.
  10978.      Download from ftp://ds.internic.net/rfc/rfc1866.txt.
  10979. [HTML30]
  10980.      "HyperText Markup Language Specification Version 3.0", Dave Raggett,
  10981.      September 1995.
  10982.      Download from HyperText Markup Language Specification Version 3.0.
  10983. [HTML32]
  10984.      "HTML 3.2 Reference Specification", Dave Raggett, 14 January 1997.
  10985.      Download from http://www.w3.org/TR/REC-html32.html
  10986. [CALS]
  10987.      Continuous Acquisition and Life-Cycle Support (CALS). CALS is a
  10988.      Department of Defense strategy for achieving effective creation,
  10989.      exchange, and use of digital data for weapon systems and equipment.
  10990.      More information can be found on the CALS home page at at
  10991.      http://navysgml.dt.navy.mil/cals.html.
  10992. [RFC1942]
  10993.      "HTML Tables", Dave Raggett, May 1996.
  10994.      Download from ftp://ds.internic.net/rfc/rfc1942.txt.
  10995. [HTML3STYLE]
  10996.      "HTML and Style Sheets", B. Bos, D. Raggett, and H. Lie, 24 March 1997.
  10997.      Download from http://www.w3.org/TR/WD-style.html
  10998. [LEXHTML]
  10999.      "A Lexical Analyzer for HTML and Basic SGML", D. Connolly, 15 June
  11000.      1996. Download from http://www.w3.org/TR/WD-html-lex
  11001. [BRYAN88]
  11002.      "SGML: An Author's Guide to the Standard Generalized Markup Language",
  11003.      M. Bryan, Addison-Wesley Publishing Co., 1988.
  11004. [GOLD90]
  11005.      "The SGML Handbook", C. F. Goldfarb, Clarendon Press, 1991.
  11006. [VANH90]
  11007.      "Practical SGML", E. van Herwijnen, Kluwer Academicq Publishers Group,
  11008.      Norwell and Dordrecht, 1990.
  11009. [SQ91]
  11010.      "The SGML Primer", 3rd Edition, SoftQuad Inc., 1991.
  11011. [ETHNO]
  11012.      "Ethnologue, Languages of the World", 12th Edition, Barbara F. Grimes
  11013.      editor, Summer Institute of Linguistics, October 1992.
  11014. [DCORE]
  11015.      The Dublin Core: for more information see
  11016.      http://purl.org/metadata/dublin_core
  11017. [PICS]
  11018.      Platform for Internet Content (PICS). For more information see
  11019.      http://www.w3.org/PICS/
  11020. [TAKADA]
  11021.      "Multilingual Information Exchange through the World-Wide Web",
  11022.      Toshihiro Takada, Computer Networks and ISDN Systems, Vol. 27, No. 2,
  11023.      pp. 235-241, November 1994.
  11024.  
  11025.                                   Indexes
  11026.  
  11027. Contents
  11028. This specification includes the following indexes for quick reference:
  11029.  
  11030.    * Index of elements
  11031.    * Index of attributes
  11032.  
  11033.                               Index of Elements
  11034.  
  11035.              Legend: Required / Optional / Forbidden, Yes / No
  11036.                         Name    Start Tag End Tag Empty
  11037.                     A               R        R      N
  11038.                     ACRONYM         R        R      N
  11039.                     ADDRESS         R        R      N
  11040.                     APPLET          R        R      N
  11041.                     AREA            R        F      Y
  11042.                     B               R        R      N
  11043.                     BASE            R        F      Y
  11044.                     BASEFONT        R        F      Y
  11045.                     BDO             R        R      N
  11046.                     BIG             R        R      N
  11047.                     BLOCKQUOTE      R        R      N
  11048.                     BODY            O        O      N
  11049.                     BR              R        F      Y
  11050.                     BUTTON          R        R      N
  11051.                     CAPTION         R        R      N
  11052.                     CENTER          R        R      N
  11053.                     CITE            R        R      N
  11054.                     CODE            R        R      N
  11055.                     COL             R        F      Y
  11056.                     COLGROUP        R        O      N
  11057.                     DD              R        O      N
  11058.                     DEL             R        R      N
  11059.                     DFN             R        R      N
  11060.                     DIR             R        R      N
  11061.                     DIV             R        R      N
  11062.                     DL              R        R      N
  11063.                     DT              R        O      N
  11064.                     EM              R        R      N
  11065.                     FIELDSET        R        R      N
  11066.                     FONT            R        R      N
  11067.                     FORM            R        R      N
  11068.                     FRAME           R        F      Y
  11069.                     FRAMESET        R        R      N
  11070.                     H1              R        R      N
  11071.                     H2              R        R      N
  11072.                     H3              R        R      N
  11073.                     H4              R        R      N
  11074.                     H5              R        R      N
  11075.                     H6              R        R      N
  11076.                     HEAD            O        O      N
  11077.                     HR              R        F      Y
  11078.                     HTML            O        O      N
  11079.                     I               R        R      N
  11080.                     IFRAME          R        R      N
  11081.                     IMG             R        F      Y
  11082.                     INPUT           R        F      Y
  11083.                     INS             R        R      N
  11084.                     ISINDEX         R        F      Y
  11085.                     KBD             R        R      N
  11086.                     LABEL           R        R      N
  11087.                     LEGEND          R        R      N
  11088.                     LI              R        O      N
  11089.                     LINK            R        F      Y
  11090.                     MAP             R        R      N
  11091.                     MENU            R        R      N
  11092.                     META            R        F      Y
  11093.                     NOFRAMES        R        R      N
  11094.                     NOSCRIPT        R        R      N
  11095.                     OBJECT          R        R      N
  11096.                     OL              R        R      N
  11097.                     OPTION          R        O      N
  11098.                     P               R        O      N
  11099.                     PARAM           R        F      Y
  11100.                     PRE             R        R      N
  11101.                     Q               R        R      N
  11102.                     S               R        R      N
  11103.                     SAMP            R        R      N
  11104.                     SCRIPT          R        R      N
  11105.                     SELECT          R        R      N
  11106.                     SMALL           R        R      N
  11107.                     SPAN            R        R      N
  11108.                     STRIKE          R        R      N
  11109.                     STRONG          R        R      N
  11110.                     STYLE           R        R      N
  11111.                     SUB             R        R      N
  11112.                     SUP             R        R      N
  11113.                     TABLE           R        R      N
  11114.                     TBODY           O        O      N
  11115.                     TD              R        O      N
  11116.                     TEXTAREA        R        R      N
  11117.                     TFOOT           R        O      N
  11118.                     TH              R        O      N
  11119.                     THEAD           R        O      N
  11120.                     TITLE           R        R      N
  11121.                     TR              R        O      N
  11122.                     TT              R        R      N
  11123.                     U               R        R      N
  11124.                     UL              R        R      N
  11125.                     VAR             R        R      N
  11126.  
  11127.                              Index of Attributes
  11128.  
  11129.       Name        Related       Type                          Default                            Comment
  11130.                   Elements
  11131.  
  11132.  accept-charset    FORM        CDATA                          #IMPLIED                       list of supported
  11133.                                                                                                  charsets
  11134.  
  11135.  accept            INPUT       CDATA                          #IMPLIED                      list of MIME types
  11136.                                                                                              for file upload
  11137.  
  11138.  accesskey       A, LABEL,     CDATA                          #IMPLIED                       accessibility key
  11139.                   LEGEND                                                                        character
  11140.  
  11141.  action            FORM         %URL                         #REQUIRED                       server-side form
  11142.                                                                                                  handler
  11143.  align            CAPTION     %CAlign                         #IMPLIED                      relative to table
  11144.                   APPLET,
  11145.  align          IFRAME, IMG,  %IAlign                         #IMPLIED                          vertical or
  11146.                    INPUT                                                                   horizontal alignment
  11147.  align            LEGEND      %LAlign                         #IMPLIED                     relative to fieldset
  11148.  
  11149.  align            OBJECT      %OAlign                         #IMPLIED                      positioning inside
  11150.                                                                                                  document
  11151.  
  11152.  align             TABLE      %TAlign                         #IMPLIED                        table position
  11153.                                                                                             relative to window
  11154.  
  11155.                 DIV, H1, H2,   (left |
  11156.  align          H3, H4, H5,   center |                        #IMPLIED                          align, text
  11157.                    H6, P       right |                                                          alignment
  11158.                               justify)
  11159.                     COL,       (left |
  11160.                  COLGROUP,    center |
  11161.  align           TBODY, TD,    right |                       #IMPLIED
  11162.                  TFOOT, TH,   justify |
  11163.                  THEAD, TR     char)
  11164.                                (left |
  11165.  align              HR         right |                       #IMPLIED
  11166.                               center)
  11167.  
  11168.  alink             BODY        CDATA                          #IMPLIED                     bgcolor, text, link,
  11169.                                                                                                vlink, alink
  11170.  
  11171.  alt            APPLET, IMG,   CDATA                          #IMPLIED                     description for text
  11172.                    INPUT                                                                      only browsers
  11173.  
  11174.  alt               AREA        CDATA                         #REQUIRED                     description for text
  11175.                                                                                               only browsers
  11176.  
  11177.  archive          APPLET       CDATA                          #IMPLIED                        comma separated
  11178.                                                                                                archive list
  11179.  axes             TD, TH       CDATA                          #IMPLIED                      list of axis names
  11180.  
  11181.  axis             TD, TH       CDATA                          #IMPLIED                       defaults to cell
  11182.                                                                                                  content
  11183.  
  11184.  background        BODY         %URL                          #IMPLIED                       texture tile for
  11185.                                                                                            document background
  11186.  
  11187.  bgcolor           TABLE       %Color                         #IMPLIED                     background color for
  11188.                                                                                                   cells
  11189.  
  11190.  bgcolor            TR         %Color                         #IMPLIED                     background color for
  11191.                                                                                                    row
  11192.  
  11193.  bgcolor          TD, TH       %Color                         #IMPLIED                        cell background
  11194.                                                                                                   color
  11195.  bgcolor           BODY        CDATA                         #IMPLIED
  11196.  
  11197.  border           OBJECT      %Length                         #IMPLIED                        suggested link
  11198.                                                                                                border width
  11199.  
  11200.  border             IMG       %Pixels                         #IMPLIED                        suggested link
  11201.                                                                                                border width
  11202.  
  11203.  border            TABLE       CDATA                          #IMPLIED                     controls frame width
  11204.                                                                                                around table
  11205.  cellpadding       TABLE       CDATA                          #IMPLIED                     spacing within cells
  11206.  
  11207.  cellspacing       TABLE       CDATA                          #IMPLIED                        spacing between
  11208.                                                                                                   cells
  11209.                     COL,
  11210.                  COLGROUP,
  11211.  char            TBODY, TD,    CDATA                          #IMPLIED                     alignment char, e.g.
  11212.                  TFOOT, TH,                                                                      char=':'
  11213.                  THEAD, TR
  11214.                     COL,
  11215.                  COLGROUP,
  11216.  charoff         TBODY, TD,    CDATA                          #IMPLIED                     offset for alignment
  11217.                  TFOOT, TH,                                                                        char
  11218.                  THEAD, TR
  11219.  
  11220.  charset             A         CDATA                          #IMPLIED                       char encoding of
  11221.                                                                                              linked resource
  11222.  
  11223.  checked           INPUT     (checked)                        #IMPLIED                       for radio buttons
  11224.                                                                                              and check boxes
  11225.  
  11226.  cite           BLOCKQUOTE,     %URL                          #IMPLIED                        URL for source
  11227.                      Q                                                                       document or msg
  11228.  
  11229.  cite            DEL, INS       %URL                          #IMPLIED                      info on reason for
  11230.                                                                                                   change
  11231.                 A, ACRONYM,
  11232.                 ADDRESS, B,
  11233.                     BIG,
  11234.                 BLOCKQUOTE,
  11235.                  BODY, BR,
  11236.                   BUTTON,
  11237.                   CAPTION,
  11238.                   CENTER,
  11239.                 CITE, CODE,
  11240.                     COL,
  11241.                  COLGROUP,
  11242.                   DD, DEL,
  11243.                  DFN, DIR,
  11244.                 DIV, DL, DT,
  11245.                     EM,
  11246.                  FIELDSET,
  11247.                  FORM, H1,
  11248.                 H2, H3, H4,
  11249.                 H5, H6, HR,
  11250.                   I, IMG,
  11251.  class          INPUT, INS,    CDATA                          #IMPLIED                     space separated list
  11252.                   ISINDEX,                                                                      of classes
  11253.                 KBD, LABEL,
  11254.                 LEGEND, LI,
  11255.                  LINK, MAP,
  11256.                    MENU,
  11257.                 OBJECT, OL,
  11258.                  OPTION, P,
  11259.                  PRE, Q, S,
  11260.                    SAMP,
  11261.                   SELECT,
  11262.                 SMALL, SPAN,
  11263.                   STRIKE,
  11264.                 STRONG, SUB,
  11265.                 SUP, TABLE,
  11266.                  TBODY, TD,
  11267.                  TEXTAREA,
  11268.                  TFOOT, TH,
  11269.                  THEAD, TR,
  11270.                  TT, U, UL,
  11271.                     VAR
  11272.  
  11273.  classid          OBJECT        %URL                          #IMPLIED                         identifies an
  11274.                                                                                               implementation
  11275.                              (left | all
  11276.  clear              BR        | right |                         none                       control of text flow
  11277.                                none)
  11278.  code             APPLET       CDATA                          #IMPLIED                      applet class file
  11279.  
  11280.  codebase         APPLET        %URL                          #IMPLIED                       optional base URL
  11281.                                                                                                 for applet
  11282.  
  11283.  codebase         OBJECT        %URL                          #IMPLIED                     some systems need an
  11284.                                                                                               additional URL
  11285.  
  11286.  codetype         OBJECT    %ContentType                      #IMPLIED                       Internet content
  11287.                                                                                               type for code
  11288.  
  11289.  color           BASEFONT,     CDATA                          #IMPLIED                     #RRGGBB in hex, e.g.
  11290.                    FONT                                                                       red: "#FF0000"
  11291.  
  11292.  cols            FRAMESET      CDATA                          #IMPLIED                         if not given,
  11293.                                                                                            default is 1 column
  11294.  
  11295.  cols              TABLE       NUMBER                         #IMPLIED                      used for immediate
  11296.                                                                                                display mode
  11297.  cols            TEXTAREA      NUMBER                        #REQUIRED
  11298.  
  11299.  colspan          TD, TH       NUMBER                            1                            number of cols
  11300.                                                                                              spanned by cell
  11301.  compact         DIR, MENU   (compact)                       #IMPLIED
  11302.  
  11303.  compact        DL, OL, UL   (compact)                        #IMPLIED                       reduced interitem
  11304.                                                                                                  spacing
  11305.  
  11306.  content           META        CDATA                         #REQUIRED                          associated
  11307.                                                                                                information
  11308.  
  11309.  coords            AREA       %Coords                         #IMPLIED                     comma separated list
  11310.                                                                                                 of values
  11311.  
  11312.  coords              A        %Coords                         #IMPLIED                      for use with OBJECT
  11313.                                                                                                   SHAPES
  11314.  
  11315.  data             OBJECT        %URL                          #IMPLIED                         reference to
  11316.                                                                                               object's data
  11317.  
  11318.  datetime        DEL, INS      CDATA                          #IMPLIED                       when changed: ISO
  11319.                                                                                                date format
  11320.  
  11321.  declare          OBJECT     (declare)                        #IMPLIED                       declare but don't
  11322.                                                                                              instantiate flag
  11323.                 A, ACRONYM,
  11324.                 ADDRESS, B,
  11325.                     BIG,
  11326.                 BLOCKQUOTE,
  11327.                    BODY,
  11328.                   BUTTON,
  11329.                   CAPTION,
  11330.                   CENTER,
  11331.                 CITE, CODE,
  11332.                     COL,
  11333.                  COLGROUP,
  11334.                   DD, DEL,
  11335.                  DFN, DIR,
  11336.                 DIV, DL, DT,
  11337.                     EM,
  11338.                  FIELDSET,
  11339.                  FORM, H1,
  11340.                 H2, H3, H4,
  11341.                   H5, H6,
  11342.                 HEAD, HTML,
  11343.                   I, IMG,
  11344.  dir            INPUT, INS, (ltr | rtl)                       #IMPLIED                         direction for
  11345.                   ISINDEX,                                                                  weak/neutral text
  11346.                 KBD, LABEL,
  11347.                 LEGEND, LI,
  11348.                 LINK, MENU,
  11349.                    META,
  11350.                 OBJECT, OL,
  11351.                  OPTION, P,
  11352.                  PRE, Q, S,
  11353.                    SAMP,
  11354.                   SELECT,
  11355.                 SMALL, SPAN,
  11356.                   STRIKE,
  11357.                   STRONG,
  11358.                 STYLE, SUB,
  11359.                 SUP, TABLE,
  11360.                  TBODY, TD,
  11361.                  TEXTAREA,
  11362.                  TFOOT, TH,
  11363.                    THEAD,
  11364.                  TITLE, TR,
  11365.                  TT, U, UL,
  11366.                     VAR
  11367.  dir                BDO     (ltr | rtl)                      #REQUIRED                        directionality
  11368.                   BUTTON,
  11369.                    INPUT,
  11370.                                                                                                 control is
  11371.  disabled          LABEL,    (disabled)                       #IMPLIED                      unavailable in this
  11372.                   OPTION,
  11373.                   SELECT,                                                                        context
  11374.                  TEXTAREA
  11375.  enctype           FORM     %ContentType        "application/x-www-form-urlencoded"
  11376.  
  11377.  face            BASEFONT,     CDATA                          #IMPLIED                     comma separated list
  11378.                    FONT                                                                       of font names
  11379.  
  11380.  for               LABEL       IDREF                          #IMPLIED                       matches field ID
  11381.                                                                                                   value
  11382.  
  11383.  frame             TABLE      %TFrame                         #IMPLIED                     which parts of table
  11384.                                                                                              frame to include
  11385.  
  11386.  frameborder       FRAME,     (1 | 0)                            1                             request frame
  11387.                   IFRAME                                                                         borders?
  11388.  
  11389.  height           IFRAME,     %Length                         #IMPLIED                       suggested height
  11390.                   OBJECT
  11391.  
  11392.  height             IMG       %Pixels                         #IMPLIED                      suggested height in
  11393.                                                                                                   pixels
  11394.  
  11395.  height           APPLET      %Pixels                        #REQUIRED                      suggested height in
  11396.                                                                                                   pixels
  11397.  
  11398.  href             A, LINK       %URL                          #IMPLIED                        URL for linked
  11399.                                                                                                  resource
  11400.  
  11401.  href              AREA         %URL                          #IMPLIED                      this region acts as
  11402.                                                                                               hypertext link
  11403.  href              BASE         %URL                         #REQUIRED
  11404.  
  11405.  hspace           OBJECT      %Length                         #IMPLIED                     suggested horizontal
  11406.                                                                                                   gutter
  11407.  
  11408.  hspace         APPLET, IMG   %Pixels                         #IMPLIED                     suggested horizontal
  11409.                                                                                                   gutter
  11410.  
  11411.  http-equiv        META         NAME                          #IMPLIED                     HTTP response header
  11412.                                                                                                    name
  11413.                 A, ACRONYM,
  11414.                 ADDRESS, B,
  11415.                     BIG,
  11416.                 BLOCKQUOTE,
  11417.                  BODY, BR,
  11418.                   BUTTON,
  11419.                   CAPTION,
  11420.                   CENTER,
  11421.                 CITE, CODE,
  11422.                     COL,
  11423.                  COLGROUP,
  11424.                   DD, DEL,
  11425.                  DFN, DIR,
  11426.                 DIV, DL, DT,
  11427.                     EM,
  11428.                  FIELDSET,
  11429.                  FORM, H1,
  11430.                 H2, H3, H4,
  11431.                 H5, H6, HR,
  11432.                   I, IMG,
  11433.  id             INPUT, INS,      ID                           #IMPLIED                     document-wide unique
  11434.                   ISINDEX,                                                                          id
  11435.                 KBD, LABEL,
  11436.                 LEGEND, LI,
  11437.                  LINK, MAP,
  11438.                    MENU,
  11439.                 OBJECT, OL,
  11440.                  OPTION, P,
  11441.                  PRE, Q, S,
  11442.                    SAMP,
  11443.                   SELECT,
  11444.                 SMALL, SPAN,
  11445.                   STRIKE,
  11446.                 STRONG, SUB,
  11447.                 SUP, TABLE,
  11448.                  TBODY, TD,
  11449.                  TEXTAREA,
  11450.                  TFOOT, TH,
  11451.                  THEAD, TR,
  11452.                  TT, U, UL,
  11453.                     VAR
  11454.  
  11455.  ismap              IMG       (ismap)                         #IMPLIED                        use server-side
  11456.                                                                                                 image map
  11457.                 A, ACRONYM,
  11458.                 ADDRESS, B,
  11459.                  BDO, BIG,
  11460.                 BLOCKQUOTE,
  11461.                    BODY,
  11462.                   BUTTON,
  11463.                   CAPTION,
  11464.                   CENTER,
  11465.                 CITE, CODE,
  11466.                     COL,
  11467.                  COLGROUP,
  11468.                   DD, DEL,
  11469.                  DFN, DIR,
  11470.                 DIV, DL, DT,
  11471.                     EM,
  11472.                  FIELDSET,
  11473.                  FORM, H1,
  11474.                 H2, H3, H4,
  11475.                   H5, H6,
  11476.                 HEAD, HTML,
  11477.                   I, IMG,
  11478.  lang           INPUT, INS,     NAME                          #IMPLIED                      [RFC1766] language
  11479.                   ISINDEX,                                                                        value
  11480.                 KBD, LABEL,
  11481.                 LEGEND, LI,
  11482.                 LINK, MENU,
  11483.                    META,
  11484.                 OBJECT, OL,
  11485.                  OPTION, P,
  11486.                  PRE, Q, S,
  11487.                    SAMP,
  11488.                   SELECT,
  11489.                 SMALL, SPAN,
  11490.                   STRIKE,
  11491.                   STRONG,
  11492.                 STYLE, SUB,
  11493.                 SUP, TABLE,
  11494.                  TBODY, TD,
  11495.                  TEXTAREA,
  11496.                  TFOOT, TH,
  11497.                    THEAD,
  11498.                  TITLE, TR,
  11499.                  TT, U, UL,
  11500.                     VAR
  11501.  
  11502.  language         SCRIPT       CDATA                          #IMPLIED                       predefined script
  11503.                                                                                               language name
  11504.  link              BODY        CDATA                         #IMPLIED
  11505.  
  11506.  marginheight      FRAME,     %Pixels                         #IMPLIED                       margin height in
  11507.                   IFRAME                                                                          pixels
  11508.  
  11509.  marginwidth       FRAME,     %Pixels                         #IMPLIED                       margin widths in
  11510.                   IFRAME                                                                          pixels
  11511.  
  11512.  maxlength         INPUT       NUMBER                         #IMPLIED                      max chars for text
  11513.                                                                                                   fields
  11514.  
  11515.  media             STYLE       CDATA                          #IMPLIED                       designed for use
  11516.                                                                                              with these media
  11517.  
  11518.  media             LINK        CDATA                          #IMPLIED                       for rendering on
  11519.                                                                                                these media
  11520.  
  11521.  method            FORM     (GET | POST)                        GET                         HTTP method used to
  11522.                                                                                              submit the form
  11523.  
  11524.  multiple         SELECT     (multiple)                       #IMPLIED                       default is single
  11525.                                                                                                 selection
  11526.  
  11527.  name             OBJECT        %URL                          #IMPLIED                       submit as part of
  11528.                                                                                                    form
  11529.  name               MAP        CDATA                         #IMPLIED
  11530.  
  11531.  name             APPLET       CDATA                          #IMPLIED                       allows applets to
  11532.                                                                                              find each other
  11533.  
  11534.  name             BUTTON       CDATA                          #IMPLIED                      for scripting/forms
  11535.                                                                                              as submit button
  11536.  
  11537.  name              FRAME,      CDATA                          #IMPLIED                       name of frame for
  11538.                   IFRAME                                                                        targetting
  11539.  name                A         CDATA                          #IMPLIED                        named link end
  11540.  
  11541.  name              INPUT       CDATA                          #IMPLIED                     required for all but
  11542.                                                                                               submit & reset
  11543.  name            TEXTAREA      CDATA                         #REQUIRED
  11544.  name             SELECT       CDATA                         #REQUIRED                          field name
  11545.  name              PARAM       CDATA                         #REQUIRED                        property name
  11546.  name              META         NAME                          #IMPLIED                     metainformation name
  11547.  
  11548.  nohref            AREA       (nohref)                        #IMPLIED                      this region has no
  11549.                                                                                                   action
  11550.  
  11551.  noresize          FRAME     (noresize)                       #IMPLIED                        allow users to
  11552.                                                                                               resize frames?
  11553.  noshade            HR       (noshade)                       #IMPLIED
  11554.  nowrap           TD, TH      (nowrap)                        #IMPLIED                      suppress word wrap
  11555.  
  11556.  object           APPLET       CDATA                          #IMPLIED                       serialized applet
  11557.                                                                                                    file
  11558.                   BUTTON,
  11559.                    INPUT,
  11560.  onblur            LABEL,     %Script                         #IMPLIED                     the element lost the
  11561.                   SELECT,                                                                         focus
  11562.                  TEXTAREA
  11563.                    INPUT,
  11564.  onchange         SELECT,     %Script                         #IMPLIED                       the element value
  11565.                  TEXTAREA                                                                      was changed
  11566.                 A, ACRONYM,
  11567.                 ADDRESS, B,
  11568.                     BIG,
  11569.                 BLOCKQUOTE,
  11570.                    BODY,
  11571.                   BUTTON,
  11572.                   CAPTION,
  11573.                   CENTER,
  11574.                 CITE, CODE,
  11575.                     COL,
  11576.                  COLGROUP,
  11577.                   DD, DEL,
  11578.                  DFN, DIR,
  11579.                 DIV, DL, DT,
  11580.                     EM,
  11581.                  FIELDSET,
  11582.                  FORM, H1,
  11583.                 H2, H3, H4,
  11584.                 H5, H6, HR,
  11585.  onclick          I, IMG,      CDATA                          #IMPLIED                      the pointing device
  11586.                 INPUT, INS,                                                                 button was clicked
  11587.                 KBD, LABEL,
  11588.                 LEGEND, LI,
  11589.                 LINK, MENU,
  11590.                 OBJECT, OL,
  11591.                  OPTION, P,
  11592.                  PRE, Q, S,
  11593.                    SAMP,
  11594.                   SELECT,
  11595.                 SMALL, SPAN,
  11596.                   STRIKE,
  11597.                 STRONG, SUB,
  11598.                 SUP, TABLE,
  11599.                  TBODY, TD,
  11600.                  TEXTAREA,
  11601.                  TFOOT, TH,
  11602.                  THEAD, TR,
  11603.                  TT, U, UL,
  11604.                     VAR
  11605.                 A, ACRONYM,
  11606.                 ADDRESS, B,
  11607.                     BIG,
  11608.                 BLOCKQUOTE,
  11609.                    BODY,
  11610.                   BUTTON,
  11611.                   CAPTION,
  11612.                   CENTER,
  11613.                 CITE, CODE,
  11614.                     COL,
  11615.                  COLGROUP,
  11616.                   DD, DEL,
  11617.                  DFN, DIR,
  11618.                 DIV, DL, DT,
  11619.                     EM,
  11620.                  FIELDSET,
  11621.                  FORM, H1,
  11622.                 H2, H3, H4,
  11623.                 H5, H6, HR,                                                                 the pointing device
  11624.  ondblclick       I, IMG,      CDATA                          #IMPLIED                       button was double
  11625.                 INPUT, INS,                                                                      clicked
  11626.                 KBD, LABEL,
  11627.                 LEGEND, LI,
  11628.                 LINK, MENU,
  11629.                 OBJECT, OL,
  11630.                  OPTION, P,
  11631.                  PRE, Q, S,
  11632.                    SAMP,
  11633.                   SELECT,
  11634.                 SMALL, SPAN,
  11635.                   STRIKE,
  11636.                 STRONG, SUB,
  11637.                 SUP, TABLE,
  11638.                  TBODY, TD,
  11639.                  TEXTAREA,
  11640.                  TFOOT, TH,
  11641.                  THEAD, TR,
  11642.                  TT, U, UL,
  11643.                     VAR
  11644.                   BUTTON,
  11645.                    INPUT,
  11646.  onfocus           LABEL,     %Script                         #IMPLIED                      the element got the
  11647.                   SELECT,                                                                         focus
  11648.                  TEXTAREA
  11649.                 A, ACRONYM,
  11650.                 ADDRESS, B,
  11651.                     BIG,
  11652.                 BLOCKQUOTE,
  11653.                    BODY,
  11654.                   BUTTON,
  11655.                   CAPTION,
  11656.                   CENTER,
  11657.                 CITE, CODE,
  11658.                     COL,
  11659.                  COLGROUP,
  11660.                   DD, DEL,
  11661.                  DFN, DIR,
  11662.                 DIV, DL, DT,
  11663.                     EM,
  11664.                  FIELDSET,
  11665.                  FORM, H1,
  11666.                 H2, H3, H4,
  11667.                 H5, H6, HR,
  11668.  onkeydown        I, IMG,      CDATA                          #IMPLIED                       a key was pressed
  11669.                 INPUT, INS,                                                                        down
  11670.                 KBD, LABEL,
  11671.                 LEGEND, LI,
  11672.                 LINK, MENU,
  11673.                 OBJECT, OL,
  11674.                  OPTION, P,
  11675.                  PRE, Q, S,
  11676.                    SAMP,
  11677.                   SELECT,
  11678.                 SMALL, SPAN,
  11679.                   STRIKE,
  11680.                 STRONG, SUB,
  11681.                 SUP, TABLE,
  11682.                  TBODY, TD,
  11683.                  TEXTAREA,
  11684.                  TFOOT, TH,
  11685.                  THEAD, TR,
  11686.                  TT, U, UL,
  11687.                     VAR
  11688.                 A, ACRONYM,
  11689.                 ADDRESS, B,
  11690.                     BIG,
  11691.                 BLOCKQUOTE,
  11692.                    BODY,
  11693.                   BUTTON,
  11694.                   CAPTION,
  11695.                   CENTER,
  11696.                 CITE, CODE,
  11697.                     COL,
  11698.                  COLGROUP,
  11699.                   DD, DEL,
  11700.                  DFN, DIR,
  11701.                 DIV, DL, DT,
  11702.                     EM,
  11703.                  FIELDSET,
  11704.                  FORM, H1,
  11705.                 H2, H3, H4,
  11706.                 H5, H6, HR,
  11707.  onkeypress       I, IMG,      CDATA                          #IMPLIED                       a key was pressed
  11708.                 INPUT, INS,                                                                    and released
  11709.                 KBD, LABEL,
  11710.                 LEGEND, LI,
  11711.                 LINK, MENU,
  11712.                 OBJECT, OL,
  11713.                  OPTION, P,
  11714.                  PRE, Q, S,
  11715.                    SAMP,
  11716.                   SELECT,
  11717.                 SMALL, SPAN,
  11718.                   STRIKE,
  11719.                 STRONG, SUB,
  11720.                 SUP, TABLE,
  11721.                  TBODY, TD,
  11722.                  TEXTAREA,
  11723.                  TFOOT, TH,
  11724.                  THEAD, TR,
  11725.                  TT, U, UL,
  11726.                     VAR
  11727.                 A, ACRONYM,
  11728.                 ADDRESS, B,
  11729.                     BIG,
  11730.                 BLOCKQUOTE,
  11731.                    BODY,
  11732.                   BUTTON,
  11733.                   CAPTION,
  11734.                   CENTER,
  11735.                 CITE, CODE,
  11736.                     COL,
  11737.                  COLGROUP,
  11738.                   DD, DEL,
  11739.                  DFN, DIR,
  11740.                 DIV, DL, DT,
  11741.                     EM,
  11742.                  FIELDSET,
  11743.                  FORM, H1,
  11744.                 H2, H3, H4,
  11745.                 H5, H6, HR,
  11746.  onkeyup          I, IMG,      CDATA                          #IMPLIED                      a key was released
  11747.                 INPUT, INS,
  11748.                 KBD, LABEL,
  11749.                 LEGEND, LI,
  11750.                 LINK, MENU,
  11751.                 OBJECT, OL,
  11752.                  OPTION, P,
  11753.                  PRE, Q, S,
  11754.                    SAMP,
  11755.                   SELECT,
  11756.                 SMALL, SPAN,
  11757.                   STRIKE,
  11758.                 STRONG, SUB,
  11759.                 SUP, TABLE,
  11760.                  TBODY, TD,
  11761.                  TEXTAREA,
  11762.                  TFOOT, TH,
  11763.                  THEAD, TR,
  11764.                  TT, U, UL,
  11765.                     VAR
  11766.  
  11767.  onload          FRAMESET     %Script                         #IMPLIED                      all the frames have
  11768.                                                                                                been loaded
  11769.  
  11770.  onload            BODY       %Script                         #IMPLIED                       the document has
  11771.                                                                                                been loaded
  11772.                 A, ACRONYM,
  11773.                 ADDRESS, B,
  11774.                     BIG,
  11775.                 BLOCKQUOTE,
  11776.                    BODY,
  11777.                   BUTTON,
  11778.                   CAPTION,
  11779.                   CENTER,
  11780.                 CITE, CODE,
  11781.                     COL,
  11782.                  COLGROUP,
  11783.                   DD, DEL,
  11784.                  DFN, DIR,
  11785.                 DIV, DL, DT,
  11786.                     EM,
  11787.                  FIELDSET,
  11788.                  FORM, H1,
  11789.                 H2, H3, H4,
  11790.                 H5, H6, HR,                                                                 the pointing device
  11791.  onmousedown      I, IMG,      CDATA                          #IMPLIED                      button was pressed
  11792.                 INPUT, INS,                                                                        down
  11793.                 KBD, LABEL,
  11794.                 LEGEND, LI,
  11795.                 LINK, MENU,
  11796.                 OBJECT, OL,
  11797.                  OPTION, P,
  11798.                  PRE, Q, S,
  11799.                    SAMP,
  11800.                   SELECT,
  11801.                 SMALL, SPAN,
  11802.                   STRIKE,
  11803.                 STRONG, SUB,
  11804.                 SUP, TABLE,
  11805.                  TBODY, TD,
  11806.                  TEXTAREA,
  11807.                  TFOOT, TH,
  11808.                  THEAD, TR,
  11809.                  TT, U, UL,
  11810.                     VAR
  11811.                 A, ACRONYM,
  11812.                 ADDRESS, B,
  11813.                     BIG,
  11814.                 BLOCKQUOTE,
  11815.                    BODY,
  11816.                   BUTTON,
  11817.                   CAPTION,
  11818.                   CENTER,
  11819.                 CITE, CODE,
  11820.                     COL,
  11821.                  COLGROUP,
  11822.                   DD, DEL,
  11823.                  DFN, DIR,
  11824.                 DIV, DL, DT,
  11825.                     EM,
  11826.                  FIELDSET,
  11827.                  FORM, H1,
  11828.                 H2, H3, H4,
  11829.                 H5, H6, HR,
  11830.  onmousemove      I, IMG,      CDATA                          #IMPLIED                      the pointing device
  11831.                 INPUT, INS,                                                                     was moved
  11832.                 KBD, LABEL,
  11833.                 LEGEND, LI,
  11834.                 LINK, MENU,
  11835.                 OBJECT, OL,
  11836.                  OPTION, P,
  11837.                  PRE, Q, S,
  11838.                    SAMP,
  11839.                   SELECT,
  11840.                 SMALL, SPAN,
  11841.                   STRIKE,
  11842.                 STRONG, SUB,
  11843.                 SUP, TABLE,
  11844.                  TBODY, TD,
  11845.                  TEXTAREA,
  11846.                  TFOOT, TH,
  11847.                  THEAD, TR,
  11848.                  TT, U, UL,
  11849.                     VAR
  11850.                 A, ACRONYM,
  11851.                 ADDRESS, B,
  11852.                     BIG,
  11853.                 BLOCKQUOTE,
  11854.                    BODY,
  11855.                   BUTTON,
  11856.                   CAPTION,
  11857.                   CENTER,
  11858.                 CITE, CODE,
  11859.                     COL,
  11860.                  COLGROUP,
  11861.                   DD, DEL,
  11862.                  DFN, DIR,
  11863.                 DIV, DL, DT,
  11864.                     EM,
  11865.                  FIELDSET,
  11866.                  FORM, H1,
  11867.                 H2, H3, H4,
  11868.                 H5, H6, HR,
  11869.  onmouseout       I, IMG,      CDATA                          #IMPLIED                      the pointing device
  11870.                 INPUT, INS,                                                                   was moved away
  11871.                 KBD, LABEL,
  11872.                 LEGEND, LI,
  11873.                 LINK, MENU,
  11874.                 OBJECT, OL,
  11875.                  OPTION, P,
  11876.                  PRE, Q, S,
  11877.                    SAMP,
  11878.                   SELECT,
  11879.                 SMALL, SPAN,
  11880.                   STRIKE,
  11881.                 STRONG, SUB,
  11882.                 SUP, TABLE,
  11883.                  TBODY, TD,
  11884.                  TEXTAREA,
  11885.                  TFOOT, TH,
  11886.                  THEAD, TR,
  11887.                  TT, U, UL,
  11888.                     VAR
  11889.                 A, ACRONYM,
  11890.                 ADDRESS, B,
  11891.                     BIG,
  11892.                 BLOCKQUOTE,
  11893.                    BODY,
  11894.                   BUTTON,
  11895.                   CAPTION,
  11896.                   CENTER,
  11897.                 CITE, CODE,
  11898.                     COL,
  11899.                  COLGROUP,
  11900.                   DD, DEL,
  11901.                  DFN, DIR,
  11902.                 DIV, DL, DT,
  11903.                     EM,
  11904.                  FIELDSET,
  11905.                  FORM, H1,
  11906.                 H2, H3, H4,
  11907.                 H5, H6, HR,
  11908.  onmouseover      I, IMG,      CDATA                          #IMPLIED                      the pointing device
  11909.                 INPUT, INS,                                                                   was moved over
  11910.                 KBD, LABEL,
  11911.                 LEGEND, LI,
  11912.                 LINK, MENU,
  11913.                 OBJECT, OL,
  11914.                  OPTION, P,
  11915.                  PRE, Q, S,
  11916.                    SAMP,
  11917.                   SELECT,
  11918.                 SMALL, SPAN,
  11919.                   STRIKE,
  11920.                 STRONG, SUB,
  11921.                 SUP, TABLE,
  11922.                  TBODY, TD,
  11923.                  TEXTAREA,
  11924.                  TFOOT, TH,
  11925.                  THEAD, TR,
  11926.                  TT, U, UL,
  11927.                     VAR
  11928.                 A, ACRONYM,
  11929.                 ADDRESS, B,
  11930.                     BIG,
  11931.                 BLOCKQUOTE,
  11932.                    BODY,
  11933.                   BUTTON,
  11934.                   CAPTION,
  11935.                   CENTER,
  11936.                 CITE, CODE,
  11937.                     COL,
  11938.                  COLGROUP,
  11939.                   DD, DEL,
  11940.                  DFN, DIR,
  11941.                 DIV, DL, DT,
  11942.                     EM,
  11943.                  FIELDSET,
  11944.                  FORM, H1,
  11945.                 H2, H3, H4,
  11946.                 H5, H6, HR,
  11947.  onmouseup        I, IMG,      CDATA                          #IMPLIED                      the pointing device
  11948.                 INPUT, INS,                                                                button was released
  11949.                 KBD, LABEL,
  11950.                 LEGEND, LI,
  11951.                 LINK, MENU,
  11952.                 OBJECT, OL,
  11953.                  OPTION, P,
  11954.                  PRE, Q, S,
  11955.                    SAMP,
  11956.                   SELECT,
  11957.                 SMALL, SPAN,
  11958.                   STRIKE,
  11959.                 STRONG, SUB,
  11960.                 SUP, TABLE,
  11961.                  TBODY, TD,
  11962.                  TEXTAREA,
  11963.                  TFOOT, TH,
  11964.                  THEAD, TR,
  11965.                  TT, U, UL,
  11966.                     VAR
  11967.  onreset           FORM       %Script                         #IMPLIED                      the form was reset
  11968.                    INPUT,
  11969.  onselect         SELECT,     %Script                         #IMPLIED                         some text was
  11970.                  TEXTAREA                                                                        selected
  11971.  
  11972.  onsubmit          FORM       %Script                         #IMPLIED                         the form was
  11973.                                                                                                 submitted
  11974.  
  11975.  onunload        FRAMESET     %Script                         #IMPLIED                      all the frames have
  11976.                                                                                                been removed
  11977.  
  11978.  onunload          BODY       %Script                         #IMPLIED                       the document has
  11979.                                                                                                been removed
  11980.  
  11981.  profile           HEAD         %URL                          #IMPLIED                      named dictionary of
  11982.                                                                                                 meta info
  11983.  prompt           ISINDEX      CDATA                          #IMPLIED                        prompt message
  11984.  readonly        TEXTAREA    (readonly)                      #IMPLIED
  11985.  readonly          INPUT     (readonly)                       #IMPLIED                     for text and passwd
  11986.  rel              A, LINK      CDATA                          #IMPLIED                      forward link types
  11987.  rev              A, LINK      CDATA                          #IMPLIED                      reverse link types
  11988.  
  11989.  rows            FRAMESET      CDATA                          #IMPLIED                         if not given,
  11990.                                                                                              default is 1 row
  11991.  rows            TEXTAREA      NUMBER                        #REQUIRED
  11992.  
  11993.  rowspan          TD, TH       NUMBER                            1                            number of rows
  11994.                                                                                              spanned by cell
  11995.  
  11996.  rules             TABLE      %TRules                         #IMPLIED                     rulings between rows
  11997.                                                                                                  and cols
  11998.  
  11999.  scheme            META        CDATA                          #IMPLIED                        select form of
  12000.                                                                                                  content
  12001.  
  12002.  scrolling         FRAME,    (yes | no |                        auto                        scrollbar or none
  12003.                   IFRAME       auto)
  12004.  selected         OPTION     (selected)                      #IMPLIED
  12005.                                                                                                  controls
  12006.  shape             AREA        %Shape                           rect                         interpretation of
  12007.                                                                                                   coords
  12008.  
  12009.  shape               A         %Shape                           rect                        for use with OBJECT
  12010.                                                                                                   SHAPES
  12011.  
  12012.  shapes           OBJECT      (shapes)                        #IMPLIED                       object has shaped
  12013.                                                                                              hypertext links
  12014.  size               HR        %Pixels                        #IMPLIED
  12015.  
  12016.  size              FONT        CDATA                          #IMPLIED                          [+]nn e.g.
  12017.                                                                                             size="+1", size=4
  12018.  
  12019.  size              INPUT       CDATA                          #IMPLIED                       specific to each
  12020.                                                                                               type of field
  12021.  
  12022.  size            BASEFONT      CDATA                         #REQUIRED                      base font size for
  12023.                                                                                               FONT elements
  12024.  size             SELECT       NUMBER                         #IMPLIED                         rows visible
  12025.  
  12026.  span            COLGROUP      NUMBER                            1                           default number of
  12027.                                                                                              columns in group
  12028.  
  12029.  span               COL        NUMBER                            1                           number of columns
  12030.                                                                                              spanned by group
  12031.  
  12032.  src              SCRIPT        %URL                          #IMPLIED                      URL for an external
  12033.                                                                                                   script
  12034.  
  12035.  src               INPUT        %URL                          #IMPLIED                        for fields with
  12036.                                                                                                   images
  12037.  
  12038.  src               FRAME,       %URL                          #IMPLIED                        source of frame
  12039.                   IFRAME                                                                         content
  12040.  
  12041.  src                IMG         %URL                         #REQUIRED                        URL of image to
  12042.                                                                                                   embed
  12043.  
  12044.  standby          OBJECT       CDATA                          #IMPLIED                        message to show
  12045.                                                                                               while loading
  12046.  
  12047.  start              OL         NUMBER                         #IMPLIED                       starting sequence
  12048.                                                                                                   number
  12049.                 A, ACRONYM,
  12050.                 ADDRESS, B,
  12051.                     BIG,
  12052.                 BLOCKQUOTE,
  12053.                  BODY, BR,
  12054.                   BUTTON,
  12055.                   CAPTION,
  12056.                   CENTER,
  12057.                 CITE, CODE,
  12058.                     COL,
  12059.                  COLGROUP,
  12060.                   DD, DEL,
  12061.                  DFN, DIR,
  12062.                 DIV, DL, DT,
  12063.                     EM,
  12064.                  FIELDSET,
  12065.                  FORM, H1,
  12066.                 H2, H3, H4,
  12067.                 H5, H6, HR,
  12068.                   I, IMG,
  12069.  style          INPUT, INS,    CDATA                          #IMPLIED                       associated style
  12070.                   ISINDEX,                                                                         info
  12071.                 KBD, LABEL,
  12072.                 LEGEND, LI,
  12073.                  LINK, MAP,
  12074.                    MENU,
  12075.                 OBJECT, OL,
  12076.                  OPTION, P,
  12077.                  PRE, Q, S,
  12078.                    SAMP,
  12079.                   SELECT,
  12080.                 SMALL, SPAN,
  12081.                   STRIKE,
  12082.                 STRONG, SUB,
  12083.                 SUP, TABLE,
  12084.                  TBODY, TD,
  12085.                  TEXTAREA,
  12086.                  TFOOT, TH,
  12087.                  THEAD, TR,
  12088.                  TT, U, UL,
  12089.                     VAR
  12090.                   A, AREA,
  12091.                   BUTTON,
  12092.  tabindex          INPUT,      NUMBER                         #IMPLIED                      position in tabbing
  12093.                   OBJECT,                                                                         order
  12094.                   SELECT,
  12095.                  TEXTAREA
  12096.  
  12097.  target         AREA, BASE,    CDATA                          #IMPLIED                        where to render
  12098.                    LINK                                                                      linked resource
  12099.  
  12100.  target              A         CDATA                          #IMPLIED                        where to render
  12101.                                                                                                  resource
  12102.  
  12103.  target            FORM        CDATA                          #IMPLIED                        where to render
  12104.                                                                                                   result
  12105.  text              BODY        CDATA                         #IMPLIED
  12106.  title             STYLE       CDATA                          #IMPLIED                        advisory title
  12107.                 A, ACRONYM,
  12108.                 ADDRESS, B,
  12109.                     BIG,
  12110.                 BLOCKQUOTE,
  12111.                  BODY, BR,
  12112.                   BUTTON,
  12113.                   CAPTION,
  12114.                   CENTER,
  12115.                 CITE, CODE,
  12116.                     COL,
  12117.                  COLGROUP,
  12118.                   DD, DEL,
  12119.                  DFN, DIR,
  12120.                 DIV, DL, DT,
  12121.                     EM,
  12122.                  FIELDSET,
  12123.                  FORM, H1,
  12124.                 H2, H3, H4,
  12125.                 H5, H6, HR,
  12126.                   I, IMG,
  12127.  title          INPUT, INS,    CDATA                          #IMPLIED                           advisory
  12128.                   ISINDEX,                                                                 title/amplification
  12129.                 KBD, LABEL,
  12130.                 LEGEND, LI,
  12131.                  LINK, MAP,
  12132.                    MENU,
  12133.                 OBJECT, OL,
  12134.                  OPTION, P,
  12135.                  PRE, Q, S,
  12136.                    SAMP,
  12137.                   SELECT,
  12138.                 SMALL, SPAN,
  12139.                   STRIKE,
  12140.                 STRONG, SUB,
  12141.                 SUP, TABLE,
  12142.                  TBODY, TD,
  12143.                  TEXTAREA,
  12144.                  TFOOT, TH,
  12145.                  THEAD, TR,
  12146.                  TT, U, UL,
  12147.                     VAR
  12148.  
  12149.  type             OBJECT    %ContentType                      #IMPLIED                       Internet content
  12150.                                                                                               type for data
  12151.  
  12152.  type              LINK     %ContentType                      #IMPLIED                       advisory Internet
  12153.                                                                                                content type
  12154.  
  12155.  type              INPUT     %InputType                         TEXT                        what kind of widget
  12156.                                                                                                 is needed
  12157.  type               LI        %LIStyle                        #IMPLIED                       list item style
  12158.  type               OL        %OLStyle                        #IMPLIED                       numbering style
  12159.  type               UL       (%ULStyle)                       #IMPLIED                         bullet style
  12160.  
  12161.  type             BUTTON      (submit |                       #IMPLIED                        for use as form
  12162.                                reset)                                                      submit/reset button
  12163.                                                                                              Internet content
  12164.  type             SCRIPT       CDATA                          #IMPLIED                        type for script
  12165.                                                                                                  language
  12166.  type              PARAM       CDATA                          #IMPLIED                     Internet media type
  12167.                                                                                              Internet content
  12168.  type              STYLE       CDATA                         #REQUIRED                        type for style
  12169.                                                                                                  language
  12170.  
  12171.  usemap           OBJECT        %URL                          #IMPLIED                      reference to image
  12172.                                                                                                    map
  12173.  
  12174.  usemap         IMG, INPUT      %URL                          #IMPLIED                        use client-side
  12175.                                                                                                 image map
  12176.                     COL,
  12177.                  COLGROUP,     (top |
  12178.  valign          TBODY, TD,   middle |                        #IMPLIED                      vertical alignment
  12179.                  TFOOT, TH,   bottom |                                                           in cells
  12180.                  THEAD, TR   baseline)
  12181.  
  12182.  value            OPTION       CDATA                          #IMPLIED                      defaults to element
  12183.                                                                                                  content
  12184.                                                                                               gets passed to
  12185.  value            BUTTON       CDATA                          #IMPLIED                          server when
  12186.                                                                                                 submitted
  12187.  value             PARAM       CDATA                          #IMPLIED                        property value
  12188.  
  12189.  value             INPUT       CDATA                          #IMPLIED                      required for radio
  12190.                                                                                               and checkboxes
  12191.  
  12192.  value              LI         NUMBER                         #IMPLIED                        reset sequence
  12193.                                                                                                   number
  12194.  
  12195.  valuetype         PARAM     (DATA | REF                        DATA                         How to interpret
  12196.                              | OBJECT)                                                            value
  12197.  version           HTML        CDATA     'http://www.w3.org/TR/WD-html40-970708/HTML4.dtd'       Constant
  12198.  vlink             BODY        CDATA                         #IMPLIED
  12199.  
  12200.  vspace           OBJECT      %Length                         #IMPLIED                      suggested vertical
  12201.                                                                                                   gutter
  12202.  
  12203.  vspace         APPLET, IMG   %Pixels                         #IMPLIED                      suggested vertical
  12204.                                                                                                   gutter
  12205.  width              HR        %Length                        #IMPLIED
  12206.  
  12207.  width            IFRAME,     %Length                         #IMPLIED                       suggested width
  12208.                   OBJECT
  12209.  
  12210.  width              IMG       %Pixels                         #IMPLIED                      suggested width in
  12211.                                                                                                   pixels
  12212.  
  12213.  width            APPLET      %Pixels                        #REQUIRED                      suggested width in
  12214.                                                                                                   pixels
  12215.  
  12216.  width              COL        CDATA                          #IMPLIED                         column width
  12217.                                                                                               specification
  12218.  
  12219.  width           COLGROUP      CDATA                          #IMPLIED                       default width for
  12220.                                                                                               enclosed COLs
  12221.  
  12222.  width             TABLE       CDATA                          #IMPLIED                     table width relative
  12223.                                                                                                 to window
  12224.  width              PRE        NUMBER                        #IMPLIED
  12225.  
  12226.                                  Appendixes
  12227.  
  12228. Contents
  12229.  
  12230.    * Changes between HTML 3.2 and HTML 4.0
  12231.    * Performance, Implementation, and Design Notes
  12232.    * HTML and Organizations (W3C, IETF, ISO)
  12233.  
  12234.                    Changes between HTML 3.2 and HTML 4.0
  12235.  
  12236. Contents
  12237.  
  12238.   1. Changes to elements
  12239.        1. New elements
  12240.        2. Deprecated elements
  12241.        3. Obsolete elements
  12242.   2. Changes to Tables
  12243.   3. Changes to Forms
  12244.  
  12245. Changes to elements
  12246.  
  12247. New elements
  12248.  
  12249. The new elements in this version of HTML are Q, INS, DEL, ACRONYM, LEGEND,
  12250. COLGROUP, BUTTON, and FIELDSET.
  12251.  
  12252. Deprecated elements
  12253.  
  12254. The following elements are now deprecated: ISINDEX, APPLET, CENTER, FONT,
  12255. BASEFONT, STRIKE, S, U, DIR, and MENU.
  12256.  
  12257. Obsolete elements
  12258.  
  12259. The following elements are now obsolete: XMP, PLAINTEXT, and LISTING. For
  12260. all of them, you should use the PRE element instead.
  12261.  
  12262. Changes to Tables
  12263.  
  12264. The HTML 4.0 table model has grown out of early work on HTML+ and the
  12265. initial draft of HTML3.0. The earlier model has been been extended in
  12266. response to requests from information providers for improved control over
  12267. the presentation of tabular information:
  12268.  
  12269.    * The ability to align on designated characters such as "." and":"
  12270.      (e.g., aligning a column of numbers on the decimal point).
  12271.    * The need for more flexibility in specifying table frames and rules.
  12272.    * The need for incremental display of large tables as data is received.
  12273.    * The ability to support scrollable tables with fixed headers plus better
  12274.      support for breaking tables across pages for printing.
  12275.    * The need for optional column based defaults for alignment properties
  12276.  
  12277. In addition, a major goal has been to provide backwards compatibility with
  12278. the widely deployed Netscape implementation of tables. Another goal has been
  12279. to simplify importing tables conforming to the SGML CALS model. The latest
  12280. draft makes the align attribute attribute compatible with the latest
  12281. versions of the most popular browsers. Some clarifications have been made to
  12282. the role of the dir attribute attribute and recommended behavior when
  12283. absolute and relative column widths are mixed.
  12284.  
  12285. A new element, COLGROUP, has been introduced to allow sets of columns to be
  12286. grouped with different width and alignment properties specified by one or
  12287. more COL elements. The semantics of COLGROUP have been clarified over
  12288. previous drafts, and rules="basic" replaced by rules="groups".
  12289.  
  12290. The style attribute is included as a means for extending the properties
  12291. associated with edges and interiors of groups of cells. For instance, the
  12292. line style: dotted, double, thin/thick etc; the color/pattern fill for the
  12293. interior; cell margins and font information. This will be the subject for a
  12294. companion specification on style sheets.
  12295.  
  12296. The frame and rules attributes have been modified to avoid SGML name clashes
  12297. with each other, and to avoid clashes with the align and valign attributes.
  12298. These changes were additionally motivated by the desire to avoid future
  12299. problems if this specification is extended to allow frame and rules
  12300. attributes with other table elements.
  12301.  
  12302. Changes to Forms
  12303.  
  12304. The forms specified in HTML 3.2 have the following problems:
  12305.  
  12306.    * There is no provision for keyboard shortcuts for particular actions,
  12307.      for access keys for driving menus, etc.
  12308.    * Although form controls can be made insensitive dynamically, they cannot
  12309.      be declared as such at initialization time.
  12310.    * Along the same line form controls, such as form fields, cannot be made
  12311.      "read only".
  12312.    * Labels for radio buttons and checkboxes are not sensitive, i.e.,
  12313.      clicking on a label text doesn't effect the button state.
  12314.    * There is no way to markup groups of related form fields in a way that
  12315.      effectively supports browsing with speech-based user agents.
  12316.    * There is no provision for checking values as they are entered into form
  12317.      fields. All checking is done at the server when the form's contents are
  12318.      submitted.
  12319.    * Nothing is provided to specify what type of data file is expected when
  12320.      the user is asked to submit files.
  12321.    * Forms can only contain the two buttons submit and reset.
  12322.    * There is no way to specify what character sets the server issuing a
  12323.      form can handle.
  12324.  
  12325. To solve these problems this specification introduces several new attributes
  12326. and elements.
  12327.  
  12328.    * The accesskey attribute provides for specifying direct keyboard access
  12329.      to form fields.
  12330.    * The disabled attribute allows form providers to make a form control
  12331.      initially insensitive.
  12332.    * And with the additional attribute readonly, authors can prohibit
  12333.      changes to a form field.
  12334.    * The LABEL element associates a label with a particular form control.
  12335.      The FIELDSET element groups related fields together and, in association
  12336.      with the LEGEND element, can be used to name the group. Both of these
  12337.      new elements allow better rendering and better interactivity.
  12338.      Speech-based browsers can better describe the form and graphic browsers
  12339.      can make labels sensitive.
  12340.    * A new set of attributes, including onchange-INPUT, in association with
  12341.      support for scripting languages, allows form providers to verify
  12342.      user-entered data.
  12343.    * The INPUT element has a new attribute accept that allows authors to
  12344.      specify a list of valid media types or type patterns for the input.
  12345.    * The new BUTTON element can be used to make richer forms with more than
  12346.      just a submit and a reset button.
  12347.    * The FORM element includes the attribute accept-charset, modeled on the
  12348.      HTTP "Accept-Charset" header (see [RFC2068]). This attribute (first
  12349.      proposed in [RFC1867]) may be used to specify a list of character sets
  12350.      acceptable to the server.
  12351.  
  12352.                Performance, Implementation, and Design Notes
  12353.  
  12354. Contents
  12355.  
  12356.   1. Notes on helping search engines index your Web site
  12357.        1. Search robots
  12358.   2. Notes on tables
  12359.        1. Design rationale
  12360.        2. Recommended Layout Algorithms
  12361.   3. Notes on styles
  12362.        1. New media types
  12363.   4. Notes on forms
  12364.        1. Incremental display
  12365.        2. Future projects
  12366.   5. Notes on scripting
  12367.        1. Reserved syntax for future script macros
  12368.  
  12369. The following notes are informative, not normative.
  12370.  
  12371. Notes on helping search engines index your Web site
  12372.  
  12373. This section provides some simple suggestions that will make your documents
  12374. more accessible to search engines.
  12375.  
  12376. Define the document language
  12377.      In the global context of the Web it is important to know which human
  12378.      language a page was written in. This is discussed in the section on
  12379.      language information.
  12380. Specify language variants of this document If you have prepared translations
  12381. of this document into other languages, you should use the LINK element to
  12382. reference these. This allows an indexing engine to offer users search
  12383. results in the user's preferred language, regardless of how the query was
  12384. written. For instance, the following links offer French and German
  12385. alternatives to a search engine:
  12386.  
  12387. <LINK rel="alternate" href="mydoc-fr.html"
  12388.          lang="fr" title="La vie souterrainne">
  12389. <LINK rel="alternate" href="mydoc-de.html"
  12390.          lang="de" title="Das Leben im Untergrund">
  12391.  
  12392. Provide keywords and descriptions
  12393.      Some indexing engines look for META elements that define a
  12394.      comma-separated list of keywords/phrases, or that give a short
  12395.      description. Search engines may present these keywords as the result of
  12396.      a search. The value of the name attribute sought by a search attribute
  12397.      is not defined by this specification. Consider these examples,
  12398.  
  12399.       <META name="keywords" content="vacation,Greece,sunshine">
  12400.       <META name="description" content="Idylic European vacations">
  12401.  
  12402. Indicate the beginning of a collection
  12403.      Collections of word processing documents or presentations are
  12404.      frequently translated into collections of HTML documents. It is helpful
  12405.      for search results to reference the beginning of the collection in
  12406.      addition to the page hit by the search. You may help search engines by
  12407.      using the LINK element with rel="begin" along with a TITLE, as in:
  12408.  
  12409.  
  12410.      <LINK rel="begin"
  12411.               href="page1.html"
  12412.               title="General Theory of Relativity">
  12413.  
  12414. Provide robots with indexing instructions
  12415.      People may be surprised to find that their site has been indexed by an
  12416.      indexing robot and that the robot should not have been permitted to
  12417.      visit a sensitive part of the site. Many Web robots offer facilities
  12418.      for Web site administrators and content providers to limit what the
  12419.      robot does. This is achieved through two mechanisms: a "robots.txt"
  12420.      file and the META element in HTML documents, described below.
  12421.  
  12422. Search robots
  12423.  
  12424. The robots.txt file
  12425.  
  12426. When a Robot vists a Web site, say http://www.foobar.com/, it firsts checks
  12427. for http://www.foobar.com/robots.txt. If it can find this document, it will
  12428. analyze its contents to see if it is allowed to retrieve the document. You
  12429. can customize the robots.txt file to apply only to specific robots, and to
  12430. disallow access to specific directories or files.
  12431.  
  12432. Here is a sample robots.txt file that prevents all robots from visiting the
  12433. entire site:
  12434.  
  12435.         User-agent: *    # applies to all robots
  12436.         Disallow: /      # disallow indexing of all pages
  12437.  
  12438. The Robot will simply look for a "/robots.txt" URL on your site, where a
  12439. site is defined as a HTTP server running on a particular host and port
  12440. number. Here are some sample locations for robots.txt:
  12441.  
  12442.          Site URL                  URL for robots.txt
  12443.  
  12444.  http://www.w3.org/         http://www.w3.org/robots.txt
  12445.  
  12446.  http://www.w3.org:80/      http://www.w3.org:80/robots.txt
  12447.  
  12448.  http://www.w3.org:1234/    http://www.w3.org:1234/robots.txt
  12449.  
  12450.  http://w3.org/             http://w3.org/robots.txt
  12451.  
  12452. There can only be a single "/robots.txt" on a site. Specifically, you should
  12453. not put "robots.txt" files in user directories, because a robot will never
  12454. look at them. If you want your users to be able to create their own
  12455. "robots.txt", you will need to merge them all into a single "/robots.txt".
  12456. If you don't want to do this your users might want to use the Robots META
  12457. Tag instead.
  12458.  
  12459. Some tips: URL's are case-sensitive, and "/robots.txt" string must be all
  12460. lower-case. Blank lines are not permitted.
  12461.  
  12462. There must be exactly one "User-agent" field. The robot should be liberal in
  12463. interpreting this field. A case insensitive substring match of the name
  12464. without version information is recommended.
  12465.  
  12466. If the value is "*", the record describes the default access policy for any
  12467. robot that has not matched any of the other records. It is not allowed to
  12468. have multiple such records in the "/robots.txt" file.
  12469.  
  12470. The "Disallow" field specifies a partial URL that is not to be visited. This
  12471. can be a full path, or a partial path; any URL that starts with this value
  12472. will not be retrieved. For example,
  12473.  
  12474.     Disallow: /help disallows both /help.html and /help/index.html, whereas
  12475.     Disallow: /help/ would disallow /help/index.html but allow /help.html.
  12476.  
  12477. An empty value for "Disallow", indicates that all URLs can be retrieved. At
  12478. least one "Disallow" field must be present in the robots.txt file.
  12479.  
  12480. Robots and the META element
  12481.  
  12482. The META element allows HTML authors to tell visiting robots whether a
  12483. document may be indexed, or used to harvest more links. No server
  12484. administrator action is required.
  12485.  
  12486. In the following example a robot should neither index this document, nor
  12487. analyze it for links.
  12488.  
  12489. <META name="ROBOTS" content="NOINDEX, NOFOLLOW">
  12490.  
  12491. The list of terms in the content is ALL, INDEX, NOFOLLOW, NOINDEX. The name
  12492. and the content attribute values are case-insensitive.
  12493.  
  12494. Note: In early 1997 only a few robots implement this, but this is expected
  12495. to change as more public attention is given to controlling indexing robots.
  12496.  
  12497. Notes on tables
  12498.  
  12499. Design rationale
  12500.  
  12501. The HTML table model has evolved from studies of existing SGML tables
  12502. models, the treatment of tables in common word processing packages, and a
  12503. wide range of tabular layout techniques in magazines, books and other
  12504. paper-based documents. The model was chosen to allow simple tables to be
  12505. expressed simply with extra complexity available when needed. This makes it
  12506. practical to create the markup for HTML tables with everyday text editors
  12507. and reduces the learning curve for getting started. This feature has been
  12508. very important to the success of HTML to date.
  12509.  
  12510. Increasingly, people are creating tables by converting from other document
  12511. formats or by creating them directly with WYSIWYG editors. It is important
  12512. that the HTML table model fit well with these authoring tools. This affects
  12513. how the cells that span multiple rows or columns are represented, and how
  12514. alignment and other presentation properties are associated with groups of
  12515. cells.
  12516.  
  12517. Dynamic reformatting
  12518.  
  12519. A major consideration for the HTML table model is that the author does not
  12520. control how a user will size a table, what fonts he or she will use, etc.
  12521. This makes it risky to rely on column widths specified in terms of absolute
  12522. pixel units. Instead, tables must be able to change sizes dynamically to
  12523. match the current window size and fonts. Authors can provide guidance as to
  12524. the relative widths of columns, but user agents should ensure that columns
  12525. are wide enough to render the width of the largest element of the cell's
  12526. content. If the author's specification must be overridden, relative widths
  12527. of individual columns should not be changed drastically.
  12528.  
  12529. Incremental display
  12530.  
  12531. For large tables or slow network connections, incremental table display is
  12532. important to user satisfaction. User agents should be able to begin
  12533. displaying a table before all of the data has been received. The default
  12534. window width for most user agents shows about 80 characters, and the
  12535. graphics for many HTML pages are designed with these defaults in mind. By
  12536. specifying the number of columns, and including provision for control of
  12537. table width and the widths of different columns, authors can give hints to
  12538. user agents that allow the incremental display of table contents.
  12539.  
  12540. For incremental display, the browser needs the number of columns and their
  12541. widths. The default width of the table is the current window size
  12542. (width="100%"). This can be altered by setting the width-TABLE attribute of
  12543. the TABLE element. By default, all columns have the same width, but you can
  12544. specify column widths with one or more COL elements before the table data
  12545. starts.
  12546.  
  12547. The remaining issue is the number of columns. Some people have suggested
  12548. waiting until the first row of the table has been received, but this could
  12549. take a long time if the cells have a lot of content. On the whole it makes
  12550. more sense, when incremental display is desired, to get authors to
  12551. explicitly specify the number of columns in the TABLE element.
  12552.  
  12553. Authors still need a way of telling user agents whether to use incremental
  12554. display or to size the table automatically to fit the cell contents. In the
  12555. two pass auto-sizing mode, the number of columns is determined by the first
  12556. pass. In the incremental mode, the number of columns must be stated up
  12557. front. It makes more sense to set the cols attribute to the number of
  12558. columns rather than using some "layout" attribute (e.g., layout="fixed" or
  12559. layout="auto").
  12560.  
  12561. Structure and presentation
  12562.  
  12563. HTML distinguishes structural markup such as paragraphs and quotations from
  12564. rendering idioms such as margins, fonts, colors, etc. How does this
  12565. distinction affect tables? From the purist's point of view, the alignment of
  12566. text within table cells and the borders between cells is a rendering issue,
  12567. not one of structure. In practice, though, it is useful to group these with
  12568. the structural information, as these features are highly portable from one
  12569. application to the next. The HTML table model leaves most rendering
  12570. information to associated style sheets. The model presented in this
  12571. specification is designed to take advantage of such style sheets but not to
  12572. require them.
  12573.  
  12574. Current desktop publishing packages provide very rich control over the
  12575. rendering of tables, and it would be impractical to reproduce this in HTML,
  12576. without making HTML into a bulky rich text format like RTF or MIF. This
  12577. specification does, however, offer authors the ability to choose from a set
  12578. of commonly used classes of border styles. The frame attribute controls the
  12579. appearence of the border frame around the table while the rules attribute
  12580. determines the choice of rulings within the table. A finer level of control
  12581. will be supported via rendering annotations. The style attribute can be used
  12582. for specifying rendering information for individual elements. Further
  12583. rendering information can be given with the STYLE element in the document
  12584. head or via linked style sheets.
  12585.  
  12586. During the development of this specification, a number of avenues were
  12587. investigated for specifying the ruling patterns for tables. One issue
  12588. concerns the kinds of statements that can be made. Including support for
  12589. edge subtraction as well as edge addition leads to relatively complex
  12590. algorithms. For instance, work on allowing the full set of table elements to
  12591. include the frame and rules attributes led to an algorithm involving some 24
  12592. steps to determine whether a particular edge of a cell should be ruled or
  12593. not. Even this additional complexity doesn't provide enough rendering
  12594. control to meet the full range of needs for tables. The current
  12595. specification deliberately sticks to a simple intuitive model, sufficient
  12596. for most purposes. Further experimental work is needed before a more complex
  12597. approach is standardized.
  12598.  
  12599. Row and column groups
  12600.  
  12601. This specification provides a superset of the simpler model presented in
  12602. earlier work on HTML+. Tables are considered as being formed from an
  12603. optional caption together with a sequence of rows, which in turn consist of
  12604. a sequence of table cells. The model further differentiates header and data
  12605. cells, and allows cells to span multiple rows and columns.
  12606.  
  12607. Following the CALS table model (see [CALS]), this specification allows table
  12608. rows to be grouped into head and body and foot sections. This simplifies the
  12609. representation of rendering information and can be used to repeat table head
  12610. and foot rows when breaking tables across page boundaries, or to provide
  12611. fixed headers above a scrollable body panel. In the markup, the foot section
  12612. is placed before the body sections. This is an optimization shared with CALS
  12613. for dealing with very long tables. It allows the foot to be rendered without
  12614. having to wait for the entire table to be processed.
  12615.  
  12616. Accessibility
  12617.  
  12618. For the visually impaired, HTML offers the hope of setting to rights the
  12619. damage caused by the adoption of windows based graphical user interfaces.
  12620. The HTML table model includes attributes for labeling each cell, to support
  12621. high quality text to speech conversion. The same attributes can also be used
  12622. to support automated import and export of table data to databases or
  12623. spreadsheets.
  12624.  
  12625. Recommended Layout Algorithms
  12626.  
  12627. If the cols attribute on the TABLE element specifies the number of columns,
  12628. then the table may be rendered using a fixed layout, otherwise the
  12629. autolayout algorithm described below should be used.
  12630.  
  12631. If the width attribute is not specified, visual user agents should assume a
  12632. default value of 100% for formatting.
  12633.  
  12634. We recommended that user agents increase table widths beyond the value
  12635. specified by width in cases when cell contents would otherwise overflow.
  12636. User agents that override the specified width should do so within reason.
  12637. User agents may elect to split words across lines to avoid the need for
  12638. excessive horizontal scrolling or when such scrolling is impractical or
  12639. undesired.
  12640.  
  12641. Fixed Layout Algorithm
  12642.  
  12643. For this algorithm, it is assumed that the number of columns is known. The
  12644. column widths by default should be set to the same size. Authors may
  12645. override this by specifying relative or absolute column widths, using the
  12646. COLGROUP or COL elements. The default table width is the space between the
  12647. current left and right margins, but may be overridden by the width attribute
  12648. on the TABLE element, or determined from absolute column widths. To deal
  12649. with mixtures of absolute and relative column widths, the first step is to
  12650. allocate space from the table width to columns with absolute widths. After
  12651. this, the space remaining is divided up between the columns with relative
  12652. widths.
  12653.  
  12654. The table syntax alone is insufficient to guarantee the consistency of
  12655. attribute values. For instance, the number of columns specified by the cols
  12656. attribute may be inconsistent with the number of columns implied by the COL
  12657. elements. This in turn, may be inconsistent with the number of columns
  12658. implied by the table cells. A further problem occurs when the columns are
  12659. too narrow to avoid overflow of cell contents. The width of the table as
  12660. specified by the TABLE element or COL elements may result in overflow of
  12661. cell contents. It is recommended that user agents attempt to recover
  12662. gracefully from these situations, e.g., by hyphenating words and resorting
  12663. to splitting words if hyphenation points are unknown.
  12664.  
  12665. In the event that an indivisible element causes cell overflow, the user
  12666. agent may consider adjusting column widths and re-rendering the table. In
  12667. the worst case, clipping may be considered if column width adjustments
  12668. and/or scrollable cell content are not feasible. In any case, if cell
  12669. content is split or clipped this should be indicated to the user in an
  12670. appropriate manner.
  12671.  
  12672. Autolayout Algorithm
  12673.  
  12674. If the COLS attribute is missing from the table start tag, then the user
  12675. agent should use the following autolayout algorithm. It uses two passes
  12676. through the table data and scales linearly with the size of the table.
  12677.  
  12678. In the first pass, line wrapping is disabled, and the user agent keeps track
  12679. of the minimum and maximum width of each cell. The maximum width is given by
  12680. the widest line. Since line wrap has been disabled, paragraphs are treated
  12681. as long lines unless broken by BR elements. The minimum width is given by
  12682. the widest text element (word, image, etc.) taking into account leading
  12683. indents and list bullets, etc. In other words, it is necessary to determine
  12684. the minimum width a cell would require in a window of its own before the
  12685. cell begins to overflow. Allowing user agents to split words will minimize
  12686. the need for horizontal scrolling or in the worst case, clipping the cell
  12687. contents.
  12688.  
  12689. This process also applies to any nested tables occuring in cell content. The
  12690. minimum and maximum widths for cells in nested tables are used to determine
  12691. the minimum and maximum widths for these tables and hence for the parent
  12692. table cell itself. The algorithm is linear with aggregate cell content, and
  12693. broadly speaking, independent of the depth of nesting.
  12694.  
  12695. To cope with character alignment of cell contents, the algorithm keeps three
  12696. running min/max totals for each column: Left of align char, right of align
  12697. char and un-aligned. The minimum width for a column is then: max(min_left +
  12698. min_right, min_non-aligned).
  12699.  
  12700. The minimum and maximum cell widths are then used to determine the
  12701. corresponding minimum and maximum widths for the columns. These in turn, are
  12702. used to find the minimum and maximum width for the table. Note that cells
  12703. can contain nested tables, but this doesn't complicate the code
  12704. significantly. The next step is to assign column widths according to the
  12705. available space (i.e., the space between the current left and right
  12706. margins).
  12707.  
  12708. For cells that span multiple columns, a simple approach (as used by Arena)
  12709. consists of apportioning the min/max widths evenly to each of the
  12710. constituent columns. A slightly more complex approach is to use the min/max
  12711. widths of unspanned cells to weight how spanned widths are apportioned.
  12712. Experiments suggest that a blend of the two approaches gives good results
  12713. for a wide range of tables.
  12714.  
  12715. The table borders and intercell margins need to be included in assigning
  12716. column widths. There are three cases:
  12717.  
  12718.   1. The minimum table width is equal to or wider than the available space.
  12719.      In this case, assign the minimum widths and allow the user to scroll
  12720.      horizontally. For conversion to braille, it will be necessary to
  12721.      replace the cells by references to notes containing their full content.
  12722.      By convention these appear before the table.
  12723.   2. The maximum table width fits within the available space. In this case,
  12724.      set the columns to their maximum widths.
  12725.   3. The maximum width of the table is greater than the available space, but
  12726.      the minimum table width is smaller. In this case, find the difference
  12727.      between the available space and the minimum table width, lets call it
  12728.      W. Lets also call D the difference between maximum and minimum width of
  12729.      the table.
  12730.  
  12731.      For each column, let d be the difference between maximum and minimum
  12732.      width of that column. Now set the column's width to the minimum width
  12733.      plus d times W over D. This makes columns with large differences
  12734.      between minimum and maximum widths wider than columns with smaller
  12735.      differences.
  12736.  
  12737. This assignment step is then repeated for nested tables using the minimum
  12738. and maximum widths derived for all such tables in the first pass. In this
  12739. case, the width of the parent (i.e., englobing) table cell plays the role of
  12740. the current window size in the above description. This process is repeated
  12741. recursively for all nested tables. The topmost table is then rendered using
  12742. the assigned widths. Nested tables are subsequently rendered as part of the
  12743. parent table's cell contents.
  12744.  
  12745. If the table width is specified with the width attribute, the user agent
  12746. attempts to set column widths to match. The width attribute is not binding
  12747. if this results in columns having less than their minimum (i.e.,
  12748. indivisible) widths.
  12749.  
  12750. If relative widths are specified with the COL element, the algorithm is
  12751. modified to increase column widths over the minimum width to meet the
  12752. relative width constraints. The COL elements should be taken as hints only,
  12753. so columns shouldn't be set to less than their minimum width. Similarly,
  12754. columns shouldn't be made so wide that the table stretches well beyond the
  12755. extent of the window. If a COL element specifies a relative width of zero,
  12756. the column should always be set to its minimum width.
  12757.  
  12758. When using the two pass layout algorithm, the default alignment position in
  12759. the absence of an explicit or inherited charoff attribute can be determined
  12760. by choosing the position that would center lines for which the widths before
  12761. and after the alignment character are at the maximum values for any of the
  12762. lines in the column for which align="char". For incremental table layout the
  12763. suggested default is charoff="50%". If several cells in different rows for
  12764. the same column use character alignment, then by default, all such cells
  12765. should line up, regardless of which character is used for alignment. Rules
  12766. for handling objects too large for column apply when the explicit or implied
  12767. alignment results in a situation where the data exceeds the assigned width
  12768. of the column.
  12769.  
  12770. Choice of attribute names. It would have been preferable to choose values
  12771. for the frame attribute consistent with the rules attribute and the values
  12772. used for alignment. For instance: none, top, bottom, topbot, left, right,
  12773. leftright, all. Unfortunately, SGML requires enumerated attribute values to
  12774. be unique for each element, independent of the attribute name. This causes
  12775. immediate problems for "none", "left", "right" and "all". The values for
  12776. theframe attribute have been chosen to avoid clashes with the rules, align
  12777. and valign-COLGROUP attributes. This provides a measure of future proofing,
  12778. as it is anticipated that that the frame and rules attributes will be added
  12779. to other table elements in future revisions to this specification. An
  12780. alternative would be to make frame a CDATA attribute. The consensus of the
  12781. W3C HTML Working Group was that the benefits of being able to use SGML
  12782. validation tools to check attributes based on enumerated values outweighs
  12783. the need for consistent names.
  12784.  
  12785. Notes on styles
  12786.  
  12787. Some people have voiced concerns over performance issues for style sheets.
  12788. For instance, retrieving an external style sheet may delay the full
  12789. presentation for the user. A similar situation arises if the document head
  12790. includes a lengthy set of style rules.
  12791.  
  12792. The current proposal addresses these issues by allowing authors to include
  12793. rendering instructions within each HTML element. The rendering information
  12794. is then always available by the time the user agent wants to render each
  12795. element.
  12796.  
  12797. In many cases, authors will take advantage of a common style sheet for a
  12798. group of documents. In this case, distributing style rules throughout the
  12799. document will actually lead to worse performance than using a linked style
  12800. sheet, since for most documents, the style sheet will already be present in
  12801. the local cache. The public availability of good style sheets will encourage
  12802. this effect.
  12803.  
  12804. New media types
  12805.  
  12806. It is likely that the list of media types will grow in the future. To enable
  12807. such extensions to be introduced smoothly, user agents conforming to this
  12808. specification must be able to parse the media type attribute value as
  12809. follows:
  12810.  
  12811.   1. Comma characters (Unicode decimal 44) are used to break the media
  12812.      attribute value into a list of entries. For example,
  12813.  
  12814.          media="screen, 3d-glasses, print and resolution > 90dpi"
  12815.  
  12816.      is mapped to:
  12817.  
  12818.          "screen"
  12819.          "3d-glasses"
  12820.          "print and resolution > 90dpi"
  12821.  
  12822.   2. Each entry is truncated just before the first character that isn't a US
  12823.      ASCII letter [a-zA-Z] (Unicode decimal 65-90, 97-122), or hyphen
  12824.      (Unicode decimal 45). In our example, this gives:
  12825.  
  12826.          "screen"
  12827.          "3d-glasses"
  12828.          "print"
  12829.  
  12830.   3. A case-insensitive match is then made with the set of media types
  12831.      defined above. Entries that don't match should be ignored. In the
  12832.      example we are left with screen and print.
  12833.  
  12834. Note: Style sheets may include media dependent variations within them. For
  12835. instance the proposed CSS @media construct. In such cases it may be
  12836. appropriate to use the default value "all".
  12837.  
  12838. Notes on forms
  12839.  
  12840. Incremental display
  12841.  
  12842. The incremental display of documents being received from the network gives
  12843. rise to certain problems with respect to forms. User agents should prevent
  12844. forms from being submitted until all of the form's elements have been
  12845. received.
  12846.  
  12847. The incremental display of documents raises some issues with respect to
  12848. tabbing navigation. The heuristic of giving focus to the lowest valued
  12849. tabindex in the document seems reasonable enough at first glance. However
  12850. this implies having to wait until all of the document's text is received,
  12851. since until then, the lowest valued tabindex may stil change. If the user
  12852. hits the tab key before then, it is reasonable for user agents to move the
  12853. focus to the lowest currently available tabindex.
  12854.  
  12855. If forms are associated with client-side scripts, there is further potential
  12856. for problems. For instance, a script handler for a given field may refer to
  12857. a field that doesn't yet exist.
  12858.  
  12859. Future projects
  12860.  
  12861. This specification defines a set of elements and attributes powerful enough
  12862. to fulfill the general need for producing forms. However there is still room
  12863. for many possible improvements. For instance the following problems could be
  12864. addressed in the future:
  12865.  
  12866.    * The range of form field types is too limited in comparison with modern
  12867.      user interfaces. For instance there is no provision for tabular data
  12868.      entry, sliders or multiple page layouts.
  12869.    * Servers cannot update the fields in a submitted form and instead have
  12870.      to send a complete HTML document causing screen flicker.
  12871.    * These also cause problems for speech based browsers, making it
  12872.      difficult for the visually impaired to interact with HTML forms.
  12873.  
  12874. Notes on scripting
  12875.  
  12876. Reserved syntax for future script macros
  12877.  
  12878. This specification reserves syntax for the future support of script macros
  12879. in HTML CDATA attributes. The intention is to allow attributes to be set
  12880. depending on the properties of objects that appear earlier on the page. The
  12881. syntax is:
  12882.  
  12883.    attribute = "... &{ macro body }; ... "
  12884.  
  12885. Current Practice for Script Macros
  12886.  
  12887. The macro body is made up of one or more statements in the default scripting
  12888. language (as per instrinsic event attributes). The semicolon following the
  12889. right brace is always needed, as otherwise the right brace character "}" is
  12890. treated as being part of the macro body. Its also worth noting that quote
  12891. marks are always needed for attributes containing script macros.
  12892.  
  12893. The processing of CDATA attributes proceeds as follows:
  12894.  
  12895.   1. The SGML parser evaluates any SGML entities (e.g., ">").
  12896.   2. Next the script macros are evaluated by the script engine.
  12897.   3. Finally the resultant character string is passed to the application for
  12898.      subsequent processing.
  12899.  
  12900. Macro processing takes place when the document is loaded (or reloaded) but
  12901. does not reoccur when the document is resized, repainted, etc.
  12902.  
  12903. Here are some examples using JavaScript. The first one randomizes the
  12904. document background color:
  12905.  
  12906.  
  12907. <BODY bgcolor='&{randomrbg()};'>
  12908.  
  12909. Perhaps you want to dim the background for evening viewing:
  12910.  
  12911.  
  12912. <BACKGROUND src='&{if(Date.getHours > 18)...};'>
  12913.  
  12914. The next example uses JavaScript to set the coordinates for a client-side
  12915. image map:
  12916.  
  12917.  
  12918. <MAP NAME=foo>
  12919.    <AREA shape="rect" coords="&{myrect(imageurl)};" href="&{myurl};">
  12920.  </MAP>
  12921.  
  12922. This example sets the size of an image based upon document properties:
  12923.  
  12924.  
  12925. <IMG src="bar.gif" width='&{document.banner.width/2};' height='50%'>
  12926.  
  12927. You can set the URL for a link or image by script:
  12928.  
  12929.  <SCRIPT>
  12930.    function manufacturer(widget) {
  12931.        ...
  12932.    }
  12933.    function location(manufacturer) {
  12934.        ...
  12935.    }
  12936.    function logo(manufacturer) {
  12937.        ...
  12938.    }
  12939.  </SCRIPT>
  12940.   <A href='&{location(manufacturer("widget"))};'>widget</A>
  12941.   <IMG src='&{logo(manufacturer("widget"))};'>
  12942.  
  12943. This last example shows how SGML CDATA attributes can be quoted using single
  12944. or double quote marks. If you use single quotes around the attribute string
  12945. then you can include double quote marks as part of the attribute string.
  12946. Another approach is use " for double quote marks:
  12947.  
  12948.  
  12949. <IMG src="&{logo(manufacturer("widget"))};">
  12950.  
  12951.                   HTML and Organizations (W3C, IETF, ISO)
  12952.  
  12953. Contents
  12954.