The target and focus pseudo classes in CSS3 are all selectors for specific elements and can be used to highlight the position of elements.
Target pseudo class
The target pseudo class is used to change the style of the ID pointed to by the anchor URL. For example, if you want to change the font of any element accessed through the anchor link in the page to red, you can write*: Target {color: red}.
Note that you must specify an id for this element before adding the target style. The following DEMO shows the effect.
<Html>
Tip: the code can be modified before running!
Focus pseudo-class
The focus pseudo class is used to change the style of the input, textarea, and other labels when obtaining the focus. When a large number of forms are displayed in front of a user, using the focus pseudo class makes it easier to find the focus. For the effect, see the DEMO below.
<Html lang = "en" xmlns =" http://www.w3.org/1999/xhtml "Xml: lang =" en ">
Tip: the code can be modified before running!
Link: http://blog.imbolo.com/css3-target-and-focus-pseudo-class/