--- id: bad87fee1348bd9aedf08828 title: Create an Ordered List challengeType: 0 videoUrl: '' localeTitle: 创建有序列表 --- ## Description
HTML还有另一个用于创建ordered lists或编号列表的特殊元素。有序列表以开头<ol>元素开头,后跟任意数量的<li>元素。最后,有序列表以</ol>结尾例如:
<OL>
<LI>加菲尔德</ LI>
<LI>西尔威斯特</ LI>
</醇>
将创建一个编号列表“加菲猫”和“西尔维斯特”。
## Instructions
创建猫最讨厌的前三件事的有序列表。
## Tests
```yml tests: - text: 你应该有一个“猫讨厌的三件事”的有序列表: testString: 'assert((/Top 3 things cats hate:/i).test($("ol").prev().text()), "You should have an ordered list for "Top 3 things cats hate:"");' - text: 你应该有一个无序的列表“猫爱的东西:” testString: 'assert((/Things cats love:/i).test($("ul").prev().text()), "You should have an unordered list for "Things cats love:"");' - text: 你应该只有一个ul元素。 testString: 'assert.equal($("ul").length, 1, "You should have only one ul element.");' - text: 你应该只有一个ol元素。 testString: 'assert.equal($("ol").length, 1, "You should have only one ol element.");' - text: 你的ul元素中应该有三个li元素。 testString: 'assert.equal($("ul li").length, 3, "You should have three li elements within your ul element.");' - text: 你的ol元素中应该有三个li元素。 testString: 'assert.equal($("ol li").length, 3, "You should have three li elements within your ol element.");' - text: 确保你的ul元素有一个结束标记。 testString: 'assert(code.match(/<\/ul>/g) && code.match(/<\/ul>/g).length === code.match(/
## Challenge Seed
```html

CatPhotoApp

Click here to view more cat photos.

A cute orange cat lying on its back.

Things cats love:

  • cat nip
  • laser pointers
  • lasagna

Top 3 things cats hate:

```
## Solution
```js // solution required ```