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

  • SEARCH
  • Home
  • 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 979917
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T04:17:43+00:00 2026-05-16T04:17:43+00:00

How do you guys handle marginal CSS? By marginal, I mean a single word

  • 0

How do you guys handle marginal CSS? By marginal, I mean a single word or phrase that needs italics or bolding. It seems silly to declare a ‘bold’ class with just

Bold { font-weight: bold; }

Or italics, either!

Italic { font-style: italics; }

But I find myself hesitating to put class like that into my css reset.

<p>
    <span class="Italic">This</span> man? 
    <span class="Bold">What</span> are you thinking?
</p>

Obviously if you’re going to combine a bunch of properties to make something look different, it makes sense…

.HoverOnMe
{
    color: #880;
    text-decoration: underline;
    font-style: italic;
}

But I’d classify the above css style as ‘non-marginal’.

We’re taught that elements like <b> and <i> are bad because they mix structure and style, and therefore we shouldn’t use them. So what is the right way to handle ‘marginal css’?

  • 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-05-16T04:17:44+00:00Added an answer on May 16, 2026 at 4:17 am

    When you add a class to an element, name that class by what it represents, not what it looks like. class="Italic" is an anti-pattern that completely misses the point of separating content and styling.

    <span class="Italic">This</span> man? 
    <span class="Bold">What</span> are you thinking?
    

    If what you mean to say is that the word “This” is an emphasised word—that is, if you were to read the sentence, you’d change your tone of voice when pronouncing it—then you should say so with a class name like class="emphasised". However you don’t need to do that, because there is already an element available in HTML that has exactly that meaning, specifically <em>.

    <em>This</em> man?
    

    As luck would have it, browsers will render <em> as italic by default, so you wouldn’t need any more CSS.

    You shouldn’t always use <em> for italics. There are other reasons a word might be italicised. For example it might be a citation (use <cite>), or a phrase in another language (use <span lang="fr">c'est la vie</span>), or it might just be a typographical quirk with no semantic meaning (in which case a plain <span> with styling is fine). Use the element that most closely matches the semantics of what you are trying to say, and adjust the rendering with CSS if the default rendering doesn’t match what you wanted it to look like.

    There is a second form of emphasis that is rendered as bold by default, <strong>:

    <strong>What</strong> are you thinking?
    

    This is usually considered to mean “more emphasised than <em>”. If that is what you were going for, use that tag. But again, don’t jump for <strong> just because you want something bold. If it should be bold because it’s a heading, use the heading tags. If it should be bold because it’s the first line of an article or something, add a class="first-line" (or simply use a CSS :first-line selector, where appropriate).

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

Sidebar

Related Questions

How do you guys handle translation/internationalization of your ASP.NET applications? How do you work
In general, how do you guys handle user update/data freshness interaction with the user
If so, how do you (if you guys are around) handle the issue? I
I'm just curious and was wondering how you guys handle it if you want
I was wondering how you guys handle functions fails. Do you raise an exception,
Ok guys, today's goal is to build a Turing machine simulator. For those that
My program needs to handle different kinds of notes: NoteShort , NoteLong ... Different
I am trying to create a thread to handle a login function that is
Hi guys Ive got a problem with item renderer.I have a data group that
EDIT: Thanks guys, got it! appears that the explode() function was called from the

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.