HTML CSS PseudoClasses
Pseudo Classes are used to give elements different states. Syntax selector:pseudo-class {property:value;}
Pseudo Classes are frequently used with links to give them eye-catching states.
Here is an example of a link modified by a Pseudo Class
Go ahead and click it. It doesn't actually do anything.
Click to see the example.
:nth-child() Selector
The :nth-child() selector can be used to indicate a numbered element, odd or even, it can use a keyword, regardless of the element type.
Click to see the example.
:invalid and :valid selectors
:invalid and :valid selectors test the value of the input and react upon it without using Javascript.Click to see the example.
:required selector
The :required selector adds a special style to remind user of required input.Click to see the example.
There are a large number of other pseudo classes available, some of them are used to add special language marks for using languages other than English. There are Boolean selectors which will style elements which are NOT the manner prescribed. It is beyond the scope of this tutorial to do an exhaustive study of Pseudo Classes. If you are interested, I encourage you to study the additional resources and search on your own. Computers and technology is alwasy changing and new pseudo classes may develop in the future as well.
I hope you will join us for the next lesson Lesson 19) Classification
Additional Resources