NOTAGROUCH BBS Oscar · Node 1
┌──────────────────────────────────────────────┐
│                                              │
│             CSS AND HTML BASICS              │
│                                              │
│            Sysop: Oscar | Node: 1            │
│                                              │
└──────────────────────────────────────────────┘

CSS and HTML Basics

DATE: 2011-09-30 AUTHOR: OSCAR CATEGORY: SYSTEMS-ADMINISTRATION [imported from WP]

I’ve been spending some time recently helping people out with their websites and I thought I’d post a few tips on CSS basics.

Let’s cover the difference between ID and Class when we’re talking about CSS.

IDs…

  • IDs should be unique per page.
  • IDs are selected with the ”#” symbol

Classes…

  • Classes can be shared, multiple elements can have the same class.
  • Classes are selected with the ”.” (period)

You can combine them and select a class and a specific id.

Use Firebug to help you debug your website on the fly, then transfer the changes to your style.css (or other) stylesheet.

Further (and better) reading:

  • The Difference between ID and Class.
  • Selector reference guide:
  • Multiple ID & Class selectors: