Feeds:
Posts
Comments

Posts Tagged ‘css tables’

HTML & CSS Tables

Thinking it was about time I got on with the next instalment of my "How to build a website from scratch" series, I went and reread what I'd already done. I finished the last one, saying, "Next time, we'll be getting the header finished and sorting out the nav-bar, looking at a few ways to give a "button" effect to links; which will also introduce you to HTML lists, and possibly, in passing, to HTML tables."

Well, if you're at all familiar with my rather haphazard approach to life (predictability is nice in the science lab and transport-timetables, boring as all hell anywhere else), it might not surprise you to read that I'm kinda jumping ahead a bit, and going on to HTML tables and CSS table-like elements. Not that this post is part of that series, but the subject of table-like displays is going to appear in either the next post or the one after, so it will form a sort of adjunct to it. What brought this on was that I've run across two or three posts in the last couple of months, by people in the throes of the first joys of learning how to page-code, who'd independently discovered HTML tables as a way of displaying content (usually images) in a grid.

We should not do that. Ever.

In order to show you why you shouldn't do it, I'm going to, erm… do it, then tell you how you should do it. (My apologies to anyone reading this using a screen reader; I'm about to include several examples of non-tabular data in table format. Use this link if you'd like to skip that torment.)

So, okay here's a simple table containing six pictures with captions, in two rows of three: (more…)

Advertisements

Read Full Post »

More Captions

Yet more hassle from work colleagues! My mate Mike, who's allegedly putting a site together (been a year so far…) assures me he's not asking these questions just so he can nick me code. Oh no! He's 'stretching my mind.' Right.

(more…)

Read Full Post »