Css selectors You've now learned about three kind of css selectors: ​type​



Download 78,61 Kb.
Pdf ko'rish
Sana29.12.2021
Hajmi78,61 Kb.
#82586
Bog'liq
ipnd-reference-sheet-css-selectors



 

 

CSS Selectors



 

You've now learned about three kind of CSS selectors: ​type​, ​class​

and ​ID​

 

 



 



Type​ selectors are used to apply a style to a particular type of HTML element, like ​

h1​

 or 


body​

.  


Type selectors are written using just the type name. 

 



Class​ selectors are used to set the style for multiple HTML elements that have a particular 

value for the ​

class​


 attribute.  

You can name a class anything you want! Class selectors are written with a dot before the 

class: for elements such as ​

, the class selector is ​



.blue​

 





ID​ selectors are used when the style is being applied to one HTML element, which has to 

have an ​

id​

 attribute.  



There can be only ​one ​element with a particular ​

id​


 on a page. You can also choose any name 

you want for an ​

id​

, just like a​



 ​class​

. ID selectors are written using a ​

#​

 sign: for an element 



such as ​

, the ​


id​

 selector is ​

#sidebar​

.

 



 

version 1.0



 

Download 78,61 Kb.

Do'stlaringiz bilan baham:




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©hozir.org 2024
ma'muriyatiga murojaat qiling

kiriting | ro'yxatdan o'tish
    Bosh sahifa
юртда тантана
Боғда битган
Бугун юртда
Эшитганлар жилманглар
Эшитмадим деманглар
битган бодомлар
Yangiariq tumani
qitish marakazi
Raqamli texnologiyalar
ilishida muhokamadan
tasdiqqa tavsiya
tavsiya etilgan
iqtisodiyot kafedrasi
steiermarkischen landesregierung
asarlaringizni yuboring
o'zingizning asarlaringizni
Iltimos faqat
faqat o'zingizning
steierm rkischen
landesregierung fachabteilung
rkischen landesregierung
hamshira loyihasi
loyihasi mavsum
faolyatining oqibatlari
asosiy adabiyotlar
fakulteti ahborot
ahborot havfsizligi
havfsizligi kafedrasi
fanidan bo’yicha
fakulteti iqtisodiyot
boshqaruv fakulteti
chiqarishda boshqaruv
ishlab chiqarishda
iqtisodiyot fakultet
multiservis tarmoqlari
fanidan asosiy
Uzbek fanidan
mavzulari potok
asosidagi multiservis
'aliyyil a'ziym
billahil 'aliyyil
illaa billahil
quvvata illaa
falah' deganida
Kompyuter savodxonligi
bo’yicha mustaqil
'alal falah'
Hayya 'alal
'alas soloh
Hayya 'alas
mavsum boyicha


yuklab olish