next   table of contents    elements   attributes   index 



W3C

HTML 4.01 Specification

W3C Recommendation 24 December 1999
superseded 27 March 2018



This version:

https://www.w3.org/TR/2018/SPSD-html401-20180327/

Latest version of HTML 4.01:

http://www.w3.org/TR/html401

Latest version of HTML 4:

http://www.w3.org/TR/html4

Latest version of HTML:

https://www.w3.org/TR/html/

Previous version of HTML 4.01:

 http://www.w3.org/TR/1999/REC-html401-19991224

Previous HTML 4 Recommendation:

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

Editors:

Dave Raggett <dsr@w3.org>

Arnaud Le Hors, W3C

Ian Jacobs, W3C


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), the publishing language of the World Wide Web. This specification defines HTML 4.01, which is a subversion of HTML 4. In addition to the text, multimedia, and hyperlink features of the previous versions of HTML (HTML 3.2  [HTML32] and HTML 2.0 [RFC1866]), HTML 4 supports more multimedia options, scripting languages, style sheets, better printing facilities, and documents that are more accessible to users with disabilities. HTML 4 also takes great strides towards the internationalization of documents, with the goal of making the Web truly World Wide.

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

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.

This document has been reviewed by W3C Members and other interested parties and has been endorsed by the Director as a W3C Recommendation.

This specification is a Superseded Recommendation.  A newer specification exists that is recommended for new adoption in place of this specification. New implementations should follow the latest version  of the HTML specification.

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

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/html4-updates/translations.

Errata



The list of known errors in this specification is available at:

http://www.w3.org/MarkUp/html4-updates/errata


Quick Table of Contents



(一)About the HTML 4 Specification

(二)Introduction to HTML 4

(三)On SGML and HTML

(四)Conformance: requirements and recommendations

(五)HTML Document Representation - Character sets, character encodings, and entities

(六)Basic HTML data types - Character data, colors, lengths, URIs, content types, etc.

(七)The global structure of an HTML document - The HEAD and BODY of a document

(八)Language information and text direction - International considerations for text

(九)Text - Paragraphs, Lines, and Phrases

(十)Lists - Unordered, Ordered, and Definition Lists

(11)Tables

(12)Links - Hypertext and Media-Independent Links

(13)Objects, Images, and Applets

(14)Style Sheets - Adding style to HTML documents

(15)Alignment, font styles, and horizontal rules

(16)Frames  - Multi-view presentation of documents

(17)Forms - User-input Forms: Text Fields, Buttons, Menus, and more

(18)Scripts - Animated Documents and Smart Forms

(19)SGML reference information for HTML - Formal definition of HTML and validation

(20)SGML Declaration of HTML 4

(21) Document Type Definition

(22)Transitional Document Type Definition

(23)Frameset Document Type Definition

(24)Character entity references in HTML 4



(ア) Changes

(イ)Performance, Implementation, and Design Notes



References

Index of Elements

Index of Attributes

Index


Full Table of Contents



(一)About the HTML 4 Specification 

(一)How the specification is organized

(二)Document conventions 

(一)Elements and attributes

(二)Notes and examples



(三)Acknowledgments 

(一)Acknowledgments for the current revision



(四)Copyright Notice



(二)Introduction to HTML 4 

(一)What is the World Wide Web? 

(一)Introduction to URIs

(二)Fragment identifiers

(三)Relative URIs



(二)What is HTML? 

(一)A brief history of HTML



(三)HTML 4 

(一) Internationalization

(二)Accessibility

(三)Tables

(四)Compound documents

(五)Style sheets

(六)Scripting

(七)Printing



(四)Authoring documents with HTML 4 

(一)Separate structure and presentation

(二)Consider universal accessibility to the Web

(三)Help user agents with incremental rendering





(三)On SGML and HTML 

(一)Introduction to SGML

(二)SGML constructs used in HTML 

(一)Elements

(二)Attributes

(三)Character references

(四)Comments



(三)How to read the HTML DTD 

(一)DTD Comments

(二)Parameter entity definitions

(三)Element declarations 

Content model definitions



(四)Attribute declarations 

DTD entities in attribute definitions

Boolean attributes







(四)Conformance: requirements and recommendations 

(一)Definitions

(二)SGML

(三)The text/html content type



(五)HTML Document Representation - Character sets, character encodings, and entities

(一)The Document Character Set

(二)Character encodings 

(一)Choosing an encoding 

Notes on specific encodings



(二)Specifying the character encoding



(三)Character references 

(一)Numeric character references

(二)Character entity references



(四)Undisplayable characters



(六)Basic HTML data types - Character data, colors, lengths, URIs, content types, etc.

(一)Case information

(二)SGML basic types

(三)Text strings

(四)URIs

(五)Colors 

(一)Notes on using colors



(六)Lengths

(七)Content types (MIME types)

(八)Language codes

(九)Character encodings

(十)Single characters

(11)Dates and times

(12)Link types

(13)Media descriptors

(14)Script data

(15)Style sheet data

(16)Frame target names



(七)The global structure of an HTML document - The HEAD and BODY of a document 

(一)Introduction to the structure of an HTML document

(二)HTML version information

(三)The HTML element

(四)The document head 

(一)The HEAD element

(二)The TITLE element

(三)The title attribute

(四)Meta data 

Specifying meta data

The META element

Meta data profiles





(五)The document body 

(一)The BODY element

(二)Element identifiers: the idand class attributes

(三)Block-level and inline elements

(四)Grouping elements: the DIV and SPAN elements

(五)Headings: The H1, H2,  H3, H4, H5, H6 elements

(六)The ADDRESS element





(八)Language information and text direction - International considerations for text 

(一)Specifying the language of content: the lang attribute 

(一)Language codes

(二)Inheritance of language codes

(三)Interpretation of language codes



(二)Specifying the direction of text and tables: the dir attribute 

(一)Introduction to the bidirectional algorithm

(二)Inheritance of text direction information

(三)Setting the direction of embedded text

(四)Overriding the bidirectional algorithm: the BDO element

(五)Character references for directionality and joining control

(六)The effect of style sheets on bidirectionality





(九)Text - Paragraphs, Lines, and Phrases 

(一)White space

(二)Structured text 

(一)Phrase elements: EM, STRONG, DFN, CODE,  SAMP, KBD, VAR, CITE, ABBR, and ACRONYM

(二)Quotations: The BLOCKQUOTE and Qelements

Rendering quotations



(三)Subscripts and superscripts: the SUB and  SUP elements



(三)Lines and Paragraphs 

(一)Paragraphs: the Pelement

(二)Controlling line breaks 

Forcing a line break: the BRelement

Prohibiting a line break



(三)Hyphenation

(四)Preformatted text: The PRE element

(五)Visual rendering of paragraphs



(四)Marking document changes: The INS and DEL elements



(十)Lists - Unordered, Ordered, and Definition Lists 

(一)Introduction to lists

(二)Unordered lists (UL), ordered lists (OL), and list items (LI)

(三)Definition lists: the DL, DT, and DDelements 

(一)Visual rendering of lists



(四)The DIR and MENU elements



(11)Tables 

(一)Introduction to tables

(二)Elements for constructing tables 

(一)The TABLE element 

Table directionality



(二)Table Captions: The CAPTION element

(三)Row groups: the THEAD, TFOOT, and TBODY elements

(四)Column groups: the COLGROUP and COL elements 

The COLGROUP element

The COL element

Calculating the number of columns in a table

Calculating the width of columns



(五)Table rows: The TRelement

(六)Table cells: The TH and TDelements 

Cells that span several rows or columns





(三)Table formatting by visual user agents 

(一)Borders and rules

(二)Horizontal and vertical alignment 

Inheritance of alignment specifications



(三)Cell margins



(四)Table rendering by non-visual user agents 

(一)Associating header information with data cells

(二)Categorizing cells

(三)Algorithm to find heading information



(五)Sample table



(12)Links - Hypertext and Media-Independent Links 

(一)Introduction to links and anchors 

(一)Visiting a linked resource

(二)Other link relationships

(三)Specifying anchors and links

(四)Link titles

(五)Internationalization and links



(二)The Aelement 

(一)Syntax of anchor names

(二)Nested links are illegal

(三)Anchors with the id attribute

(四)Unavailable and unidentifiable resources



(三)Document relationships: the LINK element 

(一)Forward and reverse links

(二)Links and external style sheets

(三)Links and search engines



(四)Path information: the BASE element 

(一) Resolving relative URIs





(13)Objects, Images, and Applets 

(一)Introduction to objects, images, and applets

(二)Including an image: the IMG element

(三)Generic inclusion: the OBJECT element 

(一)Rules for rendering objects

(二)Object initialization: the PARAM element

(三)Global naming schemes for objects

(四)Object declarations and instantiations



(四)Including an applet: the APPLET element

(五)Notes on embedded documents

(六)Image maps 

(一)Client-side image maps: the MAP and AREA elements 

Client-side image map examples



(二)Server-side image maps



(七)Visual presentation of images, objects, and applets 

(一)Width and height

(二)White space around images and objects

(三)Borders

(四)Alignment



(八)How to specify alternate text



(14)Style Sheets - Adding style to HTML documents 

(一)Introduction to style sheets

(二)Adding style to HTML 

(一)Setting the default style sheet language

(二)Inline style information

(三)Header style information: the STYLE element

(四)Media types



(三)External style sheets 

(一)Preferred and alternate style sheets

(二)Specifying external style sheets



(四)Cascading style sheets 

(一)Media-dependent cascades

(二)Inheritance and cascading



(五)Hiding style data from user agents

(六)Linking to style sheets with HTTP headers



(15)Alignment, font styles, and horizontal rules 

(一)Formatting 

(一)Background color

(二)Alignment

(三)Floating objects 

Float an object

Float text around an object





(二)Fonts 

(一)Font style elements: the TT, I, B, BIG, SMALL, STRIKE, S, and Uelements

(二)Font modifier elements: FONT and  BASEFONT



(三)Rules: the HRelement



(16)Frames  - Multi-view presentation of documents 

(一)Introduction to frames

(二)Layout of frames 

(一)The FRAMESET element 

Rows and columns

Nested frame sets

Sharing data among frames



(二)The FRAME element 

Setting the initial contents of a frame

Visual rendering of a frame





(三)Specifying target frame information 

(一)Setting the default target for links

(二)Target semantics



(四)Alternate content 

(一)The NOFRAMES element

(二)Long descriptions of frames



(五)Inline frames: the IFRAME element



(17)Forms - User-input Forms: Text Fields, Buttons, Menus, and more

(一)Introduction to forms

(二)Controls 

(一)Control types



(三)The FORM element

(四)The INPUT element 

(一)Control types created with INPUT

(二)Examples of forms containing INPUT controls



(五)The BUTTON element

(六)The SELECT, OPTGROUP, and OPTION elements 

(一)Pre-selected options



(七)The TEXTAREA element

(八)The ISINDEX element

(九)Labels 

(一)The LABEL element



(十)Adding structure to forms: the FIELDSET and  LEGEND elements

(11)Giving focus to an element 

(一)Tabbing navigation

(二)Access keys



(12)Disabled and read-only controls 

(一)Disabled controls

(二)Read-only controls



(13)Form submission 

(一)Form submission method

(二)Successful controls

(三)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



(四)Form content types 

application/x-www-form-urlencoded

multipart/form-data







(18)Scripts - Animated Documents and Smart Forms 

(一)Introduction to scripts

(二)Designing documents for user agents that support scripting 

(一)The SCRIPT element

(二)Specifying the scripting language 

The default scripting language

Local declaration of a scripting language

References to HTML elements from a script



(三)Intrinsic events

(四)Dynamic modification of documents



(三)Designing documents for user agents that don't support scripting 

(一)The NOSCRIPT element

(二)Hiding script data from user agents





(19)SGML reference information for HTML - Formal definition of HTML and validation 

(一)Document Validation

(二)Sample SGML catalog



(20)SGML Declaration of HTML 4 

(一)SGML Declaration



(21) Document Type Definition

(22)Transitional Document Type Definition

(23)Frameset Document Type Definition

(24)Character entity references in HTML 4 

(一)Introduction to character entity references

(二)Character entity references for ISO 8859-1 characters 

(一)The list of characters



(三)Character entity references for symbols, mathematical symbols, and Greek letters 

(一)The list of characters



(四)Character entity references for markup-significant and internationalization characters 

(一)The list of characters







(ア)Changes 

(一)Changes between 24 April 1998 HTML 4.0 and 24 December 1999 HTML 4.01 versions 

(一)Changes to the specification 

General changes

On SGML and HTML

HTML Document Representation

Basic HTML data types

Global structure of an HTML document

Language information and text direction

Tables

Links

Objects, Images, and Applets

Style Sheets in HTML Documents

Frames

Forms

SGML Declaration

Strict DTD

Notes

References



(二)Errors that were corrected

(三)Minor typographical errors that were corrected

(四) Clarifications

(五)Known Browser problems



(二)Changes between 18 December 1997 and 24 April 1998 versions

(一)Errors that were corrected

(二)Minor typographical errors that were corrected



(三)Changes between HTML 3.2 and HTML 4.0 (18 December 1997) 

(一)Changes to elements 

New elements

Deprecated elements

Obsolete elements



(二)Changes to attributes

(三)Changes for accessibility

(四)Changes for meta data

(五)Changes for text

(六)Changes for links

(七)Changes for tables

(八)Changes for images, objects, and image maps

(九)Changes for forms

(十)Changes for style sheets

(11)Changes for frames

(12)Changes for scripting

(13)Changes for internationalization





(イ)Performance, Implementation, and Design Notes 

(一)Notes on invalid documents

(二)Special characters in URI attribute values 

(一)Non-ASCII characters in URI attribute values

(二)Ampersands in URI attribute values



(三)SGML implementation notes 

(一)Line breaks

(二)Specifying non-HTML data 

Element content

Attribute values



(三)SGML features with limited support

(四)Boolean attributes

(五)Marked Sections

(六)Processing Instructions

(七)Shorthand markup



(四)Notes on helping search engines index your Web site 

(一)Search robots 

The robots.txt file

Robots and the META element





(五)Notes on tables 

(一)Design rationale 

Dynamic reformatting

Incremental display

Structure and presentation

Row and column groups

Accessibility



(二)Recommended Layout Algorithms

Fixed Layout Algorithm

Autolayout Algorithm





(六)Notes on forms 

(一)Incremental display

(二)Future projects



(七)Notes on scripting 

(一)Reserved syntax for future script macros 

Current Practice for Script Macros





(八)Notes on frames

(九)Notes on accessibility

(十)Notes on security 

(一)Security issues for forms







References 

(一)Normative references

(二)Informative references



Index of Elements

Index of Attributes

Index



next   table of contents   elements   attributes    index