liveBook · Manning

Ul element

As explained in Web Design Playground, Second Edition

An unordered list is an HTML list whose items have no inherent numeric order and are typically displayed with bullet markers.

The <ul> element creates an unordered, or bulleted, list. Use it when related items belong together but have no inherent numeric order. The browser adds the bullets automatically, so there is no need to type them yourself. section 3.9

Build a bulleted list in two layers:

  • Wrap the collection in opening and closing <ul> tags. section 3.9
  • Put each item inside an <li> element, with an optional but recommended closing </li> tag. section 3.9
  • Let the browser display each item with a bullet and indentation. section 3.9

A simple grocery list

<ul> <li>Apples</li> <li>Rice</li> <li>Tea</li> </ul> The browser displays three indented items with bullets. Use examples such as to-do lists, grocery lists, object traits, or course prerequisites. section 3.9

<li>Item text</li>

Inspect the compact <li> item pattern before nesting several items inside a <ul> container. section 3.9

Table 3.2 The bulleted-list values for the list-style-type CSS property (view table figure)

Value

Description

Example Bullet

disc

Filled circle

⚫

circle

Unfilled circle

⚪

square

Filled square

◼

Compare CSS list-style-type values for filled-circle, unfilled-circle, and filled-square bullets. section 3.9

How Web Design Playground, Second Edition covers it

How deep it goes
Defines the ul/li structure, browser output, default bullets, indentation, and CSS bullet-style changes.
Examples
Uses to-do lists, grocery lists, object traits, course prerequisites, and a basic HTML list.
What it assumes
Assumes basic HTML element knowledge while teaching list containers, list items, and automatic browser bullets.
What you can do after
Build unordered lists from scratch with ul and li elements, then adjust bullet shapes with CSS.
How it connects
Connects unordered lists with ordered lists, li elements, and the CSS list-style-type property.

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, Second Edition. The section links point to the parts of the book it draws on.