The :valid CSS pseudo-class

The :valid CSS pseudo-class represents any  <input> or other <form> element whose contents validate successfully. This allows to easily make valid fields adopt an appearance that helps the user confirm that their data is formatted properly.

input:valid {
  background-color: powderblue;

This pseudo-class is useful for highlighting correct fields for the user.

Here is browser support for this class:

broowser support

You can also read this

Remove duplicate elements from list by value with jQuery

jQuery is very useful and easy to learn and it’s...

.list {

How to count words in each paragraph

Sometimes you need a number of words for a certain...

  var iTotalWords = $(this).text().split(' ').length;