<!DOCTYPE html> <html> <head> <style> div { margin: 0; padding: 10px; font-size: 40px; height: 100px; width: 100px; border: 1px solid red; outline: none; } </style> </head> <body onload="document.getElementById('i').focus()"> <div contenteditable id="i"></div> </body> </html>