CSS :disabled Selector

HTML Code

<!DOCTYPE html>
<html>
<head>
<style>
input[type=text]:enabled {
background: #ffff00;
}

input[type=text]:disabled {
background: #dddddd;
}
</style>
</head>
<body>

<form action=””>
First name: <input type=”text” value=”Mickey”><br>
Last name: <input type=”text” value=”Mouse”><br>
Country: <input type=”text” disabled=”disabled” value=”Disneyland”>
</form>

</body>
</html>

HTML View

First name:
Last name:
Country:

If you want to join my online or offline graphic designing course than just call me - 9334029817

Related Posts

Leave a Reply

Open chat