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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T19:04:32+00:00 2026-05-22T19:04:32+00:00

I am a web developer for almost 2 years now and I am still

  • 0

I am a web developer for almost 2 years now and I am still learning new things every day, but since my knowledge gets bigger, I came across some fundamental question and couldnt find a good discussion about it.

How do you name your DIVs, IDs, Classes? Do you give them specific content related names? (i.e. <div id="google_map">)

Or do you name them related to their position on the site? (i.e. <div id="content_top_bar">)

And do you do this in your .css the same way?

I hope you get what i am trying to find out. I guess there is no “true” answer anyways, but I would like to know some opinions, so that I can decide what option to take and keep working with it in the future.

  • 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-22T19:04:32+00:00Added an answer on May 22, 2026 at 7:04 pm

    HTML should be used as semantically as possible, so your classes and IDs should be named for their content, not for their style, or their position within the site (these things should be able to change without effecting your HTML.

    For example, if you name a <div id="left-sidebar"> and then later decide you’d like to move that element, the id no longer would semantically represent the element. Conversely, if you named a <div id="navigation"> or <div id="article"> they would still represent the element, regardless of their placement or styling on the page.

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

Sidebar

Related Questions

I've been a web developer for some time now, and have recently started learning
I am primary a web developer but I do have a very good understanding
I am a Web developer who spends 99% of his time in Linux, but
Ok, I am a developer for 6 years now and I came from a
In my 4 years of experience,I have developed a lot of web applications. Now,
I'm a desktop application developer, and I plan learning html5, but as it's not
I am a programmer doing web development for over two years now. Even though
I'm not a bad web developer but it happens that I've never had to
I am not a DBA by any means, but being a web developer means
I am java developer with almost 5 years of experience on Struts, Spring and

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.