SitePoint
Reference
CSS
Selector Reference
Pseudo-classes
:focus
CSS Live Demo: :focus
(this page)
See also:
All Live Demos
CSS Live Demo: :focus
Type your
CSS
here:
(any properties allowed except expression, behavior and @import)
a:focus { color:#cccccc; }
Type your
HTML
here:
(any tags allowed except script, iframe, frame, object, img and embed)
<ul> <li><a href="http://www.sitepoint.com/">www.sitepoint.com</a></li> <li><a href="http://www.bbc.co.uk/">www.bbc.co.uk</a></li> <li><a href="http://www.news.com.au/">www.news.com.au</a></li> </ul> <p> The <code>:hover</code> pseudo-class will apply to elements in their focus state (<abbr title="for example">eg.</abbr> when tabbing between them with the keyboard). </p>
Show me!
Your results appear here: