2018-10-04 14:37:37 +01:00
---
id: bad87fee1348bd9aec908846
title: Create a Bootstrap Headline
challengeType: 0
2019-07-31 11:32:23 -07:00
forumTopicId: 16812
2018-10-04 14:37:37 +01:00
---
## Description
<section id='description'>
Now let's build something from scratch to practice our HTML, CSS and Bootstrap skills.
We'll build a jQuery playground, which we'll soon put to use in our jQuery challenges.
To start with, create an <code>h3</code> element, with the text <code>jQuery Playground</code>.
Color your <code>h3</code> element with the <code>text-primary</code> Bootstrap class, and center it with the <code>text-center</code> Bootstrap class.
</section>
## Instructions
<section id='instructions'>
</section>
## Tests
<section id='tests'>
```yml
tests:
2019-11-22 04:44:40 -08:00
- text: You should add an <code>h3</code> element to your page.
2019-07-24 23:53:37 -07:00
testString: assert($("h3") && $("h3").length > 0);
2019-11-22 04:44:40 -08:00
- text: Your <code>h3</code> element should have a closing tag.
2019-07-24 23:53:37 -07:00
testString: assert(code.match(/<\/h3>/g) && code.match(/<h3/g) && code.match(/<\/h3>/g).length === code.match(/<h3/g).length);
2018-10-04 14:37:37 +01:00
- text: Your <code>h3</code> element should be colored by applying the class <code>text-primary</code>
2019-07-24 23:53:37 -07:00
testString: assert($("h3").hasClass("text-primary"));
2018-10-04 14:37:37 +01:00
- text: Your <code>h3</code> element should be centered by applying the class <code>text-center</code>
2019-07-24 23:53:37 -07:00
testString: assert($("h3").hasClass("text-center"));
2018-10-04 14:37:37 +01:00
- text: Your <code>h3</code> element should have the text <code>jQuery Playground</code>.
2019-07-24 23:53:37 -07:00
testString: assert.isTrue((/jquery(\s)+playground/gi).test($("h3").text()));
2018-10-04 14:37:37 +01:00
```
</section>
## Challenge Seed
<section id='challengeSeed'>
<div id='html-seed'>
```html
```
</div>
</section>
## Solution
<section id='solution'>
2018-11-06 08:09:14 -05:00
```html
<h3 class="text-primary text-center">jQuery Playground</h3>
2018-10-04 14:37:37 +01:00
```
2018-11-06 08:09:14 -05:00
2018-10-04 14:37:37 +01:00
</section>