--- id: bad87fee1348bd9aedf08830 title: Add Placeholder Text to a Text Field challengeType: 0 videoUrl: https://scrimba.com/p/pVMPUv/cKdJDhg forumTopicId: 16647 localeTitle: Добавить текст для placeholder в текстовое поле --- ## Description
Текст placeholder'а - это то, что отображается в вашем элементе input до того, как ваш пользователь ввел что-либо. Вы можете создать текст placeholder'а следующим образом: <input type="text" placeholder="this is placeholder text">
## Instructions
Задайте значение placeholder вашего input текста «URL-адрес кота».
## Tests
```yml tests: - text: Add a placeholder attribute to the existing text input element. testString: assert($("input[placeholder]").length > 0); - text: Set the value of your placeholder attribute to "cat photo URL". testString: assert($("input") && $("input").attr("placeholder") && $("input").attr("placeholder").match(/cat\s+photo\s+URL/gi)); - text: The finished input element should not have a closing tag. testString: assert(!code.match(/.*<\/input>/gi)); - text: The finished input element should have valid syntax. testString: assert($("input[type=text]").length > 0); ```
## 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
```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
```