#para1 {
text-align: center;
color: red;
}
/* To center text, you need to use text-align. */
.centerText {
text-align: center; /* This puts the text into the center of the
screen. */
}
/* There are also other things that you can use in text-align:
left, right, and justify. Left and right make the test align to the
right or left of the screen, while justify makes the text align both
sides by spreading out spaces between some words and squishing others. */
/* Keyword values */
text-align: start;
text-align: end;
text-align: left;
text-align: right;
text-align: center;
text-align: justify;
text-align: justify-all;
text-align: match-parent;
/* Character-based alignment in a table column */
text-align: ".";
text-align: "." center;
/* Block alignment values (Non-standard syntax) */
text-align: -moz-center;
text-align: -webkit-center;
/* Global values */
text-align: inherit;
text-align: initial;
text-align: revert;
text-align: revert-layer;
text-align: unset;
.class {
text-align: center;
}
/* Character-based alignment in a table column */
text-align: center;
/* The inline contents are centered within the line box. */
body {
text-align: center;
}
.center-text {text-align: center}