Command Palette

Search for a command to run...

Hectal
Back to the lesson: Topic 4.6 — Styling Lists and Links
CSS · Example 1 of 3

Marker types and ::marker

getComputedStyle(el, "::marker") reads the marker's own styles. The 40px padding comes from the browser's built-in stylesheet.

list-style and ::marker control the bullets and numbers of lists, and link styles are written in the order :link, :visited, :hover, :focus-visible, :active so each state wins at the right moment, while staying easy to spot for everyone.

Change the code and press Run (Ctrl+Enter). Predict what will happen first, then break it on purpose and read what changes. Your edits are saved and match the lesson page.

Ready for more? This phase has 5 hands-on exercises with automatic checks.

Practice questions

Write the code in the editor, run it, then open the model answer to compare.

01

Make an ordered list count with lowercase letters and show the letters in bold seagreen.

02

Turn nav ul into a plain menu without bullets or indentation, and style its links in LVHFA order: blue, purple when visited, underlined on hover, an orange outline on keyboard focus, red while pressed.

Explain it without notes

01

Why must link state rules be written in LVHFA order?

02

Why is :visited restricted, and what can you still change with it?

03

What can ::marker style, and what do you do when you need more?

04

How do you keep links accessible if the design wants no underlines?

Marker types and ::marker

Preview

Press Run to see the page.

Console

Nothing logged yet.

Expected console output

marker colour: rgb(255, 99, 71)
list-style-type: "→ "
default ul padding: 40px