3.0 KiB
3.0 KiB
id, title, challengeType, videoUrl, localeTitle
id | title | challengeType | videoUrl | localeTitle |
---|---|---|---|---|
bad87fee1348bd9aecf08801 | Introduction to HTML5 Elements | 0 | HTML5元素简介 |
Description
header
, footer
, nav
, video
, article
, section
和其他。这些标签使您的HTML更易于阅读,并且还有助于搜索引擎优化(SEO)和可访问性。 main
HTML5标记可帮助搜索引擎和其他开发人员找到您网页的主要内容。 注意 “应用可访问性”部分介绍了许多新的HTML5标记及其优点。
Instructions
p
现有的后件p
具有以下的小猫存有文本元素: Purr jump eat the grass rip the couch scratched sunbathe, shed everywhere rip the couch sleep in the sink fluffy fur catnip scratched.
用开头和关闭main
标签包装段落。 Tests
tests:
- text: 使用Kitty Ipsum文本需要2个<code>p</code>元素。
testString: 'assert($("p").length > 1, "You need 2 <code>p</code> elements with Kitty Ipsum text.");'
- text: 确保每个<code>p</code>元素都有一个结束标记。
testString: 'assert(code.match(/<\/p>/g) && code.match(/<\/p>/g).length === code.match(/<p/g).length, "Make sure each of your <code>p</code> elements has a closing tag.");'
- text: 你的<code>p</code>元素应该包含所提供的额外<code>kitty ipsum text</code>的前几个单词。
testString: 'assert.isTrue((/Purr\s+jump\s+eat/gi).test($("p").text()), "Your <code>p</code> element should contain the first few words of the provided additional <code>kitty ipsum text</code>.");'
- text: 您的代码应该有一个<code>main</code>元素。
testString: 'assert($("main").length === 1, "Your code should have one <code>main</code> element.");'
- text: <code>main</code>元素应该有两个段落元素作为子元素。
testString: 'assert($("main").children("p").length === 2, "The <code>main</code> element should have two paragraph elements as children.");'
- text: 开头<code>main</code>标记应位于第一个段落标记之前。
testString: 'assert(code.match(/<main>\s*?<p>/g), "The opening <code>main</code> tag should come before the first paragraph tag.");'
- text: 结束<code>main</code>标记应该在第二个结束段标记之后。
testString: 'assert(code.match(/<\/p>\s*?<\/main>/g), "The closing <code>main</code> tag should come after the second closing paragraph tag.");'
Challenge Seed
<h2>CatPhotoApp</h2>
<p>Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.</p>
Solution
// solution required