--- id: bad87fee1348bd9aedd08845 title: Add Font Awesome Icons to our Buttons required: - link: 'https://use.fontawesome.com/releases/v5.8.1/css/all.css' raw: true challengeType: 0 --- ## Description
Font Awesome is a convenient library of icons. These icons can be webfonts or vector graphics. These icons are treated just like fonts. You can specify their size using pixels, and they will assume the font size of their parent HTML elements. You can include Font Awesome in any app by adding the following code to the top of your HTML: <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.8.1/css/all.css" integrity="sha384-50oBUHEmvpQ+1lW4y57PTFmhCaXp0ML5d60M1M7uH2+nqUivzIebhndOJK28anvf" crossorigin="anonymous"> In this case, we've already added it for you to this page behind the scenes. The i element was originally used to make other elements italic, but is now commonly used for icons. You can add the Font Awesome classes to the i element to turn it into an icon, for example: <i class="fas fa-info-circle"></i> Note that the span element is also acceptable for use with icons.
## Instructions
Use Font Awesome to add a thumbs-up icon to your like button by giving it an i element with the classes fa and fa-thumbs-up. Make sure to keep the text "Like" next to the icon.
## Tests
```yml tests: - text: Add an i element with the classes fas and fa-thumbs-up. testString: assert($("i").is(".fas.fa-thumbs-up") || $("span").is(".fas.fa-thumbs-up")); - text: Your fa-thumbs-up icon should be located within the Like button. testString: assert(($("i.fa-thumbs-up").parent().text().match(/Like/gi) && $(".btn-primary > i").is(".fas.fa-thumbs-up")) || ($("span.fa-thumbs-up").parent().text().match(/Like/gi) && $(".btn-primary > span").is(".fas.fa-thumbs-up"))); - text: Nest your i element within your button element. testString: assert($("button").children("i").length > 0 || $("button").children("span").length > 0); - text: Make sure your icon element has a closing tag. testString: assert(code.match(/<\/i>|<\/span>/g)); ```
## 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
```html

CatPhotoApp

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

Things cats love:

Top 3 things cats hate:

  1. flea treatment
  2. thunder
  3. other cats
```