Files
freeCodeCamp/curriculum/challenges/russian/01-responsive-web-design/basic-html-and-html5/delete-html-elements.russian.md

1.6 KiB

id, title, challengeType, videoUrl, forumTopicId, localeTitle
id title challengeType videoUrl forumTopicId localeTitle
bad87fed1348bd9aedf08833 Delete HTML Elements 0 https://scrimba.com/p/pVMPUv/ckK73C9 17559 Удалить элементы HTML

Description

Наш телефон не имеет большого пространства. Удалим ненужные элементы, чтобы мы могли начать строить CatPhotoApp.

Instructions

Удалите элемент h1 чтобы мы могли упростить наше представление.

Tests

tests:
  - 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));

Challenge Seed

<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>

Solution

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>"