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
2018-09-30 23:01:58 +01:00
---
## Description
<section id='description'>
HTML has a special element for creating <code>unordered lists</code>, or bullet point style lists.
Unordered lists start with an opening <code>< ;ul> ;</code> element, followed by any number of <code>< ;li> ;</code> elements. Finally, unordered lists close with a <code>< ;/ul> ;</code>
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>
```
2018-09-30 23:01:58 +01:00
would create a bullet point style list of "milk" and "cheese".
</section>
## Instructions
<section id='instructions'>
Remove the last two <code>p</code> elements and create an unordered list of three things that cats love at the bottom of the page.
</section>
## Tests
<section id='tests'>
```yml
2018-10-04 14:37:37 +01:00
tests:
- text: Create a <code>ul</code> element.
2019-07-24 02:50:51 -07:00
testString: assert($("ul").length > 0);
2018-10-04 14:37:37 +01:00
- text: You should have three <code>li</code> elements within your <code>ul</code> element.
2019-07-24 02:50:51 -07:00
testString: assert($("ul li").length > 2);
2018-10-04 14:37:37 +01:00
- text: Make sure your <code>ul</code> element has a closing tag.
2019-07-24 02:50:51 -07:00
testString: assert(code.match(/<\/ul>/gi) && code.match(/<ul/gi) && code.match(/<\/ul>/gi).length === code.match(/<ul/gi).length);
2018-10-04 14:37:37 +01:00
- text: Make sure your <code>li</code> elements have closing tags.
2019-07-24 02:50:51 -07:00
testString: assert(code.match(/<\/li>/gi) && code.match(/<li[\s>]/gi) && code.match(/<\/li>/gi).length === code.match(/<li[\s>]/gi).length);
2019-02-17 15:19:21 -05:00
- text: Make sure your <code>li</code> elements don’ t contain an empty string or only white-space.
2019-07-24 02:50:51 -07:00
testString: assert($("ul li").filter((_, item) => !$(item).text().trim()).length === 0);
2018-09-30 23:01:58 +01:00
```
</section>
## Challenge Seed
<section id='challengeSeed'>
<div id='html-seed'>
```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
2018-09-30 23:01:58 +01:00
<a href="#"><img src="https://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>
```
</div>
</section>
## Solution
<section id='solution'>
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>
<a href="#"><img src="https://bit.ly/fcc-relaxing-cat" alt="A cute orange cat lying on its back."></a>
<ul>
<li>milk</li>
<li>mice</li>
<li>catnip</li>
</ul>
</main>
2018-09-30 23:01:58 +01:00
```
2019-03-01 13:20:09 -05:00
2018-09-30 23:01:58 +01:00
</section>