Home >Web Front-end >CSS Tutorial >How Do I Assign Multiple Classes to an HTML Element?
Assigning Multiple Classes to an HTML Container
Can you assign multiple classes to a single HTML container? It may seem like you could separate the class names with a comma, as in:
<article class="column, wrapper">
However, this will not work. To assign multiple classes to an element, simply remove the comma and use a space instead:
<article class="column wrapper">
This will correctly apply both the "column" and "wrapper" classes to the article element.
The above is the detailed content of How Do I Assign Multiple Classes to an HTML Element?. For more information, please follow other related articles on the PHP Chinese website!