From the course: CSS: Display

Unlock the full course today

Join today to access over 22,500 courses taught by industry experts or purchase this course individually.

List-item

List-item - CSS Tutorial

From the course: CSS: Display

Start my 1-month free trial

List-item

- Next up, it's possible to turn anything into a list item in terms of its display. Why would you want to do this? Well, remember that if you want to convey the semantic meaning of a list like steps that have to be completed in a certain order or a list of things, that those need to be marked up as a list with either the UL for unordered lists or the OL for ordered list, plus LI for your individual list items. You need to use semantic HTML to convey the meaning of what it is that you want to show. However, if you want the look of a list without conveying the meaning of a list, you can replicate this with a list item display property. So to set this up, let's start by setting our display to list item. So if you're inside of it, I have a span with a class of list because I wanted to show you you can make a list in the middle of a sentence. So let's go on ahead and establish that we have a class of list here. And then…

Contents