Basic HTML and HTML5: Add Placeholder Text to a Text Field

Placeholder text is what is displayed in your input element before your user has inputted anything.

You can create placeholder text like so:

<input type="text" placeholder="this is placeholder text">

Set the placeholder value of your text input to "cat photo URL".

  <p>Click here to view more <a href="#">cat photos</a>.</p>

  <a href="#"><img src="" 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="cat photo URL">

results matching ""

    No results matching ""