CSS Text | css text align
CSShasalotofpropertiesforformattingtext.Thistextisstyledwithsomeofthetextformattingproperties.Theheadingusesthetext-align,text-transform,andcolorproperties.Theparagraphisindented,aligned,andthespacebetweencharactersisspecified.Theunderlineisremovedfromthiscolored"TryitYourself"[1]link.TryitYourself»[2]TextColorThecolorpropertyisusedtosetthecolorofthetext.Thecolorisspecifiedby:acolorname-like"red"aHEXvalue-like"#ff0000"anRGBvalue-like"rgb(255,0,0)"LookatCSSColorValues[3]foracompletelistofposs...
CSS has a lot of properties for formatting text.
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 this colored "Try it Yourself"[1] link.
Try it Yourself »[2] Text ColorThe color property is used to set the color of the text. The color is specified by:
a color name - like "red" a HEX value - like "#ff0000" an RGB value - like "rgb(255,0,0)"Look at CSS Color Values[3] for a complete list of possible color values.
The default text color for a page is defined in the body selector.
Text Color and Background ColorIn this example, we define both the background-color property and the color property:
Example body { background-color: lightgrey; color: blue;}h1 { background-color: black; color: white;}
div { b...