Rants, rambles, news and notes from another geek

XHTML Strict

I must say that I really like XHTML strict. Sure, it is a little harder to create designs layed out by graphic designers, but once you learn a few simple techniques, you can solve it.

The most important thing to understand is that XHTML Strict will not let you put _ANY _formatting in your markup. You must put it in CSS. So, here are&nbsp_place_holder;a few tricks:

  • Understand the float CSS attribute
  • Split up your stylesheets into logical modules and link then in as needed (e.g. site.css, home.css, etc.)
  • Understand the difference between the various CSS selectors. For example, if you are used to thinking in a OO fashion, element class selectors are like setting defaults to an existing class (element or otherwise); ID selectors are like setting properties in your own class
  • Understand pseudo-classes and pseudo-elements. They don’t all work in IE, so know which ones work for your target audience.
  • If you are having problems check to make sure you understand cascading order.

Good luck!