0

Can i add more than two class in one tag for font-size,family,style ?if no than how to do that . ans fast😁

Css confusion

6th Jun 2019, 9:54 AM
Nav
5 Answers
+ 1
<!DOCTYPE html> <html> <head> <title>Example Classes</title> <style> .one { color:#f00; } .two { font-family: "Times New Roman", Times, serif; } .three { font-size: 30px; } .one, .two, .three{ margin:0; } </style> </head> <body> <p class="one tow three"> This is a text with 3 classes! All classes have margin 0. </p> </body> </html>
6th Jun 2019, 10:22 AM
Giorgos Mariettakis
Giorgos Mariettakis - avatar
+ 1
Yes you can add several classes to one tag but only one id
6th Jun 2019, 9:56 AM
Lexfuturorum
Lexfuturorum - avatar
+ 1
You can add as many classes as you want separated by space. <div class="one two three"</div> For Styling them in CSS you have to use a dot in every class and seperate them by comma .one, .two, .three{ font-size:16px}
6th Jun 2019, 10:01 AM
Giorgos Mariettakis
Giorgos Mariettakis - avatar
+ 1
Thanks for explain?
6th Jun 2019, 10:37 AM
Nav
0
Any example please
6th Jun 2019, 10:09 AM
Nav