2018-09-30 23:01:58 +01:00
---
id: bad87fee1348bd9aedf08801
title: Inform with the Paragraph Element
challengeType: 0
videoUrl: 'https://scrimba.com/p/pVMPUv/ceZ7DtN'
2019-07-31 11:32:23 -07:00
forumTopicId: 18202
2018-09-30 23:01:58 +01:00
---
## Description
<section id='description'>
<code>p</code> elements are the preferred element for paragraph text on websites. <code>p</code> is short for "paragraph".
You can create a paragraph element like this:
<code>< ;p> ;I'm a p tag!< ;/p> ;</code>
</section>
## Instructions
<section id='instructions'>
Create a <code>p</code> element below your <code>h2</code> element, and give it the text "Hello Paragraph".
2019-03-22 22:02:12 +08:00
<strong>Note:</strong> As a convention, all HTML tags are written in lowercase, for example <code>< ;p> ;< ;/p> ;</code> and not <code>< ;P> ;< ;/P> ;</code>.
2018-09-30 23:01:58 +01:00
</section>
## Tests
<section id='tests'>
```yml
2018-10-04 14:37:37 +01:00
tests:
2019-07-24 02:50:51 -07:00
- text: Your code should have a valid <code>p</code> element.
testString: assert(($("p").length > 0));
2020-08-31 04:53:09 +01:00
- text: Your <code>p</code> element should have the text <code>Hello Paragraph</code>.
2019-07-24 02:50:51 -07:00
testString: assert.isTrue((/hello(\s)+paragraph/gi).test($("p").text()));
2019-11-20 06:45:19 -08:00
- text: Your <code>p</code> element should have a closing tag.
2019-07-24 02:50:51 -07:00
testString: assert(code.match(/<\/p>/g) && code.match(/<\/p>/g).length === code.match(/<p/g).length);
2018-09-30 23:01:58 +01:00
```
</section>
## Challenge Seed
<section id='challengeSeed'>
<div id='html-seed'>
```html
<h1>Hello World</h1>
<h2>CatPhotoApp</h2>
```
</div>
</section>
## Solution
<section id='solution'>
2019-04-22 02:07:05 -04:00
```html
<h1>Hello World</h1>
<h2>CatPhotoApp</h2>
<p>Hello Paragraph</p>
2018-09-30 23:01:58 +01:00
```
2019-07-18 08:24:12 -07:00
2018-09-30 23:01:58 +01:00
</section>