First Assignment Css Tags
First Assignment Css Tags
CSS TAGS
About CSS
CSS stands for Cascading Style Sheets..Its base how to display HTML codes.
Three ways to implement CSS in your web files
Colors:
Colors we use in the css for text, background and other areas
Name
# Code
RGB
Name : if use through name we just type the color name e.g. color:
red; the red color show
# Code: if use through # sign and code the color will appear. e.g.
color:#00ff00;
{font-weight:normal;}
{font-weight:bold;}
{font-weight:500;}
Font-variant: Small-caps
Upper-caps
{
font-variant:small-caps;
}
Font-color:
Body
{
color:red;
}
h1
{
color:#00ff00;
}
p
{
color:rgb(0,0,255);
}
Text:
Text-align: Left
Right
Centre
Justify
{
text-align:justify;
}
Text Transform: upper case
Lowercase
Capitalize
Text-indent: 15
Text-decoration: underline
Over line
Line –through
Blink
None
h1 {text-decoration:overline}
h2 {text-decoration:line-through}
p {text-decoration:underline}
Background-color:
body
{
background-color:yellow;
}
Background-image:
body
{
background-image:url('abc.gif');
}
background-position:center;
background-attachment:fixed;
}
Tables
Background
Height
Width
Max-width:400px
Min-width:300 %
Min-height:10 x
Max-height:300px
Borders
Width { border-width:15px;}
Color {border-color:#ff0000 #00ffff;}
Styles: Set the style of the borders:
none
hidden
dotted
dashed
solid
double
groove
ridge
inset
outset
p
{
border-style:solid;
}
Border-collapse: Collapse
Separate
table
{
border-collapse:collapse;
}
Border-spacing: { border-spacing:10px 50px }
Empty-cells: Show
Hide
table
{
border-collapse:separate;
empty-cells:hide;
}
Padding:
p
{
padding:10x 5x 10x 5x;
}
Right
Left
None
img
{
float:right;
}
Cursor:
{cursor:blink}
Default
Pointer hand show
Text I show
Wait {cursor:wait}
url( )
Page-break-before: Auto
Always
Avoid
Position: absolute
Relative
H1
{
position:absolute;
left:100px;
top:150px;
}
List:
List-style-type
None
Disk
Circle
Square
List-style-position
List-style-image inside
outside
ul
{
list-style:square url("abc.gif") inside;
}