Документ взят из кэша поисковой машины. Адрес оригинального документа : http://www.sao.ru/cats/~satr/JS/REF/tags5.htm
Дата изменения: Wed Jan 28 07:31:00 1998
Дата индексирования: Tue Oct 2 05:24:26 2012
Кодировка:

Поисковые слова: п п п п п п п п п п п п п п п п р п р п р п р п р п р п р п р п р п р п р р п п р п п р п п р п п р п п р п п р п р п п р п р п п р п р п п р п р п п р п р п п р п
HTML Tag Reference [Contents] [Previous] [Next] [Alphabetical Tag List] [Index]

HTML Tag Reference

Lists

This section describes the tags for displaying lists:


DIR

(directory list)

The DIR tag is intended to display a list of short items such as in a directory listing. In practice, the DIR tag usually does the same thing as the UL (unordered list) tag.

To mark the individual items within the list, use the LI tag. A single list item can contain additional paragraphs, marked with the P tag.

This tag is being deprecated; that is, it has become obsolete.

Syntax

<DIR
  
CLASS="styleClass"
  ID="namedPlaceOrStyle"
  LANG="ISO"
  STYLE="style"
>...
</DIR>

Example   

<P>The directory structure is:</P>
<DIR>
 <LI>composer
  <DIR>
  <LI>editing.htm
  <LI>publishing.htm
  </DIR>
 <LI>navigator
  <DIR>
  <LI>userguide.htm
  <LI>javascript.htm
  </DIR>
<DIR>
The file lists.htm shows this example in action in a separate window.


DL

(definition list)

The DL tag encloses a definition list. A definition list contains terms, which are defined with the DT tag, and definitions, which are defined with the DD tag. By default, Netscape Navigator aligns terms on the left and indents each definition on a new line. However, you can use the COMPACT attribute to display a definition on the same line as the preceding term, if it fits on one line.

The intent of a definition list is to display lists of terms and their corresponding definitions, such as in a glossary.

Syntax

<DL COMPACT
  
CLASS="styleClass"
  ID="namedPlaceOrStyle"
  LANG="ISO"
  STYLE="style"
>...
</DL>

COMPACT

compacts the definition list by placing the term defined by the DT tag on the same line as the definition defined by the DD tag, provided the term is short enough.

Definition List Example

The following example defines six HTML terms.

<DL>
 <DT>HTML
   <DD>This tag marks a text file as an HTML document.
 <DT>HEAD
   <DD>This tag encloses the heading for the HTML document.
 <DT>BODY
   <DD>This tag displays the body for the HTML document.
 <DT>DL
   <DD>This tag displays a definition list in the HTML document.
 <DT>DT
   <DD>This tag displays a term in a definition list.
 <DT>DD
   <DD>This tag displays a definition description.
</DL>
The file lists.htm shows this example in action in a separate window.


DT

(definition term)

The DT tag specifies a term in a definition list. The DT tag must be used in a DL tag. Usually a DT tag is followed by a DD tag that describes the term in the DT tag.

The DT tag does not require a closing tag. See DL for more details and an example.

Syntax

<DT
  
CLASS="styleClass"
  ID="namedPlaceOrStyle"
  LANG="ISO"
  STYLE="style"
>

Used Within

<DL>

Example

See Definition List Example for an example.


DD

(definition description)

The DD tag displays a definition description in a definition list. The DD tag must be used within a DL tag and usually follows immediately after a DT tag that indicates the term being defined. The DD tag does not require a closing tag.

See DL for more details and an example.

Syntax

<DD
  
CLASS="styleClass"
  ID="namedPlaceOrStyle"
  LANG="ISO"
  STYLE="style"
>

Used Within

<DL>

Example

See Definition List Example for an example.


MENU

(list of simple items)

The MENU tag displays a list of simple items. This tag works just like the UL tag. Use the LI tag to designate the individual menu items.

This tag is being deprecated because it has become obsolete in favor of the UL tag.

Syntax

<MENU
  
CLASS="styleClass"
  ID="namedPlaceOrStyle"
  LANG="ISO"
  STYLE="style"
>
...
</MENU>

Example

The following example creates a list of three short items:

<P>Netscape Navigator supports these platforms:</P>
<MENU>
 <LI> UNIX
 <LI> Windows
 <LI> Macintosh
</MENU>
The file lists.htm shows this example in action in a separate window.


OL

(ordered list)

The OL tag displays an ordered, or numbered, list. The default numbering style is determined by the browser, but you can use the tag's TYPE attributes to change the numbering sequence and numbering style. Use the LI tag to designate the individual list items.

Syntax

<OL
  START="
value"
  TYPE="A"|"a"|"I"|"i"|"1"
  
CLASS="styleClass"
  ID="namedPlaceOrStyle"
  LANG="ISO"
  STYLE="style"
>
...
</OL>

START="value"

indicates the starting number for the list. The number must be a positive integer. Navigator 1.1

TYPE

defines the type of numbering sequence used for each list item. Navigator 1.1.

The value can be one of the following:

Example

The following example uses the LI tag to define three list elements in an ordered list. The numbers are shown as roman numerals and the first item has the number three.

<P>The following steps outline how to create HTML files:</P>
<OL START="3" TYPE="I">
<LI> Use a text editor or Netscape Composer to create your HTML file.
<LI> Put the HTML files on a web server.
<LI> Test the files by viewing them in a web browser.
</OL>
The file lists.htm shows this example in action in a separate window.


UL

(unordered list)

The UL tag displays a bulleted list. You can use the tag's TYPE attribute to change the bullet style. Use the LI tag to designate the individual list items in the list.

Syntax

<UL TYPE="CIRCLE"|"DISC"|"SQUARE"
  
CLASS="styleClass"
  ID="namedPlaceOrStyle"
  LANG="ISO"
  STYLE="style"
>

TYPE

defines the type of bullet used for each list item. Navigator 1.1.

The value can be one of the following:

Example

<P>Netscape Composer offers the following benefits</P>
<UL TYPE=SQUARE>
 Edit web pages directly in Navigator
 Easy options for setting background and link colors
 As easy to use as any text editor
 No need to learn HTML
</UL>
The file lists.htm shows this example in action in a separate window.


LI

(list item)

The LI tag indicates an itemized element, which is usually preceded by a bullet, a number, or a letter. The LI tag is used inside list elements such as OL (ordered list) and UL (unordered list).

A single itemized element can contain other tags such as the P tag.

The LI tag does not require a closing tag.

Syntax

<LI
  TYPE="DISC"|"CIRCLE"|"SQUARE"|"A"|"a"|"I"|"i"|"1"
  VALUE="
number"
   
CLASS="styleClass"
   ID="namedPlaceOrStyle"
   LANG="ISO"
   STYLE="style"
>

TYPE

specifies the type of symbol or numbering sequence to use before each item.

The values DISC, CIRCLE, and SQUARE can be used in unordered lists, while the values A, a, I, i, and 1 can be used in ordered lists that have a numerical sequence.

VALUE="number"

indicates the starting number for an item in an ordered list. This attribute is valid only in an ordered list See. OL for information on the types of numbering available.

Used Within

DIR, DL, OL, UL, MENU

Example

The LI tag allows you to:<P>
<UL>
 <LI>Identify items in a numbered list
 <LI>Identify items in an unordered list
 <LI>Identify items in a directory list
 <LI>Identify items in a menu
</UL>
The file lists.htm shows this example in action in a separate window.


[Contents] [Previous] [Next] [Alphabetical Tag List] [Index]

Last Updated: 01/26/98 21:33:44


Copyright © 1998 Netscape Communications Corporation