Movatterモバイル変換


[0]ホーム

URL:


 previous next  contents  elements  attributes  index

7 The global structure of an HTMLdocument

Contents

  1. Introduction to the structure of an HTMLdocument
  2. HTML version information
  3. TheHTMLelement
  4. The document head
    1. TheHEADelement
    2. TheTITLEelement
    3. Thetitleattribute
    4. Meta data
  5. The document body
    1. TheBODYelement
    2. Element identifiers: theidandclass attributes
    3. Block-level and inline elements
    4. Grouping elements: theDIV andSPAN elements
    5. Headings: TheH1,H2,H3,H4,H5,H6 elements
    6. TheADDRESSelement

7.1 Introduction to the structure of an HTMLdocument

An HTML 4 document is composed of three parts:

  1. a line containingHTML versioninformation,
  2. a declarative header section (delimited by theHEADelement),
  3. a body, which contains the document's actual content. The body may beimplemented by theBODY element or theFRAMESET element.

White space (spaces, newlines, tabs, and comments) may appear before orafter each section. Sections 2 and 3 should be delimited by theHTMLelement.

Here's an example of a simple HTML document:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"   "http://www.w3.org/TR/html4/strict.dtd"><HTML>   <HEAD>      <TITLE>My first HTML document</TITLE>   </HEAD>   <BODY>      <P>Hello world!   </BODY></HTML>

7.2HTML versioninformation

A valid HTML document declares what version of HTML is used in the document.Thedocument type declarationnames the document type definition (DTD) in use for the document (see[ISO8879]).

HTML 4.01 specifies three DTDs, so authors must include one of the followingdocument type declarations in their documents. The DTDs vary in the elementsthey support.

The URI in each document type declaration allows user agents to download theDTD and anyentity sets that areneeded. The following (relative) URIs refer to DTDs andentity sets for HTML 4:

The binding between public identifiers and files can be specified using acatalog file following the format recommended by the Oasis Open Consortium (see[OASISOPEN]). Asample catalog filefor HTML 4.01 is included at the beginning of the section on SGML referenceinformation for HTML. The last two letters of the declaration indicate thelanguage of the DTD. For HTML, this is always English ("EN").

Note. As of the 24 December version of HTML 4.01, theHTML Working Group commits to the following policy:

This means that in a document type declaration, authors may safely use asystem identifier that refers to the latest version of an HTML 4 DTD. Authorsmay also choose to use a system identifier that refers to a specific (dated)version of an HTML 4 DTD when validation to that particular DTD is required.W3C will make every effort to make archival documents indefinitely available attheir original address in their original form.

7.3 TheHTML element

<!ENTITY % html.content "HEAD, BODY"><!ELEMENTHTML O O (%html.content;)    -- document root element --><!ATTLIST HTML%i18n;                               --lang,dir --  >

Start tag:optional, End tag:optional

Attribute definitions

version =cdata[CN]
Deprecated. Thevalue of this attribute specifies which HTML DTD version governs the currentdocument. This attribute has been deprecated because it is redundant withversion information provided by the document typedeclaration.

Attributes defined elsewhere

After document type declaration, the remainder of an HTML document iscontained by theHTML element. Thus, a typical HTML document has thisstructure:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN""http://www.w3.org/TR/html4/strict.dtd"><HTML>...The head, body, etc. goes here...</HTML>

7.4 The document head

7.4.1 TheHEAD element

<!--%head.misc; defined earlier on as "SCRIPT|STYLE|META|LINK|OBJECT" --><!ENTITY % head.content "TITLE & BASE?"><!ELEMENTHEAD O O (%head.content;) +(%head.misc;) -- document head --><!ATTLIST HEAD%i18n;                               --lang,dir --profile%URI;          #IMPLIED  -- named dictionary of meta info --  >

Start tag:optional, End tag:optional

Attribute definitions

profile =uri[CT]
This attribute specifies the location of one or more meta data profiles,separated by white space. For future extensions, user agents should considerthe value to be a list even though this specification only considers the firstURI to be significant.Profiles are discussed below inthe section onmeta data.

Attributes defined elsewhere

TheHEAD element contains information about the current document, suchas its title, keywords that may be useful to search engines, and other datathat is not considered document content. User agents do not generally renderelements that appear in theHEAD as content. They may, however, makeinformation in theHEAD available to users through other mechanisms.

7.4.2 TheTITLE element

<!-- The TITLE element is not considered part of the flow of text.       It should be displayed, for example as the page header or       window title. Exactly one title is required per document.    --><!ELEMENTTITLE - - (#PCDATA) -(%head.misc;) -- document title --><!ATTLIST TITLE%i18n>

Start tag:required, End tag:required

Attributes defined elsewhere

Every HTML documentmust have aTITLEelement in theHEAD section.

Authors should use theTITLE element to identify thecontents of adocument. Since users often consult documents out of context,authors should provide context-rich titles. Thus, instead of a title such as"Introduction", which doesn't provide much contextual background, authorsshould supply a title such as "Introduction to Medieval Bee-Keeping"instead.

For reasons of accessibility, user agents must always make the content oftheTITLE elementavailable to users (includingTITLEelements that occur in frames). The mechanism for doing so depends on the useragent (e.g., as a caption, spoken).

Titles may containcharacter entities(for accented characters, special characters, etc.), but may not contain othermarkup (including comments). Here is a sample document title:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"   "http://www.w3.org/TR/html4/strict.dtd"><HTML><HEAD><TITLE>A study of population dynamics</TITLE>... other head elements...</HEAD><BODY>... document body...</BODY></HTML>

7.4.3 Thetitleattribute

Attribute definitions

title =text[CS]
This attribute offers advisory information about the element for which itis set.

Unlike theTITLE element, which provides information about an entiredocument and may only appear once, thetitle attribute may annotate any numberofelements. Please consult an element's definition toverify that it supports this attribute.

Values of thetitle attribute may be rendered by user agents in a varietyof ways. For instance, visual browsers frequently display the title as a "tooltip" (a short message that appears when the pointing device pauses over anobject). Audio user agents may speak the title information in a similarcontext. For example, setting the attribute on a link allows user agents(visual and non-visual) to tell users about the nature of the linkedresource:

...some text...Here's a photo of <A href="http://someplace.com/neatstuff.gif" title="Me scuba diving">   me scuba diving last summer</A>...some more text...

Thetitle attribute has an additional role when used with theLINKelement to designate anexternal style sheet. Please consult the section onlinks and style sheets for details.

Note. To improve the quality of speech synthesis forcases handled poorly by standard techniques, future versions of HTML mayinclude an attribute for encoding phonemic and prosodic information.

7.4.4Meta data

Note. The W3CResource Description Framework (see[RDF10]) became a W3CRecommendation in February 1999. RDF allows authors to specify machine-readablemetadata about HTML documents and other network-accessible resources.

HTML lets authors specifymeta data -- information about a document ratherthan document content -- in a variety of ways.

For example, to specify the author of a document, one may use theMETAelement as follows:

<META name="Author" content="Dave Raggett">

TheMETA element specifies a property (here "Author") and assigns avalue to it (here "Dave Raggett").

This specification does not define a set of legal meta data properties. Themeaning of a property and the set of legal values for that property should bedefined in a reference lexicon called aprofile. Forexample, a profile designed to help search engines index documents might defineproperties such as "author", "copyright", "keywords", etc.

Specifying meta data 

In general, specifying meta data involves two steps:

  1. Declaring a property and a value for that property. This may be done in twoways:
    1. From within a document, via theMETA element.
    2. From outside a document, by linking to meta data via theLINKelement (see the section onlinktypes).
  2. Referring to aprofile where the property and itslegal values are defined. To designate a profile, use theprofile attribute of theHEAD element.

Note that since a profile is defined for theHEAD element, the same profileapplies to allMETA andLINK elements in the document head.

User agents are not required to support meta data mechanisms. For those thatchoose to support meta data, this specification does not define how meta datashould be interpreted.

TheMETA element 

<!ELEMENTMETA - O EMPTY               -- generic metainformation --><!ATTLIST META%i18n;                               --lang,dir, for use with content --http-equivNAME           #IMPLIED  -- HTTP response header name  --nameNAME           #IMPLIED  -- metainformation name --contentCDATA          #REQUIRED -- associated information --schemeCDATA          #IMPLIED  -- select form of content --  >

Start tag:required, End tag:forbidden

Attribute definitions

For the following attributes, the permitted values and their interpretationareprofile dependent:

name =name[CS]
This attribute identifies a property name. This specification does not listlegal values for this attribute.
content =cdata[CS]
This attribute specifies a property's value. This specification does notlist legal values for this attribute.
scheme =cdata[CS]
This attribute names a scheme to be used to interpret the property's value(see the section onprofiles for details).
http-equiv =name[CI]
This attribute may be used in place of thenameattribute. HTTP servers use this attribute to gather information for HTTPresponse message headers.

Attributes defined elsewhere

TheMETA element can be used to identify properties of a document (e.g.,author, expiration date, a list of key words, etc.) and assign values to thoseproperties. This specification does not define a normative set ofproperties.

EachMETA element specifies a property/value pair. Thename attribute identifies the property and thecontent attribute specifies the property's value.

For example, the following declaration sets a value for theAuthorproperty:

<META name="Author" content="Dave Raggett">

Thelang attribute can be used withMETA to specify the language forthe value of thecontent attribute. This enables speech synthesizers to applylanguage dependent pronunciation rules.

In this example, the author's name is declared to be French:

<META name="Author" lang="fr" content="Arnaud Le Hors">

Note. TheMETA element is a generic mechanism forspecifying meta data. However, some HTML elements and attributes already handlecertain pieces of meta data and may be used by authors instead ofMETA tospecify those pieces: theTITLE element, theADDRESS element, theINS andDELelements, thetitle attribute, and thecite attribute.

Note. When a property specified by aMETAelement takes a value that is aURI, someauthorsprefer to specify the meta data via theLINKelement. Thus, the following meta data declaration:

<META name="DC.identifier"      content="http://www.ietf.org/rfc/rfc1866.txt">

might also be written:

<LINK rel="DC.identifier"         type="text/plain"         href="http://www.ietf.org/rfc/rfc1866.txt">
META and HTTP headers

Thehttp-equiv attribute can be used in place of thename attribute and has a special significance whendocuments are retrieved via the Hypertext Transfer Protocol (HTTP). HTTPservers may use the property name specified by thehttp-equiv attribute to create an[RFC822]-style header inthe HTTP response. Please see the HTTP specification ([RFC2616]) fordetails on valid HTTP headers.

The following sampleMETA declaration:

<META http-equiv="Expires" content="Tue, 20 Aug 1996 14:25:27 GMT">

will result in the HTTP header:

Expires: Tue, 20 Aug 1996 14:25:27 GMT

This can be used by caches to determine when to fetch a fresh copy of theassociated document.

Note. Some user agents support the use ofMETA torefresh the current page after a specified number of seconds, with the optionof replacing it by a different URI. Authors shouldnot usethis technique to forward users to different pages, as this makes the pageinaccessible to some users. Instead, automatic page forwarding should be doneusing server-side redirects.

META and search engines

A common use forMETA is to specify keywords that asearchengine may use to improve the quality of search results. WhenseveralMETA elements provide language-dependent information about adocument, search engines may filter on thelang attribute to display searchresults using the language preferences of the user. For example,

<-- For speakers of US English --><META name="keywords" lang="en-us"          content="vacation, Greece, sunshine"><-- For speakers of British English --><META name="keywords" lang="en"          content="holiday, Greece, sunshine"><-- For speakers of French --><META name="keywords" lang="fr"          content="vacances, Gr&egrave;ce, soleil">

The effectiveness of search engines can also be increased by using theLINKelement to specify links to translations of the document in other languages,links to versions of the document in other media (e.g., PDF), and, when thedocument is part of a collection, links to an appropriate starting point forbrowsing the collection.

Further help is provided in the section onhelping search engines index your Website.

META and PICS
ThePlatformfor Internet Content Selection (PICS, specified in[PICS])is an infrastructure for associating labels (meta data) with Internet content.Originally designed to help parents and teachers control what children canaccess on the Internet, it also facilitates other uses for labels, includingcode signing, privacy, and intellectual property rights management.

This example illustrates how one can use aMETA declaration to include aPICS 1.1 label:

<HEAD> <META http-equiv="PICS-Label" content=' (PICS-1.1 "http://www.gcf.org/v2.5"    labels on "1994.11.05T08:15-0500"      until "1995.12.31T23:59-0000"      for "http://w3.org/PICS/Overview.html"    ratings (suds 0.5 density 0 color/hue 1)) '>  <TITLE>... document title ...</TITLE></HEAD>
META and default information

TheMETA element may be used to specify the default information for adocument in the following instances:

The following example specifies thecharacter encoding for a document as being ISO-8859-5

<META http-equiv="Content-Type" content="text/html; charset=ISO-8859-5">

Meta data profiles 

Theprofile attribute of theHEAD specifies the location of ameta data profile. The value of theprofile attribute is a URI. User agents may use this URI in twoways:

This example refers to a hypothetical profile that defines useful propertiesfor document indexing. The properties defined by this profile -- including"author", "copyright", "keywords", and "date" -- have their values set bysubsequentMETA declarations.

 <HEAD profile="http://www.acme.com/profiles/core">  <TITLE>How to complete Memorandum cover sheets</TITLE>  <META name="author" content="John Doe">  <META name="copyright" content="&copy; 1997 Acme Corp.">  <META name="keywords" content="corporate,guidelines,cataloging">  <META name="date" content="1994-11-06T08:49:37+00:00"> </HEAD>

As this specification is being written, it is common practice to use thedate formats described in[RFC2616], section 3.3. Asthese formats are relatively hard to process, we recommend that authors use the[ISO8601] date format. For more information, see the sections on theINS andDELelements.

Thescheme attribute allows authors to provide user agentsmorecontext for the correct interpretation of meta data. At times, suchadditional information may be critical, as when meta data may be specified indifferent formats. For example, an author might specify a date in the(ambiguous) format "10-9-97"; does this mean 9 October 1997 or 10 September1997? Thescheme attribute value "Month-Day-Year" would disambiguate this datevalue.

At other times, thescheme attribute may provide helpful but non-criticalinformation to user agents.

For example, the followingscheme declaration may help a user agentdetermine that the value of the "identifier" property is an ISBN codenumber:

<META scheme="ISBN"  name="identifier" content="0-8230-2355-9">

Values for thescheme attribute depend on the propertyname and the associatedprofile.

Note. One sample profile is theDublin Core (see[DCORE]). This profile defines a set of recommended properties forelectronic bibliographic descriptions, and is intended to promoteinteroperability among disparate description models.

7.5 The document body

7.5.1 TheBODY element

<!ELEMENTBODY O O (%block;|SCRIPT)+ +(INS|DEL) -- document body --><!ATTLIST BODY%attrs;                              --%coreattrs,%i18n,%events --onload%Script;   #IMPLIED  -- the document has been loaded --onunload%Script;   #IMPLIED  -- the document has been removed --  >

Start tag:optional, End tag:optional

Attribute definitions

background =uri[CT]
Deprecated. Thevalue of this attribute is a URI that designates an image resource. The imagegenerally tiles the background (for visual browsers).
text =color[CI]
Deprecated. Thisattribute sets the foreground color for text (for visual browsers).
link =color[CI]
Deprecated. Thisattribute sets the color of text marking unvisited hypertext links (for visualbrowsers).
vlink =color[CI]
Deprecated. Thisattribute sets the color of text marking visited hypertext links (for visualbrowsers).
alink =color[CI]
Deprecated. Thisattribute sets the color of text marking hypertext links when selected by theuser (for visual browsers).

Attributes defined elsewhere

The body of a document contains the document's content. The content may bepresented by a user agent in a variety of ways. For example, for visualbrowsers, you can think of the body as a canvas where the content appears:text, images, colors, graphics, etc. For audio user agents, the same contentmay be spoken. Sincestyle sheets are nowthe preferred way to specify a document's presentation, the presentationalattributes ofBODY have beendeprecated.

DEPRECATED EXAMPLE:
The following HTML fragment illustrates the use of thedeprecated attributes. It sets the backgroundcolor of the canvas to white, the text foreground color to black, and the colorof hyperlinks to red initially, fuchsia when activated, and maroon oncevisited.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"   "http://www.w3.org/TR/html4/loose.dtd"><HTML><HEAD> <TITLE>A study of population dynamics</TITLE></HEAD><BODY bgcolor="white" text="black"  link="red" alink="fuchsia" vlink="maroon">... document body...</BODY></HTML>

Usingstyle sheets, the same effectcould be accomplished as follows:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"   "http://www.w3.org/TR/html4/strict.dtd"><HTML><HEAD> <TITLE>A study of population dynamics</TITLE> <STYLE type="text/css">  BODY { background: white; color: black}  A:link { color: red }  A:visited { color: maroon }  A:active { color: fuchsia } </STYLE></HEAD><BODY>... document body...</BODY></HTML>

Using external (linked) style sheets gives you the flexibility to change thepresentation without revising the source HTML document:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"   "http://www.w3.org/TR/html4/strict.dtd"><HTML><HEAD> <TITLE>A study of population dynamics</TITLE> <LINK rel="stylesheet" type="text/css" href="smartstyle.css"></HEAD><BODY>... document body...</BODY></HTML>

Framesets and HTML bodies.Documents that containframesets replace theBODY element by theFRAMESET element. Please consult the section onframes for more information.

7.5.2Element identifiers: theid andclass attributes

Attribute definitions

id =name[CS]
This attribute assigns a name to an element. This name must be unique in adocument.
class =cdata-list[CS]
This attribute assigns a class name or set of class names to an element.Any number of elements may be assigned the same class name or names. Multipleclass names must be separated by white space characters.
Theid attribute assigns auniqueidentifier to an element (which may be verified by an SGML parser).For example, the following paragraphs are distinguished by theirid values:
<P> This is a uniquely named paragraph.</P><P> This is also a uniquely named paragraph.</P>

Theid attribute has severalroles in HTML:

Theclass attribute, on the other hand, assigns one or more class namesto an element; the element may be said to belong to these classes. A class namemay be shared by several element instances. Theclassattribute has severalroles in HTML:

In the followingexample, theSPANelement is used in conjunction with theid andclass attributes to markupdocument messages. Messages appear in both English and French versions.

<!-- English messages --><P><SPAN lang="en">Variable declared twice</SPAN><P><SPAN lang="en">Undeclared variable</SPAN><P><SPAN lang="en">Bad syntax for variable name</SPAN>
<!-- French messages --><P><SPAN lang="fr">Variable d&eacute;clar&eacute;e deux fois</SPAN><P><SPAN lang="fr">Variable ind&eacute;finie</SPAN><P><SPAN lang="fr">Erreur de syntaxe pour variable</SPAN>

The following CSS style rules would tell visual user agents to displayinformational messages in green, warning messages in yellow, and error messagesin red:

SPAN.info    { color: green }SPAN.warning { color: yellow }SPAN.error   { color: red }

Note that the French "msg1" and the English "msg1" may not appear in thesame document since they share the sameid value. Authors may make further useof theid attribute to refine the presentation of individual messages, makethem target anchors, etc.

Almost every HTML element may be assigned identifier and classinformation.

Suppose, for example, that we are writing a document about a programminglanguage. The document is to include a number of preformatted examples. We usethePRE element to format the examples. We also assign a backgroundcolor (green) to all instances of thePRE element belonging to the class"example".

<HEAD><TITLE>... document title ...</TITLE><STYLE type="text/css">PRE.example { background : green }</STYLE></HEAD><BODY><PRE>...example code here...</PRE></BODY>

By setting theid attribute for this example, we can (1) create a hyperlinkto it and (2) override class style information with instance styleinformation.

Note. Theid attribute shares the same name space as thename attribute when used for anchor names. Pleaseconsult the section onanchors withid for more information.

7.5.3Block-level and inlineelements

Certain HTML elements that may appear inBODY are said to be"block-level" while others are"inline" (also known as "text level"). The distinction is founded onseveral notions:

Content model
Generally, block-level elements may contain inline elements and otherblock-level elements. Generally, inline elements may contain only data andother inline elements. Inherent in this structural distinction is the idea thatblock elements create "larger" structures than inline elements.
Formatting
By default, block-level elements are formatted differently than inlineelements. Generally, block-level elements begin on new lines, inline elementsdo not. For information about white space, line breaks, and block formatting,please consult the section ontext.
Directionality
For technical reasons involving the[UNICODE] bidirectionaltext algorithm, block-level and inline elements differ in how they inheritdirectionality information. For details, see the section oninheritance of text direction.

Style sheets provide the means tospecify the rendering of arbitrary elements, including whether an element isrendered as block or inline. In some cases, such as an inline style for listelements, this may be appropriate, but generally speaking, authors arediscouraged from overriding the conventional interpretation of HTML elements inthis way.

The alteration of the traditional presentation idioms for block level andinline elements also has an impact on thebidirectional textalgorithm. See the section ontheeffect of style sheets on bidirectionality for more information.

7.5.4 Grouping elements: theDIV andSPAN elements

<!ELEMENTDIV - - (%flow;)*            -- generic language/style container --><!ATTLIST DIV%attrs;                              --%coreattrs,%i18n,%events --  ><!ELEMENTSPAN - - (%inline;)*         -- generic language/style container --><!ATTLIST SPAN%attrs;                              --%coreattrs,%i18n,%events --  >

Start tag:required, End tag:required

Attributes defined elsewhere

TheDIV andSPAN elements, in conjunction with theid andclass attributes, offer a generic mechanism for adding structure todocuments. These elements define content to be inline (SPAN) orblock-level (DIV) but impose no other presentational idioms on thecontent. Thus, authors may use these elements in conjunction withstyle sheets, thelang attribute, etc., to tailorHTML to their own needs and tastes.

Suppose, for example, that we wanted to generate an HTML document based on adatabase of client information. Since HTML does not include elements thatidentify objects such as "client", "telephone number", "email address", etc.,we useDIV andSPAN to achieve the desired structural and presentationaleffects. We might use theTABLE element as follows to structure theinformation:

<!-- Example of data from the client database: --><!-- Name: Stephane Boyera, Tel: (212) 555-1212, Email: sb@foo.org --><DIV><P><SPAN>Client information:</SPAN><TABLE><TR><TH>Last name:<TD>Boyera</TR><TR><TH>First name:<TD>Stephane</TR><TR><TH>Tel:<TD>(212) 555-1212</TR><TR><TH>Email:<TD>sb@foo.org</TR></TABLE></DIV><DIV><P><SPAN>Client information:</SPAN><TABLE><TR><TH>Last name:<TD>Lafon</TR><TR><TH>First name:<TD>Yves</TR><TR><TH>Tel:<TD>(617) 555-1212</TR><TR><TH>Email:<TD>yves@coucou.com</TR></TABLE></DIV>

Later, we may easily add style sheet declarations to fine tune thepresentation of these database entries.

For another example of usage, please consult the example in the section ontheclass andidattributes.

Visual user agents generally place a line break before and afterDIVelements, for instance:

<P>aaaaaaaaa<DIV>bbbbbbbbb</DIV><DIV>ccccc<P>ccccc</DIV>

which is typically rendered as:

aaaaaaaaabbbbbbbbbcccccccccc

7.5.5 Headings: TheH1,H2,H3,H4,H5,H6 elements

<!ENTITY % heading "H1|H2|H3|H4|H5|H6"><!--  There are six levels of headings from H1 (the most important)  to H6 (the least important).--><!ELEMENT (%heading;)  - - (%inline;)* -- heading --><!ATTLIST (%heading;)%attrs;                              --%coreattrs,%i18n,%events --  >

Start tag:required, End tag:required

Attributes defined elsewhere

A heading element briefly describes the topic of the section it introduces.Heading information may be used by user agents, for example, to construct atable of contents for a document automatically.

There are six levels of headings in HTML withH1 as the most important andH6 asthe least. Visual browsers usually render more important headings in largerfonts than less important ones.

The following example shows how to use theDIV element to associate aheading with the document section that follows it. Doing so allows you todefine a style for the section (color the background, set the font, etc.) withstyle sheets.

<DIV ><H1>Forest elephants</H1><P>In this section, we discuss the lesser known forest elephants....this section continues...<DIV ><H2>Habitat</H2><P>Forest elephants do not live in trees but among them....this subsection continues...</DIV></DIV>

This structure may be decorated with style information such as:

<HEAD><TITLE>... document title ...</TITLE><STYLE type="text/css">DIV.section { text-align: justify; font-size: 12pt}DIV.subsection { text-indent: 2em }H1 { font-style: italic; color: green }H2 { color: green }</STYLE></HEAD>

Numbered sections and references
HTML does not itself causesection numbersto be generated from headings. This facility may be offered by user agents,however. Soon, style sheet languages such as CSS will allow authors to controlthe generation of section numbers (handy for forward references in printeddocuments, as in "See section 7.2").

Some people considerskipping heading levels to be badpractice. They acceptH1 H2 H1 while they do not acceptH1 H3H1 since the heading levelH2 is skipped.

7.5.6 TheADDRESS element

<!ELEMENT ADDRESS - - (%inline;)* -- information on author --><!ATTLIST ADDRESS%attrs;                              --%coreattrs,%i18n,%events --  >

Start tag:required, End tag:required

Attributes defined elsewhere

TheADDRESS element may be used by authors to supply contact informationfor a document or a major part of a document such as a form. This element oftenappears at the beginning or end of a document.

For example, a page at the W3C Web site related to HTML might include thefollowing contact information:

<ADDRESS><A href="../People/Raggett/">Dave Raggett</A>, <A href="../People/Arnaud/">Arnaud Le Hors</A>, contact persons for the <A href="Activity">W3C HTML Activity</A><BR> $Date: 2018/03/20 02:36:52 $</ADDRESS>

previous  next contents  elements  attributes  index

[8]ページ先頭

©2009-2025 Movatter.jp