Browsing web master communities, I often see site checks. But this one time, I was utterly shocked. Not by the design or the subject, but by the markup. The author of the site had tried to make a photo gallery. Now, what is the best way to do so?
You could think about <table>s, <li>s, <dl>s or even about <ol>s. But this man didn't display the images. That is, they weren't images in the markup. He had coded them in the CSS! Turning of your stylesheets resulted in nothing but 4 lists with empty items!
I was puzzled. Why? Why? Why? I figured it out pretty fast. He must have though about image replacement and the splendid use of background images with that, but took the completely wrong approach. I've coded an example of his use, and you will see how bad it is. baaad.html
To be honest, he was very near to perfect semantics. I whipped up a quick solution as to what it should be, and offer some alternatives. correct.html
What alternatives do I offer? Definition lists and tables.
This is the permanent base for this article on my blog.
© 2004 Rob Mientjes