This text is styled with some of the text formatting properties. The heading uses the text-align, text-transform, and color properties. The paragraph is indented, aligned, and the space between characters is specified. The underline is removed from the “Check the page” link.
color
property, which can be specified by:
"red"
,"rgb(255,0,0)"
, and"#ff0000"
.body
selector.
For example,
body { color:blue; } h1 { color:#00ff00; } h2 { color:rgb(255,0,0); }Text Alignment
text-align
property is used to set the horizontal alignment of a text.
Text can be centered, or aligned to the left or right, or justified.
When text-align
is set to “justify,” each line is stretched so that every line has equal width, and the left and right margins are straight.
For example,
h1 { text-align:center; } p.date { text-align:right; } p.main { text-align:justify; }Text Indentation
text-indent
property is used to specify the indentation of the first line of a text, for example,
p { text-indent:50px; }