Rob said:
Barry Pearson said:
Is layout structure or presentation?
I think it is ambiguous. [...]
I agree.
Gradually, some people are placing "layout" strongly in the
"presentation" category. But I suspect they are doing so to an
extent that the pioneers would not recognise.
The HTML has some implicit presentation, at the most basic you
have block level and inline elements. Some elements fit both
categories (e.g. the INS element). And then there is the
'default' behavior that HTML gets in a visual browser.
So we have HTML (or maybe XML) to denote structure, CSS to style
the presentation, perhaps we need a third language for layout?
I've suggested that elsewhere. It isn't necessarily that the syntax of CSS is
wrong for the purpose. It may simply be that the current set of properties &
values are inadequate. I haven't thought about it enough to judge.
I believe you would know that you had a page / viewport layout language if you
could look at the layout sheet (whether CSS or something else) and deduce what
the page and/or viewport would look like without reference to the HTML. That
would be *true* separation of layout from mark-up.
But, at the moment, except for relatively simple pages where there may simply
be about 4 elements to be positioned, you need to know the wrapping & nesting
& sequencing of the "outer" 5 to 10 elements in order to judge. I've looked at
large numbers of layouts, many of them by people who would be judged to be
experts, and this is common. Often they even have IDs such as "wrapper", etc.
When I am designing a new tableless-layout, a lot of thought goes into those
outer elements, and their corresponding CSS. They are what makes one layout
significantly different from another. Which means that part of the layout gets
frozen into the HTML. It isn't so much that the layout is relying on the
default layout of those elements. It is that CSS is often heavily dependent on
nesting, for positioning and other reasons. (It isn't an accident that the W3C
CSS validator reminds us that getting the required styles needs a proper
document parse tree).
People talk about table-layout versus tableless-layout. Perhaps they ought to
be talking about layout-neutral mark-up. Often, "wrapping with <td>s" is
replaced with "wrapping with <div>s". It often provides more options via CSS
alone, but rarely real separation.