/* 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;
body {
text-align: right;
}
h1 {
text-align: center;
}
h2 {
text-align: left;
}
h3 {
text-align: right;
}
p{
text-align:center;/*values: center, left, right, etc...*/
}
The different values of text-align are -
1) text-align: justify; (spreads throughout to the left and right)
2) text-align: center; (centers the text)
3) text-align: left; (the default value, shifts the text to left side)
4) text-align: right; (shifts the text to right side)
td {
text-align: center;
}
body {
text-align: left;
}
.p{
text-align:center;
}
<div class="p">
<p style="text-align:center">HELLO</p>
</div>
Code Example |
---|
Css :: in flex-wrap remove last item margin for every row |
Css :: general sibling selector |
Css :: jquery css unset(remove) certain style |
Css :: backdrop filter all properties |
Css :: style button for safari |
Css :: neomorphic box |
Css :: wordpress how to change logo on a certain page with css |
Css :: how to put a circle in input |
Css :: htaccess file extension |
Css :: single product page woocommerce css |
Css :: line icon cdn |
Css :: css print |
Css :: angular css animation |
Css :: card with css grid |
Css :: css after on hover |
Css :: font color css |
Css :: scss global class |
Css :: how to back animation in css |
Css :: css border |
Css :: css break text no whitespace |
Css :: change color select arrow css cf7 |
Css :: Sass @mixin and @include |
Css :: css box |
Css :: safari version 10+ media query |
Css :: css flex alle elemente gleiche höhe |
Css :: indexes vs foreign key |
Css :: wordpress classic editor on post type |
Css :: highchart add font family |
Css :: fade div |
Css :: css ein bisschen durchsichtig |