Export (0) Print
Expand All

:active

Sets the style of an a element when the link is engaged or active.

Syntax

[a]:active { sRules }

Possible values

sRules

String that specifies one or more cascading style sheet (CSS) attribute/value pairs.

Remarks

The default value of the :active pseudo-class is browser-specific.

Active means that the user is navigating the link. The link has been activated, and some action is being performed but is not yet complete.

The :active pseudo-class is often used in conjunction with :hover, :link, and :visited, the pseudo-classes that affect the other states of a link.

Example

The following style rule uses the :active pseudo-class to set the font-weight and color attributes of an active link in a document:

<style>
    a:active {font-weight:bold; color:purple}
</style>

Standards information

This pseudo-class is defined in Cascading Style Sheets (CSS), Level 1 (CSS1) Ee371190.xtlink_newWindow(en-us,Expression.40).png.

Applies to

a, abbr, acronym, address, b, big, blockquote, body, caption, center, cite, code, col, colgroup, dd, dfn, dir, div, dl, dt, em, form, hn, html, i, img, input, input type=button, input type=checkbox, input type=file, input type=hidden, input type=image, input type=password, input type=radio, input type=reset, input type=submit, input type=text, kbd, label, legend, li, listing, marquee, menu, ol, p, plaintext, pre, s, samp, select, small, span, strike, strong, sub, sup, table, tbody, td, textarea, tfoot, th, thead, tr, tt, u, ul, var, xmp

See also

Send feedback about this topic to Microsoft. © 2011 Microsoft Corporation. All rights reserved.

Community Additions

ADD
Show:
© 2014 Microsoft