+ 6
can you make a <p> with multiple classes
15 Respostas
+ 8
yes, multiple class names must be separated by white space characters. Just put a space between them. For example:
<p class="class1 class2 class3">Multiple classes</p>
+ 6
yeah, just make a dive and give it multiple classes! like this:
<p class="class1" class="class2">p tag with multiple classes</p>
+ 4
<p class="class1 class2 class3">Multiple class</p>
+ 3
you can define one or more clases to a tag, NOT only a div, it can be any tag inside the body, including body. example: <p class="class1 class2 class3 class4">multiple classes in a tag</p>
+ 1
The choice of a div or p depends on what you want to do with it. div can help to keep other tags together that form a structural unit. ex. you can position all the elements of a sidebar in one div and a p tag holds simply the text of one paragraph together
+ 1
yes..
<p class="1" </p><p>class="2"</p>
0
@babakm why a div, can't I just do it in the <p> tag? [update. this question is not relevant anymore]
0
@babakm said "dive", meaning that @Djaro should go ahead and try it.
You can give multiple classes to any html tag
0
@lucas I see now my mistake, thanks for clarifying that
0
you're welcome :)
0
Yes absolutely
0
is it good to use multiple class name in a single tag?
0
Yes,obviously.
0
yeah
0
yes why not