Advantages
of using Cascading Style Sheet:-
- It saves time.
- When we use HTML to provide effects and feel we use the tags again and again in same page. This leads to duplication on larger scale.
- With help of CSS you will only have to specify the details once for any element.
- Since the CSS file can be called externally it helps to load the page faster.
- Less code helps to load the page faster.
- It helps us to make changes to code in easy manner.
- It adds superior style to HTML.
- CSS has much wider array of attributes than HTML.
Syntax:
- Selector { declaration : value; }
- example: h1 { font size:18px; }
- Selector can be body, h1 – h6 , p, b, ul, ol, li, table, tr, td etc.
- Each declaration consist of property and a value.
No comments:
Post a Comment