H48: Using ol, ul and dl for lists or groups of links | WAI | W3C thumbnail
H48: Using ol, ul and dl for lists or groups of links | WAI | W3C
www.w3.org
The ol element is used when the list is ordered and the ul element is used when the list is unordered. Description lists (dl) are used to group name-value pairs of information, for example: terms and definitions or questions and answers. Although the use of this markup can make lists more readable,
1 Users
0 Comments
7 Highlights
3 Notes

Top Highlights

  • The ol element is used when the list is ordered and the ul element is used when the list is unordered.
  • Description lists (dl) are used to group name-value pairs of information, for example: terms and definitions or questions and answers. Although the use of this markup can make lists more readable, not all lists need markup. For instance, sentences that contain comma-separated lists may not need list markup.
  • When markup is used that visually formats items as a list but does not indicate the list relationship, users may have difficulty in navigating the information.
  • The list structure, commonly unordered lists, is also useful to group hyperlinks. When this is done, it helps screen reader users to navigate from the first item in a list to the end of the list or jump to the next list. This helps them to bypass groups of links if they choose to.
  • Example 3: A word and its definition This example uses a description list to group a definition with the term that is being defined. <dl> <dt>blink</dt> <dd>turn on and off between 0.5 and 3 times per second</dd> </dl>

Tags

coding
accessibility

Ready to highlight and find good content?

Glasp is a social web highlighter that people can highlight and organize quotes and thoughts from the web, and access other like-minded people’s learning.