CSS3-STYLING
CSS3-STYLING
f
ff
ff
Formatting With CSS Properties
CSS Background Colour
Text Color
• The color property is used to set the color of text.
• EXAMPLE:
body{ color:blue;}
f
Formatting With CSS Properties
Text Decoration
• You can use text-decoration property to set or remove decorations from
text.
• EXAMPLE:
p{ text-decoration:underline;}
h1{ text-decoration:none;}
Text Transformation
• This property is used to specify lower and uppercase letters of any text.
• EXAMPLE:
h1{ text-transform:uppercase;}
Formatting With CSS Properties
CSS Font
CSS font properties are used to de ine the font family, size, style and
boldness of the text.In CSS there are 2 types of font family names:
1. generic family - a group of font families with a similar look (like “Serif” or
“Monospace”).
2. font family - a speci ic font (like”Times New Roman” or ”Arial”).
•EXAMPLE:
h1{
font-size: 30px;
}
P{font-size: 15px;
}
Formatting With CSS Properties
CSS Font Size (Relative size)
•You may face resizing problems, when you use older versions of
browsers.
•To avoid such problems, you can use font size using em instead of pixels.
•The em size unit is a W3C recommendation. 1 em is equal to the current
font size.If the default font size is 14px then size of 1 em is 14px.
•EXAMPLE:
h1{
font-size: 1.875em;/*30px/16=1.875em*/
}
Formatting With CSS Properties
CSS Links
•You can use CSS styles to style any link.
•Links can be styled in different ways by using any CSS property like color,
font-family etc.
•Links can be in one of the following states:
1. a: link - Unvisited link
2. a: visited - A link that user has visited
3. a: hover - A link over which the mouse pointer is moving
4. a: active - A link which has been just clicked
Formatting With CSS Properties
CSS Lists
You can use CSS list properties for:
1. Setting different list item markers for ordered lists.
2. Setting different list item markers for unordered lists.
3. Set an image as the list item marker.
Values:
• list-style-type
• list-style-image
Formatting With CSS Properties
CSS Tables
Tables are used to organize data that is too detailed or complicated to be
described adequately in the text.
Table Borders
table, th, td {
border: 1px solid;
}
Formatting With CSS Properties
CSS Tables
Command Width Tables
table {
width: 100%;
}
Formatting With CSS Properties
CSS Tables
Collapse Table Borders
table {
border-collapse:
collapse;
}
Formatting With CSS Properties
CSS Tables
td {
text-align: center;
}
Formatting With CSS Properties
CSS Tables
Vertical Table Alignment
td {
vertical-align: bottom;
}
THANK YOU