<!DOCTYPE html>
<html lang="en-US">
<head>
<style>
input:read-only{
background-color: red;
color: #fff;
}
</style>
</head>
<body>
<h1>CSS :read-only Selector</h1>
<input type="text" value="Adam Joe" readonly>
<input type="email" value="joe@gmail.com">
</body>
</html>