--- id: bad87fee1348bd9aedf08835 title: Create a Set of Checkboxes challengeType: 0 videoUrl: 'https://scrimba.com/p/pVMPUv/cqrkJsp' --- ## Description
Forms commonly use checkboxes for questions that may have more than one answer. Checkboxes are a type of input. Each of your checkboxes can be nested within its own label element. By wrapping an input element inside of a label element it will automatically associate the checkbox input with the label element surrounding it. All related checkbox inputs should have the same name attribute. It is considered best practice to explicitly define the relationship between a checkbox input and its corresponding label by setting the for attribute on the label element to match the id attribute of the associated input element. Here's an example of a checkbox: <label for="loving"><input id="loving" type="checkbox" name="personality"> Loving</label>
## Instructions
Add to your form a set of three checkboxes. Each checkbox should be nested within its own label element. All three should share the name attribute of personality.
## Tests
```yml tests: - text: Your page should have three checkbox elements. testString: assert($('input[type="checkbox"]').length > 2, 'Your page should have three checkbox elements.'); - text: Each of your three checkbox elements should be nested in its own label element. testString: assert($('label > input[type="checkbox"]:only-child').length > 2, 'Each of your three checkbox elements should be nested in its own label element.'); - text: Make sure each of your label elements has a closing tag. testString: assert(code.match(/<\/label>/g) && code.match(/
## Challenge Seed
```html

CatPhotoApp

Click here to view more cat photos.

A cute orange cat lying on its back.

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 ```