ࡱ > #` 0 ) bjbjmm .B )
, d ě h b b b b b = = = C E E E E E E $ , h i
= = i
b b ~ H) H) H) "
b
b C H) C H) H) F
b V 0O $ T 0 ě o $ P b( P P
, = Q H) _ k S = = = i i >)
= = = ě
XHTML Lists
Lists are common elements of most Web pages lists of links, lists of items, or lists as a table of contents for an entire Web site. This document describes how to mark up three types of lists: unordered, ordered, and definition lists.
Unordered and ordered lists
Unordered lists
An unordered list is a collection of items where the order of appearance is not important (e.g., a bulleted list). Two XHTML elements are used to construct an unordered list: ul and li (list item). The ul element denotes the beginning of an unordered list. The list itself is composed of li elements.
Fun Programming Languages
This is how the text may appear in the browser.
Fun Programming Languages
Java
C
Perl
.NET?
The default marker type for unordered list items is a solid, round bullet; however, the marker type can be altered with cascading style sheets.
Ordered lists
An ordered list is a collection of items that are numbered. The ol element is used to define an ordered list, and again, the li element defines the list members.
Steps for using a fun programming language to solve a problem:
- Think about the problem
- Describe the algorithm in pseudocode
- Implement the algorithm
- Test and refactor as needed
- Deploy application
- Collect paycheck
This is how the text may appear in the browser.
Steps for using a fun programming language to solve a problem:
Think about the problem
Describe the algorithm in pseudocode
Implement the algorithm
Test and refactor as needed
Deploy appplication
Collect paycheck
The default marker type for ordered lists is Arabic numbers (e.g., 1., 2., 3.); however, style sheets can control the marker type. To begin numbering the list at a specific value, use the start attribute of the ol element. Additionally, the value attribute of li can be used to modify the numbering within the list. Any subsequent list items are affected by the value change. For example, if the value attribute specifies that the list element is 4, the next element will be 5.
- The first item is 'four'
- This item is 'five'
- Now things are really confusing!
- This item is now two
Here is how the text may appear in the browser.
The first item is four
This item is five
Now things are really confusing!
This item is now two
More on lists
Inserting a line break will break the line of text without affecting the indentation.
- Item one is on a single line.
- Item two spans multiple
lines.
Item one is on a single line.
Item two spans multiple
lines.
The list members text, images, links, etc. must be placed inside li elements. The following markup is incorrect:
My favorite languages are:
- Perl
- FORTRAN
- x86 assembly
To create nested lists, begin the sublist inside the parent lists li element.
- Perl Topics
- Strings
- Arrays
- Objects
- FORTRAN Topics
- Perl Advantages
- Interpreted
- Very compact code
- Good regular expression support
- FORTRAN Advantages
Here is how the text may appear in the browser.
Perl Topics
Strings
Arrays
Objects
FORTRAN Topics
Perl
Interpreted
Very compact code
Good regular expression support
FORTRAN
Cascading style sheets can control the display of lists with respect to indenting, margins, marker type (e.g., images for ul bullets), and ordered list styles (e.g., a., b., c., I., II., III.).
Definition lists
A definition list is a special type of list used most often for glossaries or other word-phrase pairs. There are three XHTML elements used in definition lists: dl (definition list), dt (definition term), and dd (definition).
- Associative array
- A list of items stored based on a key; also called a hash table.
- Parameters
- Variables provided as arguments to a function or subroutine.
Here is how the text may appear in the browser.
Associative array
A list of items stored based on a key; also called a hash table.
Parameters
Variables provided as arguments to a function or subroutine.
It is not necessary for every definition term to have a definition.
- Constant-time
- O(1)
- Algorithms that have an efficiency that is not based on input size.
- Linear-time
- O(n)
- Algorithms that have an efficiency that is linear with respect
to input size.
Here is how the text may appear in the browser.
Constant-time
O(1)
Algorithms that have an efficiency that is not based on input size.
Linear-time
O(n)
Algorithms that have an efficiency that is linear with respect to input size.
/ 0
! " ' * 8 G
I
R
U
v
+ 6 h k s ޡ{n{n{ h$O h|F> CJ mHsH h|F> CJ mHsH 7h$O h|F> 5B*CJ OJ QJ \^J aJ mHph sH h|F> h|F> CJ OJ QJ ^J aJ h$O h|F> CJ OJ QJ ^J aJ h$O h|F> >*CJ h|F> h$O h|F>
h|F> CJ h$O h|F> CJ
heo CJ he(/ heo CJ0 aJ0 heo CJ0 aJ0 +
' T
U
v
{
$If gd|F> &