Creating Style
Creating Css Style
Css Style create करना बहुत ही आसान है इसे लिए हमे css के syntax को follow करना पडता है syntax उन Rules को define करते है जिसका use Programming Language मे Statement का structure या Order define करने मे किया जाता है साथ ही यह, यह भी specify करता है की statement और expressions को बनाने के लिए words और symbol को एक साथ कैसे रखा जाए। css syntax दो different parts मे divide रहता है।
Css Style create करना बहुत ही आसान है इसे लिए हमे css के syntax को follow करना पडता है syntax उन Rules को define करते है जिसका use Programming Language मे Statement का structure या Order define करने मे किया जाता है साथ ही यह, यह भी specify करता है की statement और expressions को बनाने के लिए words और symbol को एक साथ कैसे रखा जाए। css syntax दो different parts मे divide रहता है।
1.Selector
2.Declaration
2.Declaration
Selector - Selector उस html element(body,div, ol, h1 etc) को define करता है जिस पर css Style को apply करना है
Declaration - declaration css properties और साथ ही साथ उस Properties की value को Contain करके रखता है
Syntax
Selector
{
Declaration 1;
Declaration 2;
.
.
.
.
Declaration N
}
{
Declaration 1;
Declaration 2;
.
.
.
.
Declaration N
}
इसे हम और अच्छी तरह से इस प्रकार समझ सकते है
Selector {
1st property:value;
1st property:value;
1st property:value;
.
.
.
.
Nth Property:value
1st property:value;
1st property:value;
1st property:value;
.
.
.
.
Nth Property:value
}
Ex
H1
{
Color:blue;
Font-size:12px;
}
{
Color:blue;
Font-size:12px;
}
![]() |
| Css Statement with Explanation |
यहा h1 एक selector है जो एक html element है जिस पर css style apply करनी है { } एक declaration block है तथा color:blue और font-size:12px declaration है जिसमे color और font-size Properties और blue व 12px इन prperties की value है इस Statement का मतलब है की h1 element पर जो की html मे heading को define करने की लिए उस किया जाता है पर css का use कर color व font-size Properties को set किया गया है अतः h1 heading html document मे जहा भी होगी उसका text color blue और font-size 12 px होगी।

Comments
Post a Comment