HTML: Multiple Class Attribute Values

By Xah Lee. Date: . Last updated: .

The class attribute can have more than one value, separated by space, like this:

<p class="a b c">Alice In Wonderland</p>

order does not matter.

You should NOT use multiple “class”, such as class="…" class="…".

HTML Basics

  1. HTML Basics
  2. HTML5 Tags
  3. Case Sensitivity
  4. Allowed Characters
  5. Charset and Encoding
  6. Self-Closing Tags
  7. Multiple Class Value
  8. HTML/XML Entity List
Liket it? Put $5 at patreon.

Or, Buy JavaScript in Depth

If you have a question, put $5 at patreon and message me.

Web Dev Tutorials

  1. HTML
  2. Visual CSS
  3. JS in Depth
  4. JS Reference
  5. DOM
  6. SVG
  7. Web Dev Blog