css ID rules



  1.  IDs are best suited for naming parts of your layout so should not give same name for ID and class
  2.  ID allows alphanumeric and special characters  
  3. but avoid using of # : . * ! symbols
  4.  not allowed spaces
  5.  not started with numbers or a hyphen followed by a digit
  6. case sensitive
  7. using ID selectors is faster than using class selectors
  8. use hyphen "-" (underscore "_" can also use but not good for seo) for long CSS class or Id rule names
  9. If a rule has an ID selector as its key selector, don’t add the tag name to the rule. Since IDs are unique, adding a tag name would slow down the matching process needlessly.
  10. In HTML5, the id attribute can be used on any HTML element and In HTML 4.01, the id attribute cannot be used with: , , , , ,
Related Posts Plugin for WordPress, Blogger...

:: Useful web links List