HTML Techniques-11
3.5 Eight other structural elements
(to identify citations, code fragments, deleted text, and others)
The HTML 4.01 specification defines the following structural elements for
miscellaneous markup needs:
- CITE
- Contains a citation or a reference to other sources.
- DFN
- Indicates that this is the defining instance of the enclosed term.
- CODE
- Designates a fragment of computer code.
- SAMP
- Designates sample output from programs, scripts, etc.
- KBD
- Indicates text to be entered by the user.
- VAR
- Indicates an instance of a variable or program argument.
- INS
- Indicates text inserted into a document.
- DEL
- Indicates text deleted from a document.
4 Lists
Checkpoints in this section:
- 3.6 Mark up lists and list items properly.
[Priority 2]
The HTML list elements DL, UL,
and OL should only be used to create lists, not for
formatting effects such as indentation. Refer to information on CSS and tables
for layout in the CSS Techniques
[WCAG10-CSS-TECHNIQUES].
Ordered lists help non-visual users
navigate. Non-visual users may "get lost" in lists, especially in nested
lists and those that do not indicate the specific nest level for each list
item. Until user agents provide a means to identify list context clearly (e.g.,
by supporting the ':before' pseudo-element in CSS2), content developers should
include contextual clues in their lists.
For numbered lists, compound numbers are more informative than simple
numbers. Thus, a list numbered "1, 1.1, 1.2, 1.2.1, 1.3, 2, 2.1," provides more
context than the same list without compound numbers, which might be formatted
as follows:
1. 1. 2. 1. 3. 2. 1.
and would be spoken as "1, 1, 2, 1, 2, 3, 2, 1", conveying no information
about list depth.
[CSS1]
and [CSS2]
allow users to control number styles (for all lists, not just ordered) through
user style sheets.
Example.
The following CSS2 style sheet shows how to specify compound numbers for
nested lists created with either UL or OL elements. Items are numbered as "1",
"1.1", "1.1.1", etc.
The following CSS2 style sheet shows how to specify compound numbers for
nested lists created with either UL or OL elements. Items are numbered as "1",
"1.1", "1.1.1", etc.
<STYLE type="text/css"> UL, OL { counter-reset: item } LI { display: block } LI:before { content: counters(item, "."); counter-increment: item } </STYLE>
End example.
Until either CSS2 is widely supported or user agents allow users to control
rendering of lists through other means, authors should consider providing
contextual clues in unnumbered nested lists. Non-visual users may have
difficulties knowing where a list begins and ends and where each list item
starts. For example, if a list entry wraps to the next line on the screen, it
may appear to be two separate items in the list. This may pose a problem for
legacy screen readers.