Wordpress Theme Designer – Patrick Sy
To div or not to div
When I was learning web design back in the day, using tables was common practice. Sure there was this thing called Cascading Style Sheets(CSS) but it was definitely easier to design using tables, and inline styles. That was until xhtml became popular and we designers had to say bye bye to good ol’ html.
Come to think of it, we just added the letter “x” to html and all of a sudden, my table founded layouts became deprecated and using divs and CSS suddenly became a must (the ‘x’ by the way stands for extensible). I even recall using divs only when I wanted to simulate an iframe effect within my layouts, but now, entire websites are built on it, it’s really funny how one letter could affect so many things in the world wide web (kind of makes you wish it’s the same with life eh?).
So, why and why not use div?
Here is my personal opinion:
- it’s spider friendly – web crawlers, not the creepy ones
- it’s css friendly – it does not encourage use of inline styles like tables
- it’s easier to maintain – if all my styles are in one place and not all over the page
- it’s more human to read – allows for a more readable markup (developers love this)
- the learning curve is steeper than that of learning tables
- need to have a good grasp of css
- some styles look weird in a wysiwyg editor but display correctly in browsers
- cross browser compatibility with css can be a real pain
There are actually a ton of reasons why and why not, but then again, it all boils down to the current standards of the web – which says < tables> are out and divs are in.