<!DOCTYPE HTML> <html> <body> <div style="width:250px; height:200px; border:10px solid red; padding:5px"> <div id="input" contenteditable="true" style="height:200px; outline:none"></div> </div> <script> window.focus(); document.getElementById("input").focus(); </script> </body> </html>