how to center paragraph in html code example

Example 1: center p html

<p style="text-align: center">this is centered</p>

Example 2: html how to center text

<p style="text-align:center;">Centered paragraph.</p>

Example 3: how to center text in html

text-align: center;

Example 4: centering in html

<style>
  element
  {
    text-align: center;
  }
</style>
-------------------------------------------------------------------------------
style.css
element
{
	text-align: center;
}

Example 5: how to center text in html

<p><center>YourText</center></p>

Tags:

Css Example