--- id: bad87fee1348bd9aedf08804 challengeType: 0 videoUrl: 'https://scrimba.com/p/pVMPUv/cGyGbca' forumTopicId: 16782 title: 给 HTML 添加注释 --- ## Description
记住:注释的开始标记是<!--,结束标记是-->。 现在你需要在h2元素前终止注释。
## Instructions
任务:注释掉h1元素和p元素,保留h2元素。
## Tests
```yml tests: - text: '注释掉h1元素,这样它就从网页上消失了。' testString: assert(($("h1").length === 0)); - text: 'h2元素保持原样,这样网页上还能看到它。' testString: assert(($("h2").length > 0)); - text: '注释掉p元素,这样它就从网页上消失了。' testString: assert(($("p").length === 0)); - text: '确保每一个注释都以-->结尾。' testString: assert(code.match(/[^fc]-->/g).length > 1); - text: '不要更改h1元素、h2 元素、p元素的顺序。' testString: assert((code.match(/<([a-z0-9]){1,2}>/g)[0]==="

" && code.match(/<([a-z0-9]){1,2}>/g)[1]==="

" && code.match(/<([a-z0-9]){1,2}>/g)[2]==="

") ); ```

## Challenge Seed
```html ```
## Solution