HTML 4.0 Specification (original) (raw)

next table of contents elements attributes index


W3CREC-html40-971218

W3C Recommendation 18-Dec-1997

This version:

http://www.w3.org/TR/REC-html40-971218

Latest version:

http://www.w3.org/TR/REC-html40

Previous version:

http://www.w3.org/TR/PR-html40-971107

Editors:

Dave Raggett <dsr@w3.org>
Arnaud Le Hors <lehors@w3.org>
Ian Jacobs <ij@w3.org>

Abstract

This specification defines the HyperText Markup Language (HTML), version 4.0, the publishing language of the World Wide Web. In addition to the text, multimedia, and hyperlink features of the previous versions of HTML, HTML 4.0 supports more multimedia options, scripting languages, style sheets, better printing facilities, and documents that are more accessible to users with disabilities. HTML 4.0 also takes great strides towards the internationalization of documents, with the goal of making the Web truly World Wide.

HTML 4.0 is an SGML application conforming to International Standard ISO 8879 -- Standard Generalized Markup Language [ISO8879].

Status of this document

This document has been reviewed by W3C Members and other interested parties and has been endorsed by the Director as a W3C Recommendation. It is a stable document and may be used as reference material or cited as a normative reference from another document. W3C's role in making the Recommendation is to draw attention to the specification and to promote its widespread deployment. This enhances the functionality and interoperability of the Web.

W3C recommends that user agents and authors (and in particular, authoring tools) produce HTML 4.0 documents rather than HTML 3.2 documents (see [HTML32]). For reasons of backwards compatibility, W3C also recommends that tools interpreting HTML 4.0 continue to support HTML 3.2 and HTML 2.0 as well.

A list of current W3C Recommendations and other technical documents can be found at http://www.w3.org/TR.

Public discussion on HTML features takes place on www-html@w3.org.

Available formats

The HTML 4.0 W3C Recommendation is also available in the following formats:

A plain text file:

http://www.w3.org/TR/REC-html40-971218/html40.txt(723Kb),

A gzip'ed tar file containing HTML documents:

http://www.w3.org/TR/REC-html40-971218/html40.tgz(339Kb),

A zip file containing HTML documents (this is a '.zip' file not an '.exe'):

http://www.w3.org/TR/REC-html40-971218/html40.zip(372Kb),

A Postscript file:

http://www.w3.org/TR/REC-html40-971218/html40.ps(4.4Mb, 363 pages),

A PDF file:

http://www.w3.org/TR/REC-html40-971218/html40.pdf(2.1Mb) file.

In case of a discrepancy between electronic and printed forms of the specification, the electronic version is the definitive version.

Available languages

The English version of this specification is the only normative version. However, for translations of this document, see http://www.w3.org/MarkUp/html40-updates/translations.html.

Errata

The list of known errors in this specification is available at http://www.w3.org/MarkUp/html40-updates/html40-errata.html

Please report errors in this document to www-html-editor@w3.org.

Table of Contents

  1. About the HTML 4.0 Specification
    1. How the specification is organized
    2. Document conventions
      1. Elements and attributes
      2. Notes and examples
    3. Acknowledgments
    4. Copyright Notice
  2. Introduction to HTML 4.0
    1. What is the World Wide Web?
      1. Introduction to URIs
      2. Fragment identifiers
      3. Relative URIs
    2. What is HTML?
      1. A brief history of HTML
    3. HTML 4.0
      1. Internationalization
      2. Accessibility
      3. Tables
      4. Compound documents
      5. Style sheets
      6. Scripting
      7. Printing
    4. Authoring documents with HTML 4.0
      1. Separate structure and presentation
      2. Consider universal accessibility to the Web
      3. Help user agents with incremental rendering
  3. On SGML and HTML
    1. Introduction to SGML
    2. SGML constructs used in HTML
      1. Elements
      2. Attributes
      3. Character references
      4. Comments
    3. How to read the HTML DTD
      1. DTD Comments
      2. Parameter entity definitions
      3. Element declarations
        * Content model definitions
      4. Attribute declarations
        * DTD entities in attribute definitions
        * Boolean attributes
  4. Conformance: requirements and recommendations
    1. Definitions
    2. SGML
    3. The text/html content type
  5. HTML Document Representation - Character sets, character encodings, and entities
    1. The Document Character Set
    2. Character encodings
      1. Choosing an encoding
        * Notes on specific encodings
      2. Specifying the character encoding
    3. Character references
      1. Numeric character references
      2. Character entity references
    4. Undisplayable characters
  6. Basic HTML data types - Character data, colors, lengths, URIs, content types, etc.
    1. Case information
    2. SGML basic types
    3. Text strings
    4. URIs
    5. Colors
      1. Notes on using colors
    6. Lengths
    7. Content types (MIME types)
    8. Language codes
    9. Character encodings
    10. Single characters
    11. Dates and times
    12. Link types
    13. Media descriptors
    14. Script data
    15. Style sheet data
    16. Frame target names
  7. The global structure of an HTML document - The HEAD and BODY of a document
    1. Introduction to the structure of an HTML document
    2. HTML version information
    3. The HTML element
    4. The document head
      1. HEAD element
      2. The TITLEelement
      3. The title attribute
      4. Meta data
        * Specifying meta data
        * The META element
        * Meta data profiles
    5. The document body
      1. The BODY element
      2. Element identifiers: the idand class attributes
      3. Block-level and inline elements
      4. Grouping elements: the DIV and SPAN elements
      5. Headings: The H1,H2,H3,H4,H5,H6 elements
      6. The ADDRESSelement
  8. Language information and text direction - International considerations for text
    1. Specifying the language of content: thelang attribute
      1. Language codes
      2. Inheritance of language codes
      3. Interpretation of language codes
    2. Specifying the direction of text and tables: the dir attribute
      1. Introduction to the bidirectional algorithm
      2. Inheritance of text direction information
      3. Setting the direction of embedded text
      4. Overriding the bidirectional algorithm: the BDO element
      5. Character references for directionality and joining control
      6. The effect of style sheets on bidirectionality
  9. Text - Paragraphs, Lines, and Phrases
    1. White space
    2. Structured text
      1. Phrase elements: EM,STRONG, DFN, CODE, SAMP, KBD, VAR, CITE, ABBR, and ACRONYM
      2. Quotations: The BLOCKQUOTE and Qelements
        * Rendering quotations
      3. Subscripts and superscripts: the SUB and SUP elements
    3. Lines and Paragraphs
      1. Paragraphs: the P element
      2. Controlling line breaks
        * Forcing a line break: the BRelement
        * Prohibiting a line break
      3. Hyphenation
      4. Preformatted text: The PRE element
      5. Visual rendering of paragraphs
    4. Marking document changes: The INS and DEL elements
  10. Lists - Unordered, Ordered, and Definition Lists
  11. Introduction to lists
  12. Unordered lists (UL),ordered lists (OL), and list items (LI)
  13. Definition lists: the DL,DT, and DD elements
    1. Visual rendering of lists
  14. The DIR and MENU elements
  15. Tables
  16. Introduction to tables
  17. Elements for constructing tables
    1. The TABLEelement
      * Table directionality
    2. Table Captions: The CAPTION element
    3. Row groups: the THEAD, TFOOT, and TBODY elements
    4. Column groups: the COLGROUP and COL elements
      * The COLGROUP element
      * The COLelement
      * Calculating the number of columns in a table
      * Calculating the width of columns
    5. Table rows: The TR element
    6. Table cells: The TH and TD elements
      * Cells that span several rows or columns
  18. Table formatting by visual user agents
    1. Borders and rules
    2. Horizontal and vertical alignment
      * Inheritance of alignment specifications
    3. Cell margins
  19. Table rendering by non-visual user agents
    1. Associating header information with data cells
    2. Categorizing cells
    3. Algorithm to find heading information
  20. Sample table
  21. Links - Hypertext and Media-Independent Links
  22. Introduction to links and anchors
    1. Visiting a linked resource
    2. Other link relationships
    3. Specifying anchors and links
    4. Link titles
    5. Internationalization and links
  23. The A element
    1. Syntax of anchor names
    2. Nested links are illegal
    3. Anchors with the idattribute
    4. Unavailable and unidentifiable resources
  24. Document relationships: the LINK element
    1. Forward and reverse links
    2. Links and external style sheets
    3. Links and search engines
  25. Path information: the BASE element
    1. Resolving relative URIs
  26. Objects, Images, and Applets
  27. Introduction to objects, images, and applets
  28. Including an image: the IMG element
  29. Generic inclusion: the OBJECT element
    1. Rules for rendering objects
    2. Object initialization: the PARAM element
    3. Global naming schemes for objects
    4. Object declarations and instantiations
  30. Including an applet: the APPLET element
  31. Notes on embedded documents
  32. Image maps
    1. Client-side image maps: the MAPand AREAelements
      * Client-side image map examples
    2. Server-side image maps
  33. Visual presentation of images, objects, and applets
    1. Width and height
    2. White space around images and objects
    3. Borders
    4. Alignment
  34. How to specify alternate text
  35. Style Sheets - Adding style to HTML documents
  36. Introduction to style sheets
  37. Adding style to HTML
    1. Setting the default style sheet language
    2. Inline style information
    3. Header style information: the STYLE element
    4. Media types
  38. External style sheets
    1. Preferred and alternate style sheets
    2. Specifying external style sheets
  39. Cascading style sheets
    1. Media-dependent cascades
    2. Inheritance and cascading
  40. Hiding style data from user agents
  41. Linking to style sheets with HTTP headers
  42. Alignment, font styles, and horizontal rules
  43. Formatting
    1. Background color
    2. Alignment
    3. Floating objects
      * Float an object
      * Float text around an object
  44. Fonts
    1. Font style elements: the TT, I, B, BIG, SMALL, STRIKE, S, and U elements
    2. Font modifier elements: FONT and BASEFONT
  45. Rules: the HRelement
  46. Frames - Multi-view presentation of documents
  47. Introduction to frames
  48. Layout of frames
    1. The FRAMESET element
      * Rows and columns
      * Nested frame sets
      * Sharing data among frames
    2. The FRAMEelement
      * Setting the initial contents of a frame
      * Visual rendering of a frame
  49. Specifying target frame information
    1. Setting the default target for links
    2. Target semantics
  50. Alternate content
    1. The NOFRAMESelement
    2. Long descriptions of frames
  51. Inline frames: the IFRAME element
  52. Forms - User-input Forms: Text Fields, Buttons, Menus, and more
  53. Introduction to forms
  54. Controls
    1. Control types
  55. The FORM element
  56. The INPUT element
    1. Control types created with INPUT
    2. Examples of forms containing INPUT controls
  57. The BUTTON element
  58. The SELECT,OPTGROUP, and OPTION elements
    1. Preselected options
  59. The TEXTAREAelement
  60. The ISINDEXelement
  61. Labels
    1. The LABEL element
  62. Adding structure to forms: the FIELDSETand LEGENDelements
  63. Giving focus to an element
    1. Tabbing navigation
    2. Access keys
  64. Disabled and read-only controls
    1. Disabled controls
    2. Read-only controls
  65. Form submission
    1. Form submission method
    2. Successful controls
    3. Processing form data
      * Step one: Identify the successful controls
      * Step two: Build a form data set
      * Step three: Encode the form data set
      * Step four: Submit the encoded form data set
    4. Form content types
      * application/x-www-form-urlencoded
      * multipart/form-data
  66. Scripts - Animated Documents and Smart Forms
  67. Introduction to scripts
  68. Designing documents for user agents that support scripting
    1. The SCRIPTelement
    2. Specifying the scripting language
      * The default scripting language
      * Local declaration of a scripting language
      * References to HTML elements from a script
    3. Intrinsic events
    4. Dynamic modification of documents
  69. Designing documents for user agents that don't support scripting
    1. The NOSCRIPT element
    2. Hiding script data from user agents
  70. SGML reference information for HTML - Formal definition of HTML and validation
  71. document Document Validation
  72. Sample SGML catalog
  73. SGML Declaration of HTML 4.0
  74. SGML Declaration
  75. Document Type Definition
  76. Transitional Document Type Definition
  77. Frameset Document Type Definition
  78. Character entity references in HTML 4.0
  79. Introduction to character entity references
  80. Character entity references for ISO 8859-1 characters
    1. The list of characters
  81. Character entity references for symbols, mathematical symbols, and Greek letters
    1. The list of characters
  82. Character entity references for markup-significant and internationalization characters
    1. The list of characters
  83. Changes between HTML 3.2 and HTML 4.0
    1. Changes to elements
      1. New elements
      2. Deprecated elements
      3. Obsolete elements
    2. Changes to attributes
    3. Changes for accessibility
    4. Changes for meta data
    5. Changes for text
    6. Changes for links
    7. Changes for tables
    8. Changes for images, objects, and image maps
    9. Changes for forms
    10. Changes for style sheets
    11. Changes for frames
    12. Changes for scripting
    13. Changes for internationalization
  84. Performance, Implementation, and Design Notes
    1. Notes on invalid documents
    2. Special characters in URI attribute values
      1. Non-ASCII characters in URI attribute values
      2. Ampersands in URI attribute values
    3. SGML implementation notes
      1. Line breaks
      2. Specifying non-HTML data
        * Element content
        * Attribute values
      3. SGML features with limited support
      4. Boolean attributes
      5. Marked Sections
      6. Processing Instructions
      7. Shorthand markup
    4. Notes on helping search engines index your Web site
      1. Search robots
        * The robots.txt file
        * Robots and the META element
    5. Notes on tables
      1. Design rationale
        * Dynamic reformatting
        * Incremental display
        * Structure and presentation
        * Row and column groups
        * Accessibility
      2. Recommended Layout Algorithms
        * Fixed Layout Algorithm
        * Autolayout Algorithm
    6. Notes on forms
      1. Incremental display
      2. Future projects
    7. Notes on scripting
      1. Reserved syntax for future script macros
        * Current Practice for Script Macros
    8. Notes on frames
    9. Notes on accessibility
    10. Notes on security
      1. Security issues for forms

next table of contents elements attributes index