How do I create a bullet and number list in HTML?
Lists are a great way to organize sections or content on a web page. They make the user experience better by categorizing information, or grouping similar concepts or items. When using HTML, there are two types of lists: bulleted and numbered. The following sections shows you how to create each, and changing their appearance, nesting, and format.
- How to create a bulleted list.
- How to create a numbered list.
- Stopping and continuing a numbered list.
- How to create a bullet list in a number list.
- Applying CSS to a bullet or numbered list.
What would you like to do?
-
Define a new bullet format
-
Define a new number format
-
Define a new multilevel list
-
Define a new list style
-
Turn off automatic numbering for lists
-
Related information
Create a list
To start a numbered list,type 1, a period (.), a space, and some text. Then press Enter.Word will automatically starta numbered list for you.
Type* and a space before your text, and Word will makea bulleted list.
To complete your list, press Enteruntil the bullets or numbering switchoff.
Create a list from existing text
-
Select the text you want to change into a list.
-
Go to Home> Bullets or Home>Numbering.
Note:Find different bullet styles and numbering formats by clicking the down arrow next to Bullets or Numbering.
Which of the following is used to create a new list with bullets?
Select one:
a. <ol style=”list-style-type: disc”>
Select one:
a. <ol style=”list-style-type: disc”>
<ul>: The Unordered List element
The <ul> HTML element represents an unordered list of items, typically rendered as a bulleted list.
Flow content, and if the <ul> element's children include at least one <li> element, palpable content. |
Zero or more <li>, <script> and <template> elements. |
None, both the starting and ending tag are mandatory. |
Any element that accepts flow content. |
list |
directory, group, listbox, menu, menubar, none, presentation, radiogroup, tablist, toolbar, tree |
HTMLUListElement |
<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.
None. |
Flow content. |
The 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. |
An <ul>, <ol>, or <menu> element. Though not a conforming usage, the obsolete <dir> can also be a parent. |
listitem when child of an ol, ul or menu |
menuitem, menuitemcheckbox, menuitemradio, option, none, presentation, radio, separator, tab, treeitem |
HTMLLIElement |
10 Lists
Contents
- Introduction to lists
- Unordered lists (UL), ordered lists (OL), and list items (LI)
- Definition lists: the DL, DT, and DD elements
- Visual rendering of lists
- The DIR and MENU elements