2018-09-30 23:01:58 +01:00
---
id: bad87fee1348bd9aedf08827
title: Create a Bulleted Unordered List
challengeType: 0
videoUrl: 'https://scrimba.com/p/pVMPUv/cDKVPuv'
2019-07-31 11:32:23 -07:00
forumTopicId: 16814
2021-01-13 03:31:00 +01:00
dashedName: create-a-bulleted-unordered-list
2018-09-30 23:01:58 +01:00
---
2020-11-27 19:02:05 +01:00
# --description--
2019-10-27 15:45:37 -01:00
HTML has a special element for creating <dfn>unordered lists</dfn>, or bullet point style lists.
2020-11-27 19:02:05 +01:00
2021-06-15 20:44:36 +05:30
Unordered lists start with an opening `<ul>` element, followed by any number of `<li>` elements. Finally, unordered lists close with a `</ul>` .
2020-11-27 19:02:05 +01:00
2018-10-08 01:01:53 +01:00
For example:
2019-05-14 01:11:58 -07:00
```html
<ul>
<li>milk</li>
<li>cheese</li>
</ul>
```
2021-02-01 11:56:07 -08:00
would create a bullet point style list of `milk` and `cheese` .
2020-11-27 19:02:05 +01:00
# --instructions--
Remove the last two `p` elements and create an unordered list of three things that cats love at the bottom of the page.
# --hints--
Create a `ul` element.
```js
assert($('ul').length > 0);
```
You should have three `li` elements within your `ul` element.
```js
assert($('ul li').length > 2);
```
Your `ul` element should have a closing tag.
```js
assert(
code.match(/<\/ul>/gi) &&
code.match(/<ul/gi) &&
code.match(/<\/ul>/gi).length === code.match(/<ul/gi).length
);
```
Your `li` elements should have closing tags.
```js
assert(
code.match(/<\/li>/gi) &&
code.match(/<li[\s>]/gi) &&
code.match(/<\/li>/gi).length === code.match(/<li[\s>]/gi).length
);
2018-09-30 23:01:58 +01:00
```
2020-11-27 19:02:05 +01:00
Your `li` elements should not contain an empty string or only white-space.
```js
assert($('ul li').filter((_, item) => !$(item).text().trim()).length === 0);
```
2018-09-30 23:01:58 +01:00
2020-11-27 19:02:05 +01:00
# --seed--
2018-09-30 23:01:58 +01:00
2020-11-27 19:02:05 +01:00
## --seed-contents--
2018-09-30 23:01:58 +01:00
```html
<h2>CatPhotoApp</h2>
<main>
<p>Click here to view more <a href="#">cat photos</a>.</p>
2018-10-08 01:01:53 +01:00
2021-04-26 19:04:53 +02:00
<a href="#"><img src="https://www.bit.ly/fcc-relaxing-cat" alt="A cute orange cat lying on its back."></a>
2018-10-08 01:01:53 +01:00
2018-09-30 23:01:58 +01:00
<p>Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.</p>
<p>Purr jump eat the grass rip the couch scratched sunbathe, shed everywhere rip the couch sleep in the sink fluffy fur catnip scratched.</p>
</main>
```
2020-11-27 19:02:05 +01:00
# --solutions--
2018-09-30 23:01:58 +01:00
2019-03-01 13:20:09 -05:00
```html
<h2>CatPhotoApp</h2>
<main>
<p>Click here to view more <a href="#">cat photos</a>.</p>
2021-04-26 19:04:53 +02:00
<a href="#"><img src="https://www.bit.ly/fcc-relaxing-cat" alt="A cute orange cat lying on its back."></a>
2019-03-01 13:20:09 -05:00
<ul>
<li>milk</li>
<li>mice</li>
<li>catnip</li>
</ul>
</main>
2018-09-30 23:01:58 +01:00
```