CSS :read-write Selector

❮ Previous Selectors Next ❯


p:read-write {
  background-color: yellow;


The :read-write selector selects an element that is editable by the user.

See readonly and contenteditable attributes.

One use of readonly form controls is to allow the user to check and verify information that they may have entered in an earlier form (for example, shipping details), while still being able to submit the information along with the rest of the form. We do just this in the example below.

The :read-only pseudo-class is used to remove all the styling that makes the inputs look like clickable fields, making them look more like read-only paragraphs.

The :read-write pseudo-class on the other hand is used to provide some nicer styling to the editable <textarea>.

Version: CSS3

Standard Syntax

:read-write {
  css declarations;

Browser Support

The numbers in the table specify the first browser version that fully supports the property.


❮ Previous Selectors Next ❯