Tryit Editor v1.8

Source Code:
<!DOCTYPE html> <html> <head> <style> input:focus { background-color:yellow; } </style> </head> <body> <form action="form_action.asp" method="get"> First name: <input type="text" name="fname" /><br> Last name: <input type="text" name="lname" /><br> <input type="submit" value="Submit" /> </form> <p><b>Note:</b> IE8 supports the :focus pseudo-class only if a !DOCTYPE is specified.</p> </body> </html>
Result:
W3Schools.com - Try it yourself