Add place holder text to a text field

Tell us what’s happening:

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">
</main>

<input type="text" placeholder="cat photo URL">



Your browser information:

User Agent is: Mozilla/5.0 (iPhone; CPU iPhone OS 13_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.1 Mobile/15E148 Safari/604.1.

Challenge: Add Placeholder Text to a Text Field

Link to the challenge:

You need to set the placeholder attribute of the existing input element, as shown in the code snippet above. Most often, if you’re required to create a new HTML element, the challenge will explicitly tell you so.

1 Like