Syntax to use CSS
Syntax to use CSS
<STYLE type=”text/css”>
Tagname {
Property: value;
Property: value
}
</STYLE>
2) External CSS - Creating external CSS file by using saving with .CSS extension
Syntax:
In CSS file:
Tagname {
Property: value;
Property: value
}
In HTML file
<link rel="stylesheet" type="text/css" href="mystyle.css">
Font-family : fontname
Font-style : normal | italic | oblique
Font-weight : normal | bold
Font-size : x pt
Font-variant : normal | small-caps
CSS Display Property
Background-color : colorname
Background-image : url(path) e.g. → Background-image : url(“c:\\abc\\mypic.jpg”)
Background-repeat : repeat-x | repeat-y |no-repeat
Background-position : left | right | center top | center | bottom
Background-attachment : fixed | none
CSS Border Property
Border-color : colorname
Border : n px (n is any integer value)
Border-style : none | dotted | solid |dashed | double | groove | ridge | inset | outset
Border-radius : n px (n is any integer value)
Border-width : n px (n is any integer value)
CSS Margin Property (for outside space of content)