We would like to know how to change text color when focused.
<!DOCTYPE html>
<html>
<head>
<style type='text/css'>
.home:focus {<!-- ww w. jav a 2s .co m-->
color: red;
}
</style>
</head>
<body>
<input type="text" class="home" value="google.com" />
</body>
</html>
The code above is rendered as follows: