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

Target pseudo-class

This pseudo-class is called target pseudo-class and represents an element...

:target {
    outline: red dotted;
}

How to write middleware for Express.Js apps

Middleware functions are functions that have access to the request...

var logger = function (req, res, next) {
  console.log('logged')
  next()
}