/* 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;
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;
}
.p{
text-align:center;
}
<div class="p">
<p style="text-align:center">HELLO</p>
</div>
text-align:inherit;
Code Example |
---|
Css :: bootstrap cheat sheet |
Css :: list decoration none |
Css :: put gradient color over background image |
Css :: remove box around button when clicked |
Css :: css selector not empty input |
Css :: border bottom under text only |
Css :: uninstall tinyproxy ubuntu |
Css :: how to add a vertical line in html |
Css :: rotate in 3d css |
Css :: what are types of positioning in css |
Css :: calendar api |
Css :: css hsla |
Css :: css selector color |
Css :: remove contact form 7 css |
Css :: what does align items center do |
Css :: bootstrap modal resize with jquery |
Css :: css border gradient |
Css :: select odd child css |
Css :: css overflow-y |
Css :: how select two nt child with css |
Css :: padding css |
Css :: Media Query Smartphone Portrait |
Css :: css disabled tag hover style |
Css :: css button click animation |
Css :: css margin top responsive |
Css :: fixed table header css |
Css :: does boxshadow work |
Css :: remove materialize style input |
Css :: login page design html css |
Css :: materialize css |