0% found this document useful (0 votes)
7 views1 page

CSS Fonts Text Color Properties

The document provides an overview of CSS font, text, and color properties, detailing their descriptions and examples. It includes properties for font styling such as font-family, font-size, and font-weight, as well as text alignment and decoration options. Additionally, it covers color properties including text color, background color, and opacity settings.

Uploaded by

ddhhoonnii7781
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views1 page

CSS Fonts Text Color Properties

The document provides an overview of CSS font, text, and color properties, detailing their descriptions and examples. It includes properties for font styling such as font-family, font-size, and font-weight, as well as text alignment and decoration options. Additionally, it covers color properties including text color, background color, and opacity settings.

Uploaded by

ddhhoonnii7781
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

CSS Fonts, Text & Color Properties

CSS Font Properties

Property Description Example

font-family Sets the font of the text font-family: Arial, sans-serif;

font-size Sets the size of the font font-size: 16px;

font-style Sets font style (italic, normal, oblique) font-style: italic;

font-weight Sets thickness/boldness of font font-weight: bold; or 400

font-variant Displays small-caps font-variant: small-caps;

line-height Sets space between lines line-height: 1.5;

letter-spacing Spacing between characters letter-spacing: 2px;

word-spacing Space between words word-spacing: 10px;

font Combines several font properties font: italic 16px Arial;

CSS Text Properties

Property Description Example

color Sets the color of the text color: #333; or color: red;

text-align Aligns text (left, center, right, justify) text-align: center;

text-decoration Underline, overline, line-through, none text-decoration: underline;

text-transform Capitalizes or changes case text-transform: uppercase;

text-indent Indents the first line of a paragraph text-indent: 20px;

white-space Controls whitespace handling white-space: nowrap;

direction Text direction (ltr or rtl) direction: rtl;

text-shadow Adds shadow to text text-shadow: 2px 2px #888;

word-break Breaks long words word-break: break-word;

CSS Color Properties

Property Description Example

color Text color color: #000;

background-color Sets the background color background-color: yellow;

border-color Sets the color of borders border-color: red;

opacity Sets transparency (0 to 1) opacity: 0.7;

rgba() / hsla() Advanced color functions (with alpha) color: rgba(255,0,0,0.5);

You might also like