Language
日本語
English

Caution

JavaScript is disabled in your browser.
This site uses JavaScript for features such as search.
For the best experience, please enable JavaScript before browsing this site.

CSS Dictionary

  1. Home
  2. CSS Dictionary
  3. [CSS Selector] E:enabled

[CSS Selector] E:enabled

Using selector:enabled, you can apply styles to elements in an enabled state. This is commonly called a "UI state pseudo-class." It does not work in IE8 or earlier. An enabled state refers to an element that does not have the disabled attribute. Note that there is no enabled attribute — to enable a disabled element, remove the disabled attribute entirely.

Sample Code

input:enabled { color: blue;} /* Sets enabled input elements to blue text. */

Browser Preview

input:enabled { color: blue;} /* Sets enabled input elements to blue text. */

<input type="button" value="This is a button.">
<input type="button" value="This button is disabled." disabled>

Browser Compatibility

Chrome Chrome
1+
Firefox Firefox
1+
Safari Safari
3.1+
2 or earlier ×
Edge Edge
12+
Supported in all versions
IE IE
11
10
9
8 ×
7 ×
6 ×
Opera Opera
9+
8 or earlier ×
iOS Safari iOS Safari
2+
1 or earlier ×
Android Android Browser
2+
Chrome Android Chrome Android
Latest
Same support as desktop version
Firefox Android Firefox Android
Latest
Same support as desktop version

※ Version data based on MDN.

If you find any errors or copyright issues, please .