If they exist in programming),
If I have an HTML form with the following inputs:
input[type='text'], input[type='password'] { // my css }
That is the correct way to do it. Sadly CSS is not a programming language.