how to automatically center header in html code example Example: how to center a html header h1{text-align: center;}