"CSS"
CSS stands for “Cascading Style Sheet”. CSS is used to separate the design and structural part of a website so that it is easily modified and reused. CSS is developed by W3C and it is a recommendation to use for the web-based application.
Advantage of CSS
- It provides the separation from structure and presentation of the website, which is easy for the web-designing.
- It also provides new different properties for designing, which is not present in HTML.
- CSS provides the reusability of codewithout writing again & again.
- When we design the website with the help of CSS then it is easy and fast to design.
Type of CSS
There are three types of CSS -
- Tag based (tag)
- Id based (#)
- Class based (.)
Syntax :-
Name /Selector
{
Properties:value;
................................
................................
}
Different ways to insert CSS
There are mainly three ways to insert CSS in our code projects-
- Inline CSS ----> work as Private.
- Internal CSS -----> work as Protected.
- External CSS---> work as Public.
Note:- If we move bottom to top then security will increase & when we move top to bottom then visibility will be increased.
Inline CSS :
eg :- <p style = “property1:value1; property2:value2; .......”>
Internal CSS :
eg :-
id /class/tag name
{
property :value;
...............................
...............................
}
External CSS:
eg :- <link rel=“stylesheet” type=“text/CSS” href=“myStyle.css”>
"Thanks!!! for Reading"