Friday 9th May 2003

More Markup Stuff

Well, that’s my exams over. Woohoo! That means a few things - firstly, my head hurts (really badly), and also that I’m back to writing weblog entries. Oh joy, oh rapture, I hear you cry.

Sam continues to make progress in perfecting his weblog, but there’s still some issues I have with the new fireburst layout, validatable as it may be. Now here I walk with my eyes wide open into pot / kettle territory, since I’ve made most of these mistakes too. I just haven’t got round to fixing them yet, if indeed they ever do get fixed. Firstly, headers - he doesn’t use any h tags, just other elements (predominantly div and spans) styled to look like headers. That’s bad, mmkay? Secondly, there’s the links - there’s a menu down the side, with a list of links. A list that is. LIST. See where I’m going? Any element which has one and only one child element is probably redundant, and is certainly redundant if the child element is the same as the parent - so no <div> <div> content </div> </div> please. And for a page with some links and one bit of content, nesting divs four deep is bad karma; there are only three (or so) sections to the page, never mind trying to justify four levels of hierarchy. Line breaks (br tags) can only be justified where the end of a line has a meaning - for songs and computer code - anything else is just whitespace and should be taken care of using margins and padding. Inline styling is bad (I’ve spotted one) and external stylesheets are better than style sections - that allows webservers to return ‘304 not modified’ to a big chunk of data, and thereby speeds your site up. UTF-8 has better karma than ascii (just trust me here). The acronyms need marking as such, and some method of skipping over the menu would be good - you don’t want a voice reader reading all your links out every time (or put the menu after the main content, and style it into place…). Widths in em units allows the content boxes to change in size when the user changes their font settings - if I crank my font size up, the menu links are cropped.

But the best of the lot, is the alternative text for the accessibility icon. If I read the page in lynx (like Sam suggested), I’m not supposed to feel that I’m missing out on not seeing the pictures. So if the alternative text mentions a picture, then it’s a bad alternative text. Doing so on the accessibility icon is just beautiful!

I’m not trying to be overly critical of Sam’s code (well, perhaps I am), since it’s pretty darned good already. Validating pages is all I really ask for - stylesheet layouts, semantically ‘correct’ markup, and accessibility issues are worthy goals, but I don’t mind when people choose not to go that far.

For anyone who’s tried doing funky stuff with stylesheets, have a look at the CSS2 Selectors, drool for a while, then the CSS3 Selectors, drool some more, and then realise some of the very cool things you could do (like styling internal and external links differently - even without using icons to do so). Finished drooling? I said could do for a reason - it’s only Mozilla that supports half of those - Internet Explorer doesn’t even do CSS2 yet, and it’s been a full W3C standard since 12 May 1998. Which is very, very, very irritating. I’ve (almost) finished a complete degree in less time than that.

Comments

No comments yet.

Sorry, the comment form is closed at this time.