HTML 4.01 Specification
Total Page:16
File Type:pdf, Size:1020Kb
HTML 4.01 Specification HTML 4.01 Specification W3C Proposed Recommendation This version: http://www.w3.org/TR/1999/PR-html40-19990824 (plain text [786Kb], gzip’ed tar archive of HTML files [367Kb], a .zip archive of HTML files [400Kb], gzip’ed Postscript file [740Kb, 387 pages], a PDF file [3Mb]) Latest version: http://www.w3.org/TR/html40 Previous version: http://www.w3.org/TR/1998/REC-html40-19980424 Editors: Dave Raggett <[email protected]> Arnaud Le Hors <[email protected]> Ian Jacobs <[email protected]> Copyright © 1997-1999 W3C® (MIT, INRIA, Keio), All Rights Reserved. W3C liability, trademark, document use and software licensing rules apply. Abstract This specification defines the HyperText Markup Language (HTML), version 4.0 (subversion 4.01), 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.01 supports more multimedia options, scripting languages, style sheets, better printing facilities, and documents that are more accessible to users with disabilities. HTML 4.01 also takes great strides towards the internationalization of documents, with the goal of making the Web truly World Wide. HTML 4.01 is an SGML application conforming to International Standard ISO 8879 -- Standard Generalized Markup Language [ISO8879] [p.351] . Status of this document This section describes the status of this document at the time of its publication. Other documents may supersede this document. The latest status of this document series is maintained at the W3C. 1 24 Aug 1999 14:47 HTML 4.01 Specification This document is a revised version of the 4.0 Recommendation first released on 18 December 1997 and then revised 24 April 1998 Changes since the 24 April version [p.312] are not just editorial in nature. There have been some changes to the DTDs, for example. On 24 August 1999, this document enters a Proposed Recommendation review period. From that date until 22 September 1999, W3C Advisory Committee representatives are encouraged to review this specification and return comments in their completed ballots to [email protected]. Please send any comments of a confidential nature in separate email to [email protected], which is visible to the Team only. No sooner than 14 days after the end of the review period, the Director will announce the document’s disposition: it may become a W3C Recommendation (possibly with minor changes), it may revert to Working Draft status, or it may be dropped as a W3C work item. Publication as a Proposed Recommendation does not imply endorsement by the W3C membership. This is still a draft document and may be updated, replaced or obsoleted by other documents at any time. It is inappropriate to cite W3C Proposed Recommendation as other than "work in progress." W3C recommends that user agents and authors (and in particular, authoring tools) produce HTML 4.01 documents rather than HTML 3.2 documents (see [HTML32] [p.354] ). For reasons of backwards compatibility, W3C also recommends that tools interpreting HTML 4.01 continue to support HTML 3.2 and HTML 2.0 as well. This document has been produced as part of the W3C HTML Activity. The goals of the HTML Working Group (members only) are discussed in the HTML Working Group charter (members only). 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 [email protected]. Please report errors in this document to [email protected]. 24 Aug 1999 14:47 2 HTML 4.01 Specification Quick Table of Contents 1. About the HTML 4.01 Specification . 15. 2. Introduction to HTML 4.01 . 21. 3. On SGML and HTML . 29. 4. Conformance: requirements and recommendations . 39. 5. HTML Document Representation - Character sets, character encodings, and entities . 43. 6. Basic HTML data types - Character data, colors, lengths, URIs, content types, etc. 51. 7. The global structure of an HTML document - The HEAD and BODY of a document . 61. 8. Language information and text direction - International considerations for text 79. 9. Text - Paragraphs, Lines, and Phrases . 89. 10. Lists - Unordered, Ordered, and Definition Lists . 103. 11. Tables . 111. 12. Links - Hypertext and Media-Independent Links . 145. 13. Objects, Images, and Applets . 159. 14. Style Sheets - Adding style to HTML documents . 183. 15. Alignment, font styles, and horizontal rules . 195. 16. Frames - Multi-view presentation of documents . 205. 17. Forms - User-input Forms: Text Fields, Buttons, Menus, and more . 219. 18. Scripts - Animated Documents and Smart Forms . 251. 19. SGML reference information for HTML - Formal definition of HTML and validation . 261. 20. SGML Declaration of HTML 4.01 . 263. 21. Document Type Definition . 265. 22. Transitional Document Type Definition . 279. 23. Frameset Document Type Definition . 297. 24. Character entity references in HTML 4.01 . 299. A. Changes . 311. B. Performance, Implementation, and Design Notes . 331. References . 351. Index of Elements . 357. Index of Attributes . 361. Index . 375. 3 24 Aug 1999 14:47 HTML 4.01 Specification Full Table of Contents 1. About the HTML 4.01 Specification . 15. 1. How the specification is organized . 15. 2. Document conventions . 16. 1. Elements and attributes . 17. 2. Notes and examples . 17. 3. Acknowledgments . 17. 1. Acknowledgments for the current revision . 18. 4. Copyright Notice . 18. 2. Introduction to HTML 4.01 . 21. 1. What is the World Wide Web? . 21. 1. Introduction to URIs . 21. 2. Fragment identifiers . 22. 3. Relative URIs . 22. 2. What is HTML? . 23. 1. A brief history of HTML . 23. 3. HTML 4.0 . 24. 1. Internationalization . 24. 2. Accessibility . 24. 3. Tables . 25. 4. Compound documents . 25. 5. Style sheets . 26. 6. Scripting . 26. 7. Printing . 26. 4. Authoring documents with HTML 4.01 . 26. 1. Separate structure and presentation . 27. 2. Consider universal accessibility to the Web . 27. 3. Help user agents with incremental rendering . 27. 3. On SGML and HTML . 29. 1. Introduction to SGML . 29. 2. SGML constructs used in HTML . 30. 1. Elements . 30. 2. Attributes . 31. 3. Character references . 32. 4. Comments . 32. 3. How to read the HTML DTD . 33. 1. DTD Comments . 33. 2. Parameter entity definitions . 33. 3. Element declarations . 34. Content model definitions . 35. 4. Attribute declarations . 36. DTD entities in attribute definitions . 37. 24 Aug 1999 14:47 4 HTML 4.01 Specification Boolean attributes . 38. 4. Conformance: requirements and recommendations . 39. 1. Definitions . 39. 2. SGML . 41. 3. The text/html content type . 41. 5. HTML Document Representation - Character sets, character encodings, and entities . 43. 1. The Document Character Set . 43. 2. Character encodings . 44. 1. Choosing an encoding . 44. Notes on specific encodings . 45. 2. Specifying the character encoding . 45. 3. Character references . 47. 1. Numeric character references . 47. 2. Character entity references . 48. 4. Undisplayable characters . 49. 6. Basic HTML data types - Character data, colors, lengths, URIs, content types, etc. 51. 1. Case information . 51. 2. SGML basic types . 52. 3. Text strings . 52. 4. URIs . 53. 5. Colors . 53. 1. Notes on using colors . 54. 6. Lengths . 54. 7. Content types (MIME types) . 55. 8. Language codes . 55. 9. Character encodings . 55. 10. Single characters . 55. 11. Dates and times . 56. 12. Link types . 56. 13. Media descriptors . 58. 14. Script data . 59. 15. Style sheet data . 59. 16. Frame target names . 59. 7. The global structure of an HTML document - The HEAD and BODY of a document . 61. 1. Introduction to the structure of an HTML document . 61. 2. HTML version information . 62. 3. The HTML element . 63. 4. The document head . 63. 1. The HEAD element . 63. 2. The TITLE element . 64. 5 24 Aug 1999 14:47 HTML 4.01 Specification 3. The title attribute . 65. 4. Meta data . 65. Specifying meta data . 66. The META element . 66. Meta data profiles . 69. 5. The document body . 70. 1. The BODY element . 71. 2. Element identifiers: the id and class attributes . 73. 3. Block-level and inline elements . 74. 4. Grouping elements: the DIV and SPAN elements . 75. 5. Headings: The H1, H2, H3, H4, H5, H6 elements . 76. 6. The ADDRESS element . 78. 8. Language information and text direction - International considerations for text 79. 1. Specifying the language of content: the lang attribute . 79. 1. Language codes . 80. 2. Inheritance of language codes . 81. 3. Interpretation of language codes . 81. 2. Specifying the direction of text and tables: the dir attribute . 82. 1. Introduction to the bidirectional algorithm . 82. 2. Inheritance of text direction information . 83. 3. Setting the direction of embedded text . 84. 4. Overriding the bidirectional algorithm: the BDO element . 85. 5. Character references for directionality and joining control . 87. 6. The effect of style sheets on bidirectionality . 88. 9. Text - Paragraphs, Lines, and Phrases . 89. 1. White space . 89. 2. Structured text . 90. 1. Phrase elements: EM, STRONG, DFN, CODE, SAMP, KBD, VAR, CITE, ABBR, and ACRONYM . 90. 2. Quotations: The BLOCKQUOTE and Q elements . 92. Rendering quotations . 93. 3. Subscripts and superscripts: the SUB and SUP elements . 94. 3. Lines and Paragraphs . 94. 1. Paragraphs: the P element . 95. 2. Controlling line breaks . 95. Forcing a line break: the BR element . 96. Prohibiting a line break . 96. 3. Hyphenation . 96. 4. Preformatted text: The PRE element . 97. 5. Visual rendering of paragraphs . 98. 4. Marking document changes: The INS and DEL elements . 99. 10. Lists - Unordered, Ordered, and Definition Lists . 103. 1. Introduction to lists . 103. 24 Aug 1999 14:47 6 HTML 4.01 Specification 2. Unordered lists (UL), ordered lists (OL), and list items (LI) . 104. 3. Definition lists: the DL, DT, and DD elements .