<html> <head> <style type="text/css"> input { color: white; background-color: green; } </style> </head> <body onload="document.getElementById('i').select();"> <input value="text" id="i"> </body> </html>