2018-09-30 23:01:58 +01:00
---
id: bad87fed1348bd9aedf08833
title: Delete HTML Elements
challengeType: 0
videoUrl: 'https://scrimba.com/p/pVMPUv/ckK73C9'
2019-07-31 11:32:23 -07:00
forumTopicId: 17559
2021-01-13 03:31:00 +01:00
dashedName: delete-html-elements
2018-09-30 23:01:58 +01:00
---
2020-11-27 19:02:05 +01:00
# --description--
2018-09-30 23:01:58 +01:00
Our phone doesn't have much vertical space.
2020-11-27 19:02:05 +01:00
2018-09-30 23:01:58 +01:00
Let's remove the unnecessary elements so we can start building our CatPhotoApp.
2020-11-27 19:02:05 +01:00
# --instructions--
2018-09-30 23:01:58 +01:00
2020-11-27 19:02:05 +01:00
Delete your `h1` element so we can simplify our view.
2018-09-30 23:01:58 +01:00
2020-11-27 19:02:05 +01:00
# --hints--
2018-09-30 23:01:58 +01:00
2020-11-27 19:02:05 +01:00
Your `h1` element should be deleted.
```js
assert(!code.match(/< h1 > /gi) && !code.match(/< \/h1 > /gi));
2018-09-30 23:01:58 +01:00
```
2020-11-27 19:02:05 +01:00
Your `h2` element should be on the page.
```js
assert(code.match(/< h2 > [\w\W]*< \/h2 > /gi));
```
Your `p` element should be on the page.
```js
assert(code.match(/< p > [\w\W]*< \/p > /gi));
```
2018-09-30 23:01:58 +01:00
2020-11-27 19:02:05 +01:00
# --seed--
2018-09-30 23:01:58 +01:00
2020-11-27 19:02:05 +01:00
## --seed-contents--
2018-09-30 23:01:58 +01:00
```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 >
```
2020-11-27 19:02:05 +01:00
# --solutions--
2018-09-30 23:01:58 +01:00
2020-07-13 18:58:50 +02:00
```html
< 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-09-30 23:01:58 +01:00
```