--- id: bad87fee1348bd9aedf08830 title: Add Placeholder Text to a Text Field challengeType: 0 videoUrl: 'https://scrimba.com/p/pVMPUv/cKdJDhg' forumTopicId: 16647 dashedName: add-placeholder-text-to-a-text-field --- # --description-- Placeholder text is what is displayed in your `input` element before your user has inputted anything. You can create placeholder text like so: `` **Note:** Remember that `input` elements are self-closing. # --instructions-- Set the `placeholder` value of your text `input` to "cat photo URL". # --hints-- You should add a `placeholder` attribute to the existing text `input` element. ```js assert($('input[placeholder]').length > 0); ``` You should set the value of your placeholder attribute to `cat photo URL`. ```js assert( $('input') && $('input').attr('placeholder') && $('input') .attr('placeholder') .match(/cat\s+photo\s+URL/gi) ); ``` The finished `input` element should not have a closing tag. ```js assert(!code.match(/.*<\/input>/gi)); ``` The finished `input` element should have valid syntax. ```js assert($('input[type=text]').length > 0); ``` # --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
```