liveBook · Manning

Ul element

As explained in Web Design Playground

A list format that presents items as separate entries marked with bullet symbols.

The <ul> element creates an unordered, or bulleted, list. Use it when items belong together but do not need to appear in numeric order, such as groceries, tasks, traits, or course prerequisites. The browser adds the bullets automatically, so you do not type them yourself. section 3.13 section 3.16

Build a bulleted list in two small steps:

  • Wrap the complete list in opening and closing <ul> tags. section 3.17
  • Put each item between opening and closing <li> tags. section 3.17
  • Let the browser display each item with a bullet and indentation. section 3.16

A simple list

A grocery list might look like this: <ul> <li>Apples</li> <li>Oats</li> <li>Tea</li> </ul> The browser turns each <li> into a separate bulleted entry. For practice, replace these items with tasks for today or features of an object. section 3.16 section 3.17

Bullets are filled circles by default. Change their appearance with the CSS list-style-type property; available styles include filled circles, unfilled circles, and squares. section 3.17

<li>Item text</li>

Use the item pattern inside a <ul> container, repeating it once for every list entry. section 3.16

How Web Design Playground covers it

How deep it goes
Defines the ul and li structure, browser rendering, and bullet styling, but does not detail advanced list nesting.
Examples
Uses to-do lists, grocery lists, object traits, course prerequisites, navigation links, and word-formation items.
What it assumes
Assumes basic HTML page structure while teaching the ul and li elements from their opening and closing tags.
What you can do after
Build bulleted lists by combining a ul container with repeated li elements and adjust bullet styles with CSS.
How it connects
Connects unordered lists with ordered lists, description lists, the li element, navigation, and CSS list styling.

Also explained in

Compare how 3 books explain ul element →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Web Design Playground. The section links point to the parts of the book it draws on.