We all know that CSS stands for cascading style sheets. Styles define how to display HTML elements and Styles were added to HTML 4.0 to solve a problem and External Style sheets can save a lot of work. At last External style Sheets are stored in CSS file.
CSS Syntax: A CSS rule has two main parts: a selector, and one or more declarations.
H1 {color:blue; font-size:12px;}
CSS example: p{color:red;text-align:center;}
CSS comments: comments are used to explain your code and may help you when you edit the source code at a later date. Comments are ignored by browsers. A CSS comment begins with”/*”, and ends with”*/”, like this:
/*This is a comment*/
P
{
Text-align:center;
/* This is another comment*/
Color:black;
font-family:arial;
}
No comments:
Post a Comment