CSS :read-write

The CSS :read-write pseudo-class is used when we need to apply styles to all FORM ELEMENTs, that haven't DISABLED and/or READONLY attribute(s). For example:

HTML with CSS Code
<!DOCTYPE html>
      input:read-write {background-color: teal; color: white;}

      Username: <input type="text"><br/><br/>
      Password: <input type="password"><br/><br/>
      Email ID: <input type="email" disabled><br/><br/>
      Country: <input readonly value="Netherlands">


Email ID:


Note - FORM ELEMENTs with DISABLED or READONLY attribute are not writable.

Note - FORM ELEMENT with READONLY attribute looks like writable.

CSS Online Test

« Previous Tutorial Next Tutorial »

Follow/Like Us on Facebook

Subscribe Us on YouTube