Login | Register
Gas & Electricity Prices Gas & Electricity Prices

Translations

By: Energy Complaints | posted in HTML/CSS, Tutorials, Web Design |
Date: June 23rd, 2009

ID tags are very similar to class tag, that’s is why many people are confuse. I always wonder this myself…here is what I know…

ID tag can only be use once on a single page. For example, you have <div id=”something”>content here</div> you can not use it again on the same page. Actually, you can use the same id tags on the same page as many time as you like because many browsers do not enforce the HTML/XHTML rules but it will give you an error if you validate your page at w3c when you have two identical id tags on the same page.

So each id tag must be unique on a single page. Since id are only use once each page, it is very useful to identified a specific content on a page. For example, you have a id for the header and another unique id for the footer and if you want to have the link color for the header to be different from the footer you use id to separate the header and the footer.

It might seem that class are more powerful than id because you can only use id once per page, but that is not true. ID are more powerful than class and it can overwrite the class tags if the style conflict with each other.

That’s all for now. I hope this make sense. If you don’t get it just post comment below and I’ll do my best.

More info on “What is the difference between id and class” with the below links.

  • Facebook
  • Twitter
  • del.icio.us
  • StumbleUpon
  • Digg
  • Technorati
  • Google Bookmarks
  • Reddit
  • MySpace
  • LinkedIn
  • Sphinn
  • Mixx
  • RSS
  • email
  • Print
  • PDF

Related posts:

  1. How to optimize your site for Bing This year the most review and talk about software has to go with Bing. Now it has becoming the next adversary to the search engine...
  2. Web Designers and Developers most common mistakes Intro and Splash Pages The worst thing you could do is to have a Flash splash page and inside the flash object there is the...
  3. Understand Style Sheets CSS stand for Cascading Style Sheets. A CSS style is a collection of formatting attribute that is use to style an element on a page....
  4. SEO Guide for Web Designers by a Web Designer Part 1/3 According to a recent poll, 12 000 web designers were asked “Do you think web designers required SEO?” 84% voted YES, 7% voted NO, and...
  5. Solar as an energy source The sun is 150 million km away from the earth and yet it is still very powerful. If we can capture all the sun’s...
  6. Ontario gas & electricity fixed/Variable rates, Aug. 2010 Deregulated natural gas fixed rates in Ontario Commodity prices in ¢/m³ Distributors: Enbridge Gas Distribution Inc. Kingston Utilities – Natural Gas Kitchener Utilities Union...
  7. Manitoba Hydro rated best in 2010 electric customer satisfaction According to a recent study by J.D. Power and Associates, Manitoba Hydro is rank first for 2010 electricity customer satisfaction for large segment electricity supplier....
  8. 10 months after my laid off Well, I got laid off from my last job as a web designer back in November 2009, when the banking and housing industries collapsed...
  9. WordPress 3.0 is out! The newest WordPress is now out with version 3.0 Theonious. Version 3.0 is name after the famous Jazz musician Thronious Monk. With tons of new...
  10. Old/Classic Car Insurance Policy People or shall we say, Americans are very passionate about older cars that they collect, maintain and restored. These old classics cars are some of...

Comment Pages

Write a Comment