0% found this document useful (0 votes)
7 views

CSS Properties

The document discusses CSS properties including color, background-color, font styles, text styles, borders, padding, and margins. It provides examples of how to specify colors and values for these properties to style HTML elements.

Uploaded by

adhamelthn
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 views

CSS Properties

The document discusses CSS properties including color, background-color, font styles, text styles, borders, padding, and margins. It provides examples of how to specify colors and values for these properties to style HTML elements.

Uploaded by

adhamelthn
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/ 15

CSS Properties

Color Properties
We have two color properties: color and background-color
1. The color property specifies the color of an element’s text.

2. The background-color property specifies the background


color of an element.

• color name—for example, red

• RGB value—specifies amounts of red, green, and blue

• RGBA value—specifies red, green, and blue, plus amount of


opacity
RGB Values for Color

Each percent value must be between 0% and 100%.


We’ll learn about the font-style, font-variant, font-weight, font-size, font-
family, and font shorthand properties.
We talk about text-align, textdecoration, text-transform, and text-indent
• As expected, the border properties allow you to specify the appearance of borders that
surround elements.
• we’ll describe the border-style, border-width, and border-color properties.
• The border-color property specifies the color of the border that surrounds
the matched element.
• There’s no new syntax to learn for the border-color property because it uses
the same values as the color property and the background-color property.
Element Box, padding Property, margin Property

• The padding property specifies the


width of the area on the interior of an
element’s border.
• The margin property specifies the
width of the area on the exterior of an
element’s border.

• You can use multiple values with one


margin property. Or you can use
separate margin side properties
margin-top, margin-right, margin-
bottom, and margin-left
CSS Example
http://www.w3schools.com/css/demo_default.htm

Students: Open this Example and see how different styles totally
changes the display and layout of a HTML page

You might also like