2018-10-10 18:03:03 -04:00
---
id: bad87fed1348bd9aedf08833
title: Delete HTML Elements
challengeType: 0
2019-08-28 16:26:13 +03:00
videoUrl: https://scrimba.com/p/pVMPUv/ckK73C9
forumTopicId: 17559
2018-10-10 18:03:03 -04:00
localeTitle: Удалить элементы HTML
---
## Description
2019-08-28 16:26:13 +03:00
<section id='description'>
Наш телефон не имеет большого пространства. Удалим ненужные элементы, чтобы мы могли начать строить CatPhotoApp.
</section>
2018-10-10 18:03:03 -04:00
## Instructions
2019-08-28 16:26:13 +03:00
<section id='instructions'>
Удалите элемент <code>h1</code> чтобы мы могли упростить наше представление.
</section>
2018-10-10 18:03:03 -04:00
## Tests
<section id='tests'>
```yml
tests:
2019-08-28 16:26:13 +03:00
- text: Delete your <code>h1</code> element.
testString: assert(!code.match(/<h1>/gi) && !code.match(/<\/h1>/gi));
- text: Leave your <code>h2</code> element on the page.
testString: assert(code.match(/<h2>[\w\W]*<\/h2>/gi));
- text: Leave your <code>p</code> element on the page.
testString: assert(code.match(/<p>[\w\W]*<\/p>/gi));
2018-10-10 18:03:03 -04:00
```
</section>
## Challenge Seed
<section id='challengeSeed'>
<div id='html-seed'>
```html
<h1>Hello World</h1>
<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>
```
</div>
</section>
## Solution
<section id='solution'>
2019-08-28 16:26:13 +03:00
```html
var code = "<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>"
2018-10-10 18:03:03 -04:00
```
2019-08-28 16:26:13 +03:00
2018-10-10 18:03:03 -04:00
</section>