HTML Text Center Alignment

First of all, check the HTML element type. If the HTML element is block level then apply CSS margin: auto property to align horizontal center while aligning HTML inline element to center, then change display property from inline to block and then apply margin: auto property.