HTML and CSS Reference
In-Depth Information
Ordered lists have two attributes that let you control the appearance of
list items. he start attribute can be used to set the number for the irst item
of the list to a value other than 1. he type attribute controls how the list is
sequenced. type can have any of the following values:
type="1" Normal numeric numbering; the default
type="A" Uppercase letters: A, B, C, D, …
type="a" Lowercase letters: a, b, c, d, …
type="I" Uppercase Roman numerals: I, II, III, IV, …
type="i" Lowercase Roman numerals: i, ii, iii, iv, …
For unordered lists, the type attribute can take the values circle , square ,
disc , or none to indicate the type of bullet used. he start attribute is ignored
in unordered lists.
he items of a deinition list are enclosed in <dl></dl> tags. Each item of
a deinition list is a pair of objects called the deinition term and deinition
description . he deinition term's HTML tags are <dt></dt> , and the deini-
tion descriptions are <dd></dd> . he default behavior of most browsers is to
treat both the deinition terms and descriptions as normal paragraphs, with
the deinition element indented from the let margin. No bullets or list num-
bers are added. Deinition lists are intended to be used by authors to mark
up content that has a topic-comment structure. his is useful for lists of
frequently asked questions and answers (FAQs), as well as for glossaries and
indexes.
A deinition list has no restrictions regarding the use of other HTML ele-
ments within either the deining term or description part. It is common to
nest a heading inside the term part of the element to provide emphasis and
spacing. Authors are encouraged to stick to the semantic use of the element to
mark up short phrases as topics followed by longer comment terms. Deinition
lists should not be used just to provide alternating paragraph styles, because
this is what CSS classes do. Example 2.16 shows the HTML for a simple
deinition list.
Example 2.16: HTML for a definition list
<!DOCTYPE html>
<html>
<head>
continues
 
Search WWH ::




Custom Search