"Add Placeholder Text to a Text Field"

Tell us what’s happening:

I don’t know how to set the value of my placeholder attribute to “cat photo URL”. please help me thanks in advance

Your code so far

  <p>Click here to view more <a href="#">cat photos</a>.</p>
  <a href="#"><img src="https://bit.ly/fcc-relaxing-cat" alt="A cute orange cat lying on its back."></a>
  <p>Things cats love:</p>
    <li>cat nip</li>
    <li>laser pointers</li>
  <p>Top 3 things cats hate:</p>
    <li>flea treatment</li>
    <li>other cats</li>
  <input type="text" placeholder="https://bit.ly/fcc-relaxing-cat">

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.99 Safari/537.36.

Link to the challenge:

There is an attribute called placeholder in your input element.

Yes, i can see it. But how to set the value of it to URL?

the placeholder text is just the text thats in the input to give the user an idea of what to put in that field when they are filling out your form. I’m sure you’ve seen forms online before that don’t have descriptions above the field box but rather inside the box says like “first name”.

This is the same thing it wants the placeholder text in the text box to be litterally “cat photo URL” so that the end user knows to put his cat photo URL into that text box when filling out your form.

Hope that makes sense.

  • Nao
1 Like