--- id: bad87fee1348bd9aedd08835 title: Check Radio Buttons and Checkboxes by Default challengeType: 0 videoUrl: 'https://scrimba.com/p/pVMPUv/cWk3Qh6' forumTopicId: 301094 dashedName: check-radio-buttons-and-checkboxes-by-default --- # --description-- You can set a checkbox or radio button to be checked by default using the `checked` attribute. To do this, just add the word `checked` to the inside of an input element. For example: ```html ``` # --instructions-- Set the first of your radio buttons and the first of your checkboxes to both be checked by default. # --hints-- Your first radio button on your form should be checked by default. ```js assert($('input[type="radio"]').prop('checked')); ``` Your first checkbox on your form should be checked by default. ```js assert($('input[type="checkbox"]').prop('checked')); ``` # --seed-- ## --seed-contents-- ```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


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


```