Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to assign multiple classes to an HTML container? [closed]

Tags:

html

class

Is it possible to assign multiple classes to a single HTML container?

Something like:

<article class="column, wrapper">  
like image 565
ARGO Avatar asked Jan 04 '12 04:01

ARGO


People also ask

How do you give multiple classes in HTML?

To specify multiple classes, separate the class names with a space, e.g. <span class="left important">. This allows you to combine several CSS classes for one HTML element.

Can you assign multiple classes or a set of classes to an HTML element?

It's possible to assign multiple classes to an element by setting the value of the element's class attribute to be the names of the classes, separated by spaces.

How do I assign multiple classes to a div?

To define multiple classes, separate the class names with a space, e.g. <div class="city main">. The element will be styled according to all the classes specified.

Can an HTML element have 2 classes?

Any HTML element can have as many different classes as needed to style the element using CSS effectively. To assign multiple classes to a single HTML element, you need to specify each class name inside the class attribute separated with a blank space.


1 Answers

Just remove the comma like this:

<article class="column wrapper">  
like image 62
Aurelio De Rosa Avatar answered Oct 21 '22 12:10

Aurelio De Rosa