for parent block or body  – text-align:center;  for centerd block- display:inline-block; <style> body{text-align:center} .center{display:inline-block;background:red} </style> <div class="center"> <p contenteditable="true">write text</p>… Read More