--- id: bad87fee1348bd9aedf08845 title: Use a span to Target Inline Elements challengeType: 0 --- ## Description
You can use spans to create inline elements. Remember when we used the btn-block class to make the button fill the entire row? That illustrates the difference between an "inline" element and a "block" element. By using the inline span element, you can put several elements on the same line, and even style different parts of the same line differently. Nest the word "love" in your "Things cats love" element below within a span element. Then give that span the class text-danger to make the text red. Here's how you would do this with the "Top 3 things cats hate" element: <p>Top 3 things cats <span class="text-danger">hate:</span></p>
## Instructions
## Tests
```yml tests: - text: Your span element should be inside your p element. testString: 'assert($("p span") && $("p span").length > 0, "Your span element should be inside your p element.");' - text: Your span element should have just the text love. testString: 'assert($("p span") && $("p span").text().match(/love/i) && !$("p span").text().match(/Things cats/i), "Your span element should have just the text love.");' - text: Your span element should have class text-danger. testString: 'assert($("span").hasClass("text-danger"), "Your span element should have class text-danger.");' - text: Make sure your span element has a closing tag. testString: 'assert(code.match(/<\/span>/g) && code.match(//g).length === code.match(/span element has a closing tag.");' ```
## Challenge Seed
```html

CatPhotoApp

A cute orange cat lying on its back. Three kittens running towards the camera.

Things cats love:

  • cat nip
  • laser pointers
  • lasagna

Top 3 things cats hate:

  1. flea treatment
  2. thunder
  3. other cats
```
## Solution
```js // solution required ```