Any idea on how to use two classes on <div> | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Any idea on how to use two classes on <div>

HTML

24th May 2020, 7:28 PM
Juvenalis Musyoki
2 Answers
+ 1
Multiple classes, no, but multple class names, yes, Eg; You cannot assign two class attrs on one div like this : <div class="mydiv" class="myDiv2"> But you can assign two or more class names to a single div like this: <div class="mydiv myDiv2"> happy coding 😊 Keep coding 🙏
24th May 2020, 9:12 PM
Alfred Juma
Alfred Juma - avatar
0
Thnks for the answer mahn
25th May 2020, 5:17 AM
Juvenalis Musyoki