Be Brav3

FCC Challenge 33: Create a Set of Checkboxes

March 14, 2016

In Free Code Camp challenge 33 we learn to create checkboxes.

Forms commonly use checkboxes for questions that may have more than one answer.

Checkboxes are a type of input

Each of your checkboxes should be nested within its own label element.

All related checkbox inputs should have the same name attribute.

Here’s an example of a checkbox:

[html]

[/html]

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.

The original code is below:

[html]

CatPhotoApp

Click here for 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
[/html]

The updated code with checkboxes is below:

[html highlight=”49-51″]

CatPhotoApp

Click here for 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
[/html]