Which list is used when the list items are not to be displayed?

10 Lists

Contents

  1. Introduction to lists
  2. Unordered lists (UL), ordered lists (OL), and list items (LI)
  3. Definition lists: the DL, DT, and DD elements
    1. Visual rendering of lists
  4. The DIR and MENU elements

Important Information about Techniques

See Understanding Techniques for WCAG Success Criteria for important information about the usage of these informative techniques and how they relate to the normative WCAG 2.0 success criteria. The Applicability section explains the scope of the technique, and the presence of techniques for a specific technology does not imply that the technology can be used in all situations to create content that meets WCAG 2.0.

Applicability

HTML, XHTML

This technique relates to:

  • Success Criterion 1.3.1 (Info and Relationships)
    • How to Meet 1.3.1 (Info and Relationships)
    • Understanding Success Criterion 1.3.1 (Info and Relationships)

<li>: The List Item element

The <li> HTML element is used to represent an item in a list. It must be contained in a parent element: an ordered list (<ol>), an unordered list (<ul>), or a menu (<menu>). In menus and unordered lists, list items are usually displayed using bullet points. In ordered lists, they are usually displayed with an ascending counter on the left, such as a number or letter.

Content categoriesNone.
Permitted contentFlow content.
Tag omissionThe end tag can be omitted if the list item is immediately followed by another <li> element, or if there is no more content in its parent element.
Permitted parentsAn <ul>, <ol>, or <menu> element. Though not a conforming usage, the obsolete <dir> can also be a parent.
Implicit ARIA rolelistitem when child of an ol, ul or menu
Permitted ARIA rolesmenuitem, menuitemcheckbox, menuitemradio, option, none, presentation, radio, separator, tab, treeitem
DOM interfaceHTMLLIElement

<ul>: The Unordered List element

The <ul> HTML element represents an unordered list of items, typically rendered as a bulleted list.

Content categoriesFlow content, and if the <ul> element's children include at least one <li> element, palpable content.
Permitted contentZero or more <li>, <script> and <template> elements.
Tag omissionNone, both the starting and ending tag are mandatory.
Permitted parentsAny element that accepts flow content.
Implicit ARIA rolelist
Permitted ARIA rolesdirectory, group, listbox, menu, menubar, none, presentation, radiogroup, tablist, toolbar, tree
DOM InterfaceHTMLUListElement

HTML Lists

In this tutorial you will learn how to create different types of lists in HTML.

How to Make Lists in HTML

In HTML, we can list items either in an ordered or unordered fashion.

An ordered list uses numbers or some sort of notation that indicates a series of items.

For example, an ordered list can start with number 1, and continue through 2, 3, 4, and so on. Your ordered list can also start with the letter A and go through B, C, D, and so on.

Here is an example of an ordered list with students' names and marks.

Which list is used when the list items are not to be displayed?
Ordered list of students

On the other hand, we have unordered lists, like a TODO list for example. Here I am so passionate about coding that I skipped my breakfast 🤓.

Which list is used when the list items are not to be displayed?
Unordered TODO list

There is one more type of list called a description list that we will learn as well below.

Now let's get into a bit more detail and see how to create each type of list in HTML.

Example A:

This list constitutes, with its introduction and list items, a complete sentence. It is numbered to indicate a chronology of steps, with no period after the number. Each list item is lowercased, and there is no terminal punctuation.

To qualify for the certificate, students must:

  1. submit a Certificate Form of Intent
  2. attend at least 80 percent of the classes
  3. achieve a “Pass” designation in coursework from the instructors
  4. submit a Certificate Request Form after all requirements have been met
  5. submit a Professional Certificate Program Survey