--- id: 58c383d33e2e3259241f3076 title: Use Attribute Selectors to Style Elements challengeType: 0 videoUrl: 'https://scrimba.com/c/cnpymfJ' forumTopicId: 301092 dashedName: use-attribute-selectors-to-style-elements --- # --description-- You have been adding `id` or `class` attributes to elements that you wish to specifically style. These are known as ID and class selectors. There are other CSS Selectors you can use to select custom groups of elements to style. Let's bring out CatPhotoApp again to practice using CSS Selectors. For this challenge, you will use the `[attr=value]` attribute selector to style the checkboxes in CatPhotoApp. This selector matches and styles elements with a specific attribute value. For example, the below code changes the margins of all elements with the attribute `type` and a corresponding value of `radio`: ```css [type='radio'] { margin: 20px 0px 20px 0px; } ``` # --instructions-- Using the `type` attribute selector, try to give the checkboxes in CatPhotoApp a top margin of 10px and a bottom margin of 15px. # --hints-- The `type` attribute selector should be used to select the checkboxes. ```js assert( code.match( /

CatPhotoApp

Click here to view more cat photos.

A cute orange cat lying on its back.

Things cats love:

Top 3 things cats hate:

  1. flea treatment
  2. thunder
  3. other cats


``` # --solutions-- ```html

CatPhotoApp

Click here to view more cat photos.

A cute orange cat lying on its back.

Things cats love:

Top 3 things cats hate:

  1. flea treatment
  2. thunder
  3. other cats


```