“the :valid and :invalid pseudo-classes [apply] to the form element.

“the :valid and :invalid pseudo-classes [apply] to the form element. This way you can determine whether all controls in a given form are correctly filled in.”

So imagine your CSS looks like this: `input:invalid { color: red; font-weight: bold }`

This is particularly useful in the context of the newer HTML5 form types, like ``

http://blog.whatwg.org/weekly-translate-attribute

http://blog.whatwg.org/weekly-translate-attribute

3 replies on ““the :valid and :invalid pseudo-classes [apply] to the form element.”

Comments are closed.