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 8129307
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T08:16:05+00:00 2026-06-06T08:16:05+00:00

Is it better to limit the HTML to few classes and ids and keep

  • 0

Is it better to limit the HTML to few classes and ids and keep the size of the HTML low OR is it better to use a lot of nested CSS instead.

These are the advantages I can think of for both.

Advantages of using few nested CSS rules:

  • Smaller CSS file
  • Efficient targeting of elements inside the CSS
  • Possibly quicker rendering times in the CSS (not sure about this)

Advantages of using a lot of nested CSS rules:

  • Small HTML size throughout the site
  • CSS gets cached
  • Better organization of code (I’m using LESS)

Thanks.

  • 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-06T08:16:10+00:00Added an answer on June 6, 2026 at 8:16 am

    I’d argue large CSS over large HTML any day. Your CSS will be cached, so your pages will load much faster with smaller HTML. More classes does mean more flexibility, but you’d be surprised at how much you can accomplish using CSS selectors. The only time I see bulking up the HTML as something that is useful is for SEO; see microformats for an example of what I mean.

    Accuracy should not be a question whatsoever (even if you factor in human error, you should be able to immediately catch your mistake). As far as speed goes, I doubt it has an effect on performance. Keep in mind all the rendering is done client-side so you don’t need to worry about the server doing any more work because of more complex CSS selectors.

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

Sidebar

Related Questions

Is better to use the below statement Convert.ToInt32(0 + stringValue) If not then why?
Is it better / faster inside an event listener to use this or event.target
Is there a known limit of how many times I am allowed to use
In classes, variables are often made private for encapsulation, and to limit the variables
Is there a size limit to the amount of data you can send to
Is there a limit to the number of bind variables I can use in
Is there a better way to limit access to the Occupation and Employer properties?
What is the best practice for developing a layout? Is better to limit divs?
Better way to do it (without QImage )?: QImage image(width, height, QImage::Format_RGB888); memcpy(image.bits(), m_frameRGB->data[0],
Better to give an example, to illustrate what i am describing. The div element

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.