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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T10:39:49+00:00 2026-06-03T10:39:49+00:00

I read an article where it was recommended that we should ONLY use classes

  • 0

I read an article where it was recommended that we should ONLY use classes in our markup and only use ids when we need to refere to it from javascript (as it is easier to attach functions to ids)

At the moment I only use classes when I have more than one element that needs the similar style. However the article (which I THINK I read – but have no reference) stated that we should use classes throughout

I would do this:

<header id="banner"></header>

Where as the recommendation was :

<header class="banner"></header>

(even though the banner is only used once per page)

is this the new “good practice”?

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-03T10:39:51+00:00Added an answer on June 3, 2026 at 10:39 am

    As far as I know you are correct, you should use classes when you need to style multiple elements and IDs when you are only styling a unique element.

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

Sidebar

Related Questions

I just read this article from Google. I always thought that closing tags is
In article I've just read was mentioned that that's not recommended to return big
Recently i read an article is about prevent brute-force attack. It said that automatically
I've just read an article that supposedly introduced me to a new concept: Up
I've read all recommended articles on SynchronizationContext, but there is one small question I
I read and article talking about moving beyond 960px width for websites. This width
I read an article about using CLR integration in sqlserver and was wondering what
I read this article where Ayende states NHibernate can (compared to EF 4): Collection
after read this article i tried generate EF model by System.Diagnostics.Process: Process myProcess =
I read this article Managing Hierarchical Data in MySQL At the end of this

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.