James O'Neill wrote:
Validating is a great start.
But doesn't guarantee anything other than "you've used the right
syntax". It's the same as running a spell check in your word processor:
it can tell you if you've misspelled words, but it can't tell you if
what you've written makes any sense at all.
Maybe someone could propose a more
semantically appropriate example to what was posted?
There is no semantically appropriate way to generate a generic rounded
corner box like that. So, if you absolutely must have that exact look,
you need to resort to tricks, one way or another. Depending on what
content you're actually working with, you could find enough elements to
naturally hook into to position the 4 required backgrounds. But you
shouldn't have to sully your markup with a myriad of empty elements and
meaningless containers only to achieve a visual presentation.
Patrick, care to
take a swing at it? =)
I've been shaking my head so hard, I gave myself whiplash...
Earlier in this discussion, somebody said that yes, in an ideal world,
the (X)HTML should only carry pure meaning, and the CSS do all the
styling...but that in the real world, we do occasionally add certain
tiny things (like wrapping things like a site logo, top navigation and
search inside a "header" div - still semantic and structural) to
facilitate styling. And sure enough, I agree (in fact, that's one of the
points I make in my chapter in the upcoming book[1]).
But what about that code sample before? Let's see:
- use of <B>, a purely presentational element which, for whatever
reason, was still kept in the XHTML spec
- nested <B>, which make even less sense
- LOTS of *empty* <B> elements - this is the big one: if you start
slapping lots of empty elements into your document (even if they're
spans, or even if you wrapped your content into 10 separate DIVs or
something) you're doing it *purely* for presentational purposes; that's
the big difference to wrapping things up in a header div or
something...there is *no* semantic justification for empty elements
placed into the markup solely for the purpose of allowing some CSS trickery
Anyway, long rant...at the end of the day, you're obviously free to do
what you think is necessary to achieve a certain look. But I'd sincerely
question methods that require you to add junk to your document.
P
--
Patrick H. Lauke
__________________________________________________________
re·dux (adj.): brought back; returned. used postpositively
[latin : re-, re- + dux, leader; see duke.]
www.splintered.co.uk | www.photographia.co.uk
http://redux.deviantart.com
__________________________________________________________
Web Standards Project (WaSP) Accessibility Task Force
http://webstandards.org/
__________________________________________________________
******************************************************
The discussion list for http://webstandardsgroup.org/
See http://webstandardsgroup.org/mail/guidelines.cfm
for some hints on posting to the list & getting help
******************************************************