点击查看更多猫咪图片。
猫咪最喜欢的三件东西:
- 猫薄荷
- 激光笔
- 千层饼
猫咪最讨厌的三件东西:
- 跳蚤
- 打雷
- 同类
div
元素,也叫 Content Division Element(内容划分元素)元素,是一个包裹其他元素的通用容器。
它也是 HTML 中出现频率最高的元素。
和其他普通元素一样,你可以用<div>
来标记一个div
元素的开始,用</div>
来标记一个div
元素的结束。
div
元素。
提示:你可以在第一个<p>
之前插入div
开始标记,在</ol>
之后插入div
结束标记,这样,所有的列表都位于div
之内。
p
元素嵌入div
元素中。'
testString: assert($("div").children("p").length > 1);
- text: '把ul
元素嵌入div
元素中。'
testString: assert($("div").children("ul").length > 0);
- text: '把ol
元素嵌入div
元素中。'
testString: assert($("div").children("ol").length > 0);
- text: '确保div
元素有结束标记。'
testString: assert(code.match(/<\/div>/g) && code.match(/<\/div>/g).length === code.match(/点击查看更多猫咪图片。
猫咪最喜欢的三件东西:
猫咪最讨厌的三件东西: