The text-align property controls horizontal alignment of text inside a block:
left (default)centerrightjustify (stretches text to fill the line)p {
text-align: center;
}Use text-decoration to underline, overline, strike-through, or remove decoration from text.
a {
text-decoration: none;
}Use text-transform to control capitalization:
uppercaselowercasecapitalize (first letter of each word)h1 {
text-transform: uppercase;
}letter-spacing adjusts space between characters. word-spacing adjusts space between words.
h2 {
letter-spacing: 2px;
word-spacing: 5px;
}Use text-indent to indent the first line of a paragraph:
p {
text-indent: 30px;
}Apply text formatting to two elements:
<h1 style="text-align: center; text-transform: uppercase; text-decoration: underline;">
Welcome
</h1>
<p style="text-indent: 20px; letter-spacing: 3px;">
This paragraph is indented and has increased spacing between letters.
</p>Ask the AI if you need help understanding or want to dive deeper in any topic