CSS Syntax in Hindi

CSS in Hindi – CSS Syntax in Hindi

CSS

CSS Syntax in Hindi :- CSS ka Syntax Ye Selector Or Uske Declaration ke sath Hota Hai | Selector Ye HTML ka element name , class name ya id name ho Sakta hai | Or Delaration Mai CSS Properties or unki values hoti hai |

  • What is CSS Syntax In Hindi
  • CSS Syntax In Hindi
  • Different Types of CSS in Hindi
  • CSS Basic Tags With Example in Hindi

Also Read :- HTML Course In Hindi

CSS Syntax in Hindi

Syntax1 for CSS

<strong> selector{ property : value; } </strong>

Simple Example for CSS Syntax

Example par single css property ke liye single value di gayi hai| single value ye sabhi css properties ke liye hoti hai |

CSS Syntax in Hindi

Simple Example for CSS Syntax 2

CSS Syntax in Hindi

CSS Syntax ko Style Rule bhi Kahte Hai. Style Rule 2 types ke hote hai. Aap Inte Upper Image Mai Dekh Sakte Hai |

  1. Selector – Ek Selector Vah Word ya character hota hai Jiske Liye ‘Style Rule’ Ko Likha Jata Hai | Ise Ham ‘Curly Bracket’ ke Bahar Likhte hai. Yah Jyadar ‘HTML Tag’ hi hota hai. lekin Ise koi bhi name dekar likha ja sakta hai |
  2. Declaration – Declaration Style Rule Ka Vah Part Hota Hai Jisme Kisi Selector ke liye Style ki Value Or Property Set ki Jati Hai | Iske Bhi 2 Part hote Hai |
    1. Property – Property Style Rule Ka Vah Part Hai Jo Style Ham Kisi ‘Selector’ par lagu karna Chahte Hai. Yah ‘Curly Bracket’ ke under likhi Hoti Hai. Ise Ham HTML Tag ka Attribute Man Sakte Hai |
    1. Value – Style Rule Ka Tisra Part Value Hota Hai. Ise Bhi ‘Curly Bracket’ ke Under likha Jata Hai. Isme Property ke liye value set ki jati hai |
p {
  color: blue;
  text-align: center;
}

Upper Diye Example Mai Hamne HTML ParaGraph Ke liye CSS Rule Ko Declare kiya Hai. Jisme p jo ek HTML Element Hota Hai, Yha Selector Hai. Iske bad Curley Bracket ke under Declaration likha Gaya Hai. Declaration Mai Sabse Pahle Property Color Set Ki Gayi Hai. Or Is Property ki value blue likhi Gayi Hai. Property ki Value ko Colon (:) duvara Alag kiya jata hai |

Iske Bad Ek Or Declaration Likhi Gayi Hai. Jisme Semicolon (:) Duvara Alag Kiya Jata Hai. Is Declaration Ko Bhi p Selector ke liye likha Gaya Hai. Jisme Property text-align hai, or iski value center set ki gayi hai |

Different Types of CSS in Hindi

CSS Likhe Ke 3 Alag- Alg Tarike Hai, Ham Inme se koi bhi Tarika Istemal Kar Sakte Hai |

  1. Inline CSS.
  2. Internal CSS.
  3. External CSS.

1. Inline Css

Inline Css Ka Istemal Ham HTML Elements Ko Ek Ek Karke Unique Style Mai Change Kiya Hai | Insline Css Ka Istemal Style Attribute Mai Bhi Kiya Hai | Iska Example ke Liye Ham <p> Element Ko lete Hai |

<p style="color:blue">Paragraph ka color change ho Gya Hai </p>

Aap Upper Diye Gaye Program Ko Run Karke Dekh Sakte Hai Or Isme Hamne <p style= “color:red”> Paragraph ka color change ho Gya Hai </p>

Is example Mai Aap Dekh Sakte Ho Ki p elements Mai Hamne style attribute Ko Red color diya Hai Jiski Vajah Se Yah red Dikhai De Rha Hai |

2. Internal CSS.

Is Example Mai CSs Kisi HTML Page Mai Hi Likhte Hai Jiska Effect Bhi Keval Usi Page Par Padta Hai | Is Tarike Mai CSS style Tags Ke Under Likhe Hai | And Style Tags Head Tags ke Under Hi Rahte Hai|

NOTE :- Yaha Par Hamne #box Ka Istemal Kiya Hai |Hamne Div Ko Ek id di Hai.“box”,or Ham us Div ko uski id ke aadhar par hi properties de rahe hai |jab Ham Kisi Element ko uski id ke aadhar par select Karte Hai to ID ke Pahle # ka Istemal Karte Hai | Or Jab Ham Kisi Element ko Uski Class Ke Aadhar Par Select Karte Hai to Class ke Pahle (.) dot ka istemal Karte Hai | Ise Ham ID Selector Kahte Hai |

Example:

<!DOCTYPE html>
<html>
	<head>
          <style>
			#box{
              color :red;
              background-color:blue;
            }
          </style>
 		 <title> Internal Css </title>
     </head>

    <body>
		<div id="box">
          <h1> This is Internal Css Heading </h1>
      </div>
    </body>
</html>

Aap Upper Diye Gaye Program Ko Run Karke Dekh Sakte Hai | Or Iska OutPut Check Kar Sakte Hai |

External CSS.

HTML Mai External CSS ka IStemal Bahut Se HTML page Ke Style Ko Ek Sath Banane Ke liye Karte Hai | External Style Sheet Ko Istemal Karne Liye Aapko HTML PAGE ke Head Mai File Link Karni Hogi |

Example:

<!DOCTYPE html>

<html>
    <head>

        <link rel="stylesheet" type="text/css" href="style.css">

        <title> External CSS</title>

    </head>
<body>

<h2> THIS IS AN EXAMPLE</h2> 
<p>This Paragraph Color Will Change</p>

</body>

</html>
body{ background-color: blue;}
h1{ color: red;}
p{ color: orange;}

Body Ke Backgruond Color Ko Change Kiya Hai | Background ka New Color Blue Ho Jayega | Usi Tarah Se Hamne H1 ko Red Color Diya Hai | Or End Mai Paragraph Ko Orange color Diye Hai |

Internal Or External Stlye sheet Mai Keval Difference inta hai Ki Yah Dusri File Mai Save Hoti hai | External FIle Ko html ke Sath Link Karna padta Hai |

Ab Aap Jan Hi Gaye Honge Ki What is CSS Syntax In Hindi , CSS Syntax In Hindi , Different Types of CSS in Hindi , Kon Kon Se Hai |

Leave a Reply

Your email address will not be published. Required fields are marked *