To include placeholder text in your form you just need to add the
placeholder attribute to you input field, give that a value (e.g. “WDW Rocks!”) and it will give you the desired result.
<form> <input name="s" placeholder="WDW Rocks!"> <input type="submit" value="Search"> </form>
The above renders this:
If the browser doesn’t support the placeholder attribute, it will be ignored. So start using it today!
Want to become a better web developer?
Join over 20,000 other developer & designers who get awesome links to the best news and articles each week delivered directly to their inbox.