center a paragraph code example
Example 1: center p html
<p style="text-align: center">this is centered</p>
Example 2: header center
div {
width: 100%;
height: 200px;
display: flex;
justify-content: center;
align-items: center;
background: blue;
}
text {
background: orange;
}
<div>
<text>Centered horizontally and vertically</text>
</div>