--- id: bad87fee1348bd9aedf08828 title: 順序付きリストを作成する challengeType: 0 videoUrl: 'https://scrimba.com/p/pVMPUv/cQ3B8TM' forumTopicId: 16824 dashedName: create-an-ordered-list --- # --description-- HTML にはもう一つ、順序付きリスト (ordered lists) または番号付きリストを作成するための特別な要素があります。 順序付きリストは `
    ` 要素で始まり、その後に任意の数の `
  1. ` 要素が続きます。 最後に、順序付きリストを `
` タグで閉じます。 例: ```html
  1. Garfield
  2. Sylvester
``` 上の例は `Garfield` と `Sylvester` の番号付きリストを作成します。 # --instructions-- 猫が嫌いな物トップ 3 の順序付きリストを作成しましょう。 # --hints-- `Top 3 things cats hate:` の下に順序付きリストを作成してください。 ```js assert(/Top 3 things cats hate:/i.test($('ol').prev().text())); ``` `Things cats love:` の下には順序なしリストが必要です。 ```js assert(/Things cats love:/i.test($('ul').prev().text())); ``` `ul` 要素が 1 つだけ必要です。 ```js assert.equal($('ul').length, 1); ``` `ol` 要素が 1 つだけ必要です。 ```js assert.equal($('ol').length, 1); ``` `ul` 要素の中に `li` 要素が 3 つ必要です。 ```js assert.equal($('ul li').length, 3); ``` `ol` 要素の中に `li` 要素が 3 つ必要です。 ```js assert.equal($('ol li').length, 3); ``` `ul` 要素には終了タグが必要です。 ```js assert( code.match(/<\/ul>/g) && code.match(/<\/ul>/g).length === code.match(/