Contents
This section of the specification describes the basic data typesthat may appear as an element's content or an attribute's value.
For introductory information about reading the HTML DTD,please consult theSGMLtutorial.
Each attribute definition includes information about the If an attribute value is a list, the keys apply to every valuein the list, unless otherwise indicated. Thedocument type definitionspecifies the syntax of HTML element content and attribute valuesusing SGML tokens (e.g., PCDATA, CDATA, NAME, ID, etc.). See[ISO8879] for their full definitions. Thefollowing is a summary of key information: User agents may ignore leading and trailing white space in CDATAattribute values (e.g., " myval "may be interpreted as "myval"). Authors should not declare attributevalues with leading or trailing white space. For some HTML 4.0 attributes with CDATA attribute values, the specification imposes further constraints on the set of legalvalues for the attribute that may not be expressed by the DTD. Although theSTYLE and A number of attributes (%Text; in the DTD) take textthat is meant to be "human readable". For introductory information aboutattributes, please consult thetutorial discussion ofattributes. This specification uses the term URI as defined in[URI] (see also[RFC1630]). Note that URIs include URLs (as defined in[RFC1738] and[RFC1808]). Relative URIs are resolved to full URIs using a base URI.[RFC1808], section 3, defines the normativealgorithm for this process. For more information about base URIs,please consult the section onbase URIs in the chapter onlinks. URIs are represented in the DTD by the parameter entity%URI;. URIs in general arecase-sensitive. There may beURIs, or parts of URIs, where case doesn't matter (e.g., machinenames), but identifying these may not be easy. Users should alwaysconsider that URIs are case-sensitive (to be on the safe side). Please consult the appendix for information aboutnon-ASCII characters in URIattribute values. The attribute value type "color" ( Thus, the color values "#800080" and "Purple" both refer to the colorpurple. Although colors can add significant amounts of information todocument and make them more readable, please consider the followingguidelines when including color in your documents: HTML specifies three types of length values forattributes: Length values arecase-neutral. Note. A "media type" (defined in[RFC2045] and[RFC2046])specifies the nature of a linked resource. This specification employsthe term "content type" rather than "media type" inaccordance with current usage. Furthermore, in this specification,"media type" may refer to themedia where a user agentrenders a document. This type is represented in the DTD by Content types arecase-insensitive. Examples of content types include "text/html", "image/png","image/gif", "video/mpeg", "audio/basic", "text/tcl","text/javascript", and "text/vbscript". For the current list ofregistered MIME types, please consult[MIMETYPES]. Note. The content type"text/css", while not currentlyregistered with IANA, should be used when the linked resource is a[CSS1] style sheet. The value of attributes whose type is a language code ( Language codes arecase-insensitive. The "charset" attributes (%Charset in the DTD) refer toacharacter encoding as described in the section oncharacter encodings. Values mustbe strings (e.g., "euc-jp") from the IANA registry (see[CHARSETS] for a complete list). Names of character encodings arecase-insensitive. User agents must follow the steps set out in the section onspecifying characterencodings in order to determine the character encoding of anexternal resource. Certain attributes call for single character from thedocument character set. Theseattributes take the%Character type in the DTD. Single characters may be specified withcharacter references (e.g.,"&"). [ISO8601] allows many options and variations inthe representation of dates and times. The current specification usesone of the formats described in the profile[DATETIME]for its definition of legal date/time strings ( The format is: The time zone designator is one of: Exactly the components shown here must be present, with exactlythis punctuation. Note that the"T" appears literally inthe string (it must be uppercase), to indicate the beginning of thetime element, as specified in[ISO8601] If a generating application does not know the time to thesecond, it may use the value "00" for the seconds (and minutes andhours if necessary). Note.[DATETIME]does not address the issue of leap seconds. Authors may use the following recognized link types, listed here with theirconventional interpretations. In the DTD,%LinkTypes refers to aspace-separated list of link types. White space characters are notpermitted within link types. These link types arecase-insensitive, i.e.,"Alternate" has the same meaning as "alternate". User agents, search engines, etc. may interpret these link typesin a variety of ways. For example, user agents may provide accessto linked documents through a navigation bar. Authors may wish to defineadditional link types not described in this specification. Ifthey do so, they should use aprofile to cite the conventionsused to define the link types. Please see theprofile attribute of theHEADelement for more details. For further discussions about link types, please consult thesection onlinks in HTML documents. The following is a list ofrecognized media descriptors ( Future versions of HTML may introduce new values and may allowparameterized values. To facilitate the introduction of theseextensions, conforming user agents must be able toparse themedia attribute value asfollows: is mapped to: Note. Style sheets mayinclude media-dependent variations within them (e.g., the CSS@media construct). In such cases it may be appropriate to use"media=all". Script data (%Script; in theDTD) can be the content of the Thecase-sensitivity of script data depends on the scriptinglanguage. Please note that script data that is element content may notcontaincharacter references, butscript data that is the value of an attribute may contain them. Theappendix provides further information aboutspecifying non-HTMLdata. Style sheet data (%StyleSheet; in theDTD) can be the content of the Thecase-sensitivity of style data depends on the style sheetlanguage. Please note that style sheet data that is element content may notcontaincharacter references, butstyle sheet data that is the value of an attribute may contain them. Theappendix provides further information aboutspecifying non-HTMLdata. Except for the reserved names listed below, frame target names(%FrameTarget; in the DTD)must begin with an alphabetic character (a-zA-Z). User agents shouldignore all other target names. The following targetnames are reserved and have special meanings.6.2 SGML basic types
6.3Text strings
6.4URIs
6.5Colors
Black = "#000000" Green = "#008000" Silver = "#C0C0C0" Lime = "#00FF00" Gray = "#808080" Olive = "#808000" White = "#FFFFFF" Yellow = "#FFFF00" Maroon = "#800000" Navy = "#000080" Red = "#FF0000" Blue = "#0000FF" Purple = "#800080" Teal = "#008080" Fuchsia = "#FF00FF" Aqua = "#00FFFF" 6.5.1 Notes on using colors
6.6 Lengths
6.7Content types (MIME types)
6.8Language codes
6.9Character encodings
6.10Single characters
6.11Dates and times
YYYY-MM-DDThh:mm:ssTZD
where: YYYY = four-digit year MM = two-digit month (01=January, etc.) DD = two-digit day of month (01 through 31) hh = two digits of hour (00 through 23) (am/pm NOT allowed) mm = two digits of minute (00 through 59) ss = two digits of second (00 through 59) TZD = time zone designator
6.12Link types
6.13Media descriptors
media="screen, 3d-glasses, print and resolution > 90dpi"
"screen""3d-glasses""print and resolution > 90dpi"
"screen""3d-glasses""print"
6.14Script data
6.15Style sheet data
6.16Frame target names
[8]ページ先頭