center align html code example
Example 1: css center image
.center {
display: block;
margin-left: auto;
margin-right: auto;
}
Example 2: how to center text in html
text-align: center;
Example 3: centering in html
<style>
element
{
text-align: center;
}
</style>
-------------------------------------------------------------------------------
style.css
element
{
text-align: center;
}
Example 4: css text align center
body {
text-align: center;
}
Example 5: align centre
.headerTwoDiv{
margin:1% auto;
margin-right: auto; margin-left: auto; width: 21%;
padding-top: 11px;
}
Example 6: how to center text in html
<p><center>YourText</center></p>