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'
---
## 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 > & #60 ; p& #62 ; I'm a p tag!& #60 ; /p& #62 ; </ 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".
2018-12-04 19:46:30 +05:30
Note:
As a convention, all HTML tags are written in lowercase, for example < code > & #60 ; p& #62 ;& #60 ; /p& #62 ; </ code > and not < code > & #60 ; P& #62 ;& #60 ; /P& #62 ; </ code > .
2018-09-30 23:01:58 +01:00
< / section >
## Tests
< section id = 'tests' >
```yml
2018-10-04 14:37:37 +01:00
tests:
- text: Create a < code > p</ code > element.
2018-12-04 19:46:30 +05:30
testString: assert(($("p").length > 0), 'Create a valid < code > p< / code > element.');
2018-10-04 14:37:37 +01:00
- text: Your < code > p</ code > element should have the text "Hello Paragraph".
2018-10-20 21:02:47 +03:00
testString: assert.isTrue((/hello(\s)+paragraph/gi).test($("p").text()), 'Your < code > p</ code > element should have the text "Hello Paragraph".');
2018-10-04 14:37:37 +01:00
- text: Make sure your < code > p</ code > element has a closing tag.
2018-10-20 21:02:47 +03:00
testString: assert(code.match(/< \/p > /g) && code.match(/< \/p > /g).length === code.match(/< p / g ). length , ' Make sure your < code > p</ code > element has a closing tag.');
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' >
```js
// solution required
```
< / section >