Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8972075
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T18:07:30+00:00 2026-06-15T18:07:30+00:00

About HTML class attribute, that assigns CSS class (or classes?) to a tag. The

  • 0

About HTML class attribute, that assigns CSS class (or classes?) to a tag.
The use of spaces, like in

<tag class="a b">....</tag>

is valid?

This syntax is used by some web-designers and occurs into exported HTML of Adobe InDesign (tested with versions 5 and 6), and another HTML generation softwares…

It (class="a b") is a valid W3C syntax? What versions of CSS and HTML?
(starting from which version became valid?)


EDIT: a natural subquestion “W3C say how to interpret it?” (it is an “override” or another renderization behaviour?) was posted here.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T18:07:31+00:00Added an answer on June 15, 2026 at 6:07 pm

    these are two different classes a & b separated by space. see w3c DOCS

    class = cdata-list [CS]

    this attribute assigns a class name or set of class names to an
    element. Any number of elements may be assigned the same class name or
    names. Multiple class names must be separated by white space
    characters.


    If you have two class

    .a { font-weight: bold; }
    .b { font-weight: normal; }
    

    and assign in class=”a b” or class=”b a”, then later class will overwrite the prior class having same property, so font weight will be normal.

    If you change the CSS definition order,

    .b { font-weight: normal; }
    .a { font-weight: bold; }
    

    now the later class is bold, so “overwrite the prior class having same property” results font weight bold.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

About HTML class attribute assigned with two or more class names, that is, <tag
I’ve got a class with a property that looks like this: [AllowHtml] [DataType(DataType.MultilineText)] public
So I have this php script that output an html table with data about
I just read about HTML 5's WebSocket interface. How can I start trying this?
I would like to learn about HTML forms. For example, I have 2 input
Everyone, every blog is talking about HTML 5 and giving solution to use HTML
can I programatically (or, as we're speaking about html and css , semantically) decide
I have question about parsing in Html helper : I have sth like: @foreach
I've extended the HTML helper with a method that needs an attribute value from
My research into the base HTML DOM element says this about any DOM element's

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.