freeCodeCamp Challenge Guide: Add Placeholder Text to a Text Field

Add Placeholder Text to a Text Field

Problem Explanation

placeholder is an attribute, not a tag. It can be used together with the attribute text of the input tag to create a text to visualize when the input box is empty.

 <input type=text placeholder="This is a placeholder text">

If you’re stuck check for these issues:

  • you should add the placeholder attribute to the input tag already present in the code without removing anything; if by accident you removed or modified something remember that you can restart with a clean code by clicking reset all code button
  • the syntax is the same of every attribute: <tag attributeName="attributeValue" > and the value to insert is indicated by the challenge’s instructions (check for typos).

Good luck!


Hi, anyone who can tell how to add the placeholder in to url ?? my project kinda not working. thanks!

1 Like
hope that will help!
1 Like

I too have a same prblm
unable to add attribute to placeholder text
anyone who have worked it out please reply…

I have written the exactly samething u have written but it’s still not working…


<input type="text> deleted that. and let’s put <input type=“text” placeholder="cat photo URL > and done !


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