Home > Web Front-end > CSS Tutorial > Can HTML Containers Have Multiple Classes?

Can HTML Containers Have Multiple Classes?

DDD
Release: 2024-12-07 16:31:12
Original
527 people have browsed it

Can HTML Containers Have Multiple Classes?

Assigning Multiple Classes to HTML Containers

Is it possible to assign more than one class to a single HTML container? For example, consider the following:

<article class="column, wrapper"> 
Copy after login

How does this work?

Answer

To assign multiple classes to an HTML container, simply remove the comma between the class names. The correct syntax is:

<article class="column wrapper">
Copy after login

This will assign both the "column" and "wrapper" classes to the

element.

The above is the detailed content of Can HTML Containers Have Multiple Classes?. For more information, please follow other related articles on the PHP Chinese website!

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template