From Web Education Community Group
< CSS‎ | Selectors
Revision as of 18:51, 21 November 2011 by Rworth (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Pseudo-classes :focus

The :focus pseudo-class applies while an element has the focus (accepts keyboard or mouse events, or other forms of input).


a:focus{ properties }

Point, Note

  • There may be document language or implementation specific limits on which elements can become :active or acquire :focus.



   background-color: yellow;


  Phone: <input type="tel"><br>
  E-mail: <input type="email" disabled="disabled">

Css3 selectors dyn focus.png

CSS defines the :focus pseudo-class in The user action pseudo-classes :hover, :active, and :focus.