In other words, don’t use CSS to create nested lists visually, use HTML to create them. However, if you did that, the hierarchical and logical structure of the list would be lost to website visitors using assistive technologies. You could use assign classes to list items and use CSS to create the same visual effect as a nested list. Screen readers and other assistive technologies rely on the nested structure of complex lists to make sense of the hierarchy and logic of data within the list. Nested lists aren’t just used to organize the visual representation of information. When that list is rendered, it will be displayed in such a way that the relationships between the terms ( dt) and values ( dd) are clear. Each name-value group consists of one name, or term, placed between dt tags, followed by one or more values with each value, or description, placed between dd tags.įor example, if we wanted to use a description list to explain the relationship between members of a family, we might use the following code: Used far less frequently than their ordered and unordered peers, description lists are used to contain name-value groups. Description Listsĭescription lists are created with the dl tag. We cover the list-style-type CSS property used to implement these numbering styles below.
0 Comments
Leave a Reply. |