From the course: Building Great Forms with HTML and CSS

Unlock the full course today

Join today to access over 24,400 courses taught by industry experts.

CSS validation

CSS validation

- [Instructor] We all know that online forms can be a hassle to have to fill out, especially when there's nothing but a list of inputs presented without much guidance or feedback. But as form creators, there are many things we can do to improve the experience for the users filling out our online forms. Using CSS, we have access to four states of a form input with pseudo-classes. Valid, invalid, required and optional. We can use these states to provide some, albeit limited feedback for users as they fill out the form. If you are creative with your CSS, however, you can actually make them look and function pretty darn well. Using valid and invalid, we can let users know in real time if their input satisfies all the necessary requirements. This is a form we're going to be working on. So, if I fill out some value into one of these fields, we do see a list of criteria, and obviously I'm meeting the criteria. So, that's…

Contents