A demonstration of the :read-only selector.

A normal input element:

A readonly input element:

The :read-only selector selects form elements with a "readonly" attribute.

Note: The :read-only selector is not supported in Internet Explorer.

Note: Firefox supports an alternative, the :-moz-read-only property.