Tryit Editor v2.3

Edit This Code:
<!DOCTYPE html> <html> <head> <style> input:focus { background-color: yellow; } </style> </head> <body> <p>Click inside the text fields to see a yellow background:</p> <form> First name: <input type="text" name="firstname"><br> Last name: <input type="text" name="lastname"> </form> <p><b>Note:</b> For :focus to work in IE8, a DOCTYPE must be declared.</p> </body> <!-- Mirrored from www.w3schools.com/cssref/tryit.asp?filename=trycss_sel_focus by HTTrack Website Copier/3.x [XR&CO'2014], Fri, 23 Jan 2015 08:13:59 GMT --> </html>
Result:
Try it Yourself - © w3schools.com