Input types + required attribute
Try to submit the form without filling the fields. You should get a notice to fill out the fields properly. Placeholders and validation completely works without JavaScript. Keep in mind: using the required
attribute is client side validation only! Never forget to also validate your form on server side.
Note: Both Opera (11.11) and Safari (5.0.4) show the placeholder
attribute but don't care about the required
attribute and let you send the form even if the fields aren't filled. IE9 ignores both.