---
id: bad87fee1348bd9aedf08828
title: Create an Ordered List
challengeType: 0
videoUrl: 'https://scrimba.com/p/pVMPUv/cQ3B8TM'
forumTopicId: 16824
dashedName: create-an-ordered-list
---
# --description--
HTML has another special element for creating ordered lists, or numbered lists.
Ordered lists start with an opening `
` element, followed by any number of `- ` elements. Finally, ordered lists are closed with the `
` tag.
For example:
```html
- Garfield
- Sylvester
```
would create a numbered list of "Garfield" and "Sylvester".
# --instructions--
Create an ordered list of the top 3 things cats hate the most.
# --hints--
You should have an ordered list for `Top 3 things cats hate:`
```js
assert(/Top 3 things cats hate:/i.test($('ol').prev().text()));
```
You should have an unordered list for `Things cats love:`
```js
assert(/Things cats love:/i.test($('ul').prev().text()));
```
You should have only one `ul` element.
```js
assert.equal($('ul').length, 1);
```
You should have only one `ol` element.
```js
assert.equal($('ol').length, 1);
```
You should have three `li` elements within your `ul` element.
```js
assert.equal($('ul li').length, 3);
```
You should have three `li` elements within your `ol` element.
```js
assert.equal($('ol li').length, 3);
```
Your `ul` element should have a closing tag.
```js
assert(
code.match(/<\/ul>/g) &&
code.match(/<\/ul>/g).length === code.match(//g).length
);
```
Your `ol` element should have a closing tag.
```js
assert(
code.match(/<\/ol>/g) &&
code.match(/<\/ol>/g).length === code.match(//g).length
);
```
Your `li` element should have a closing tag.
```js
assert(
code.match(/<\/li>/g) &&
code.match(/- /g) &&
code.match(/<\/li>/g).length === code.match(/
- /g).length
);
```
The `li` elements in your unordered list should not be empty.
```js
$('ul li').each((i, val) =>
assert(__helpers.removeWhiteSpace(val.textContent))
);
```
The `li` elements in your ordered list should not be empty.
```js
$('ol li').each((i, val) =>
assert(!!__helpers.removeWhiteSpace(val.textContent))
);
```
# --seed--
## --seed-contents--
```html
CatPhotoApp
Click here to view more cat photos.
Things cats love:
- cat nip
- laser pointers
- lasagna
Top 3 things cats hate:
```
# --solutions--
```html
CatPhotoApp
Click here to view more cat photos.
Things cats love:
- cat nip
- laser pointers
- lasagna
Top 3 things cats hate:
- hate 1
- hate 2
- hate 3
```