Skip to main content

CSS - Selectors Are Case-insensitive in hindi

Selectors Are Case-insensitive

Selectors ये case-insensitive होते है | आप एक ही selector को uppercase और lowercase में अलग-अलग देते हो तो उनके styles को combine किया जाता है | जैसे कि निचे picture में दिया हुआ है |


Example

Example पर एक ही selector को lowercase और uppercase में दिया गया है | अगर दोनों case-insensitive selectors पर अलग-अलग Style दी जाती है तो उन्हें combine किया जाता है |
<style>
.myclass{
 color : red;
 background-color : blue;
}
.MYCLASS{
 font-weight : bold;
 font-style : italic;
}
</style>

<div class="myclass">Hello World</div><br />
<div class="MYCLASS">Hello World</div>

Example for Style Overwriting

CSS Style को Overwrite भी किया जाता है | Example पर lowercase selector(.myclass) पर color; red है और uppercase selector(.MYCLASS) पर color; blue दिया गया है | लेकिन HTML Element पर सबसे पासवाली style ही apply हो जाती है |
<style>
.myclass{
 color : red;
}
.MYCLASS{
 color : blue;
}
</style>

<div class="myclass">Hello World</div><br />
<div class="MYCLASS">Hello World</div>


Another Example for Style Overwriting

Example में Element पर paragraph element के साथ उसे class भी दिया गया है | ऐसी situation में HTML Element Selector से ज्यादा महत्व class selector को दिया जाता है |
Example पर paragraph element के सबसे नजदीक class attribute होने के कारण class selector की style को apply किया गया है |
<style>
.myclass{
 color : red;
p{
 color : blue;
}
</style>

<p class="myclass">Hello World</p>

Comments

Popular posts from this blog

Create a Website using HTML and CSS in Hindi With Source Codes

Create a Website using HTML and CSS in Hindi With Source Codes Welcome Developers, we will see how to create a website using HTML and CSS step by step in Hindi. The link is in Comment sections. In this Video, you will learn how to put everything you've learned so far about CSS into action—for your very first webpage. What you see now is going to look like your end result; I hope it inspires you to follow through with the whole project! You'll learn the components of this site and how it was put together, piece by piece. Also, website kaise banaye hindi me complete video. If you like this video please Like, Share with your friends and Don't forget to SUBSCRIBE my ThapaTechnical Channel :)

RSOS (Rajasthan State Open School) student and RBSE students big update , news in hindi

                  kya nhi honge promote / kya exam honge  rajasthan state open school and RBSE ke students ke lia bahut badi khabar aayi hai . promote hone ke chance hua kam . par ab bhi kosis karne par aap sabhi ko promote kiya ja sakta hai . per esi bich aap apni teyari bhi jaari rakhe taki aapke exam hone par bhi aap achhe nubers s paas ho sake. Thank You

ITI Employability Skills important question in hindi #Technical-INFo

                                                    Technical INFO 1. _________ संदर्भ प्रेषक तथा प्राप्तकर्ता को  मध्य पृष्ठभूमि की समानता को संदर्भित करता है  | ( a) भौतिक  (b ) सामाजिक (c ) सांस्कृतिक  ( d) समकालिकता ANS:- C   2. _______  विभिन्न पार्ट्स ऑफ़ स्पीच की फॉर्म्स को समझ लेने से ग्रामर सिखने का आधार तैयार हो जाता है   | ( a) पांच (b ) आठ (c ) सात  ( d) छ: ANS:- b   3.  आपको अपने साक्षात्कार के लिए कब आने की योजना बनानी चाहि ए  ? (a) 2  घंटे पहले (b) 1  घंटे पहले  (c) 30  मिनट पहले (d)  ठीक समय पर ANS:- C   4. WAN  का मतलब होता है    ? (a) Winning  And  Networking (b) Windows Access Network (c) Wide Access Network (d) Wide Area Network ANS:- d   5.  निम्नलिखित में से कौनसा एक एन्टी वायरस है    ? (a)  नॉर्...