"Add Placeholder Text to a Text Field"

"Add Placeholder Text to a Text Field"
0

#1

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


<h2>CatPhotoApp</h2>
<main>
  <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>
  <ul>
    <li>cat nip</li>
    <li>laser pointers</li>
    <li>lasagna</li>
  </ul>
  <p>Top 3 things cats hate:</p>
  <ol>
    <li>flea treatment</li>
    <li>thunder</li>
    <li>other cats</li>
  </ol>
  <input type="text" placeholder="https://bit.ly/fcc-relaxing-cat">
</main>

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:
https://learn.freecodecamp.org/responsive-web-design/basic-html-and-html5/add-placeholder-text-to-a-text-field


#2

There is an attribute called placeholder in your input element.


#3

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


#4

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