* fix: changed challenge test text to use should * fix: changed have to be used in Co-Authored-By: Tom <20648924+moT01@users.noreply.github.com> * fix: reworded test verbiage Co-Authored-By: Tom <20648924+moT01@users.noreply.github.com> * fix: improved test verbiage Co-Authored-By: Tom <20648924+moT01@users.noreply.github.com> * fix: improved test verbiage Co-Authored-By: Tom <20648924+moT01@users.noreply.github.com> * fix: corrected typo Co-Authored-By: Tom <20648924+moT01@users.noreply.github.com> * fix: corrected typo Co-Authored-By: Tom <20648924+moT01@users.noreply.github.com> * fix: changed have the to be used in Co-Authored-By: Tom <20648924+moT01@users.noreply.github.com> * fix: corrected verbiage Co-Authored-By: Parth Parth <34807532+thecodingaviator@users.noreply.github.com>
1.8 KiB
1.8 KiB
id, title, challengeType, videoUrl, forumTopicId
| id | title | challengeType | videoUrl | forumTopicId |
|---|---|---|---|---|
| bad87fee1348bd9aedf0887a | Headline with the h2 Element | 0 | https://scrimba.com/p/pVMPUv/cE8Gqf3 | 18196 |
Description
h2 element you will be adding in this step will add a level two heading to the web page.
This element tells the browser about the structure of your website. h1 elements are often used for main headings, while h2 elements are generally used for subheadings. There are also h3, h4, h5 and h6 elements to indicate different levels of subheadings.
Instructions
h2 tag that says "CatPhotoApp" to create a second HTML element below your "Hello World" h1 element.
Tests
tests:
- text: You should create an <code>h2</code> element.
testString: assert(($("h2").length > 0));
- text: Your <code>h2</code> element should have a closing tag.
testString: assert(code.match(/<\/h2>/g) && code.match(/<\/h2>/g).length === code.match(/<h2>/g).length);
- text: Your <code>h2</code> element should have the text "CatPhotoApp".
testString: assert.isTrue((/cat(\s)?photo(\s)?app/gi).test($("h2").text()));
- text: Your <code>h1</code> element should have the text "Hello World".
testString: assert.isTrue((/hello(\s)+world/gi).test($("h1").text()));
Challenge Seed
<h1>Hello World</h1>
Solution
<h1>Hello World</h1>
<h2>CatPhotoApp</h2>