Can I use any other words apart from the #Intro...for instance <div id=".example" > | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Can I use any other words apart from the #Intro...for instance <div id=".example" >

23rd Dec 2016, 11:54 PM
jherri
jherri - avatar
2 Answers
+ 1
#Intro selects a single element by its ID called Intro your second try will fail cause its the wrong syntax. if you wanna select all elements from type div with class example which your second try looked like, use following syntax : div .example {} and yes you can set an elements ID or class in a way you like e.g. test, try or abcdefg. But the way you set them is a topic of Html and not CSS
24th Dec 2016, 12:11 AM
Andreas K
Andreas K - avatar
+ 1
by the way.... dont write id=".example" the "." operator is used to identify classes in CSS
24th Dec 2016, 12:13 AM
Andreas K
Andreas K - avatar