Click here to view more cat photos.
Things cats love:
- cat nip
- laser pointers
- lasagna
Top 3 things cats hate:
- flea treatment
- thunder
- other cats
div
元素也称为除法元素,是其他元素的通用容器。 div
元素可能是所有人中最常用的HTML元素。就像任何其他非自闭元素一样,您可以使用<div>
打开div
元素,然后使用</div>
其关闭到另一行。 div
元素。提示:尝试将您的开始div
标记放在“Things cats love” p
元素上方,并将结束的div
标记放在结束的ol
标记之后,这样两个列表都在一个div
。 p
元素嵌套在div
元素中。
testString: 'assert($("div").children("p").length > 1, "Nest your p
elements inside your div
element.");'
- text: 将您的ul
元素div
元素中。
testString: 'assert($("div").children("ul").length > 0, "Nest your ul
element inside your div
element.");'
- text: 将您的ol
元素div
元素中。
testString: 'assert($("div").children("ol").length > 0, "Nest your ol
element inside your div
element.");'
- text: 确保你的div
元素有一个结束标记。
testString: 'assert(code.match(/<\/div>/g) && code.match(/<\/div>/g).length === code.match(/div
element has a closing tag.");'
```
## Challenge Seed
Click here to view more cat photos.
Things cats love:
Top 3 things cats hate: