InterviewSolution
Saved Bookmarks
| 1. |
Can I use HTML markup in the placeholder attribute? I want to insert an image, or maybe change the colors. |
|
Answer» Placeholder: The placeholder attribute can only CONTAIN TEXT, not HTML markup. HOWEVER, there are some vendor-specific CSS extensions that allow you to style the placeholder text in some browsers. Browsers that don’t support the placeholder attribute will simply IGNORE it. No harm, no foul. See whether your browser supports placeholder text. Here’s how you can INCLUDE placeholder text in your own web forms: <form> <input name="q" placeholder="Go to a Website"> <input type="submit" value="Search"> </form> |
|