standards and <div> / <span> elelements

On Friday 16 August 2002 10:25 pm, Ian Hickson wrote:
|  On Fri, 16 Aug 2002, Vadim Plessky wrote:
|  > But I naturally disagree with your opinion quaoted above.
|
|  Naturally.
|
|  > In particular,
|  > 1) writing a Web page using only <span>s and <div>s
|  > what's wrong with that?
|
|  From CSS2, 5.8.3, sums it up quite nicely:
|  # CSS gives so much power to the "class" attribute, that authors could
|  # conceivably design their own "document language" based on elements
|  # with almost no associated presentation (such as DIV and SPAN in
|  # HTML) and assigning style information through the "class" attribute.

Exactly.
And AFAIK CSS was designed to allow this, not to prohibit usage of classes :-)

|  # Authors should avoid this practice since the structural elements of
|  # a document language often have recognized and accepted meanings and
|  # author-defined classes may not.

should avod != depreciated
As soon as usage of CSS classes is depreciated, I will stop using classes.

In fact, div's and span's *should not* be used - you should use pure XML, and 
style individual XML elements.
But many web authors consider this as *too radical* approach, so as an 
intermediary solution I think they can (and should) use pages consisting of 
div's and span's with different id's or className's.

|
|  > 3) document labelled as being HTML 4.01 Strict
|  >  what's wrong with this? It's much better than <html> without DTD.
|  > Of course XHTML is better, but HTML 4.01-Strict is *good enough* for
|  > most applications.
|
|  You misquoted me. I said "using tables for layout in a document
|  labelled as being HTML 4.01 Strict". In other words, the bit about
|  4.01 Strict was a qualifier for the bit about tables.

ok, sorry than.
Mu positions: tables *should not* be used for layouts at all, neither in HTML 
4.0.1-Strict or in any other HTML versions.
Tables should be used for tabular data only.

|
|  > 4) saying width:100% when you mean width:auto
|  > How do you *know* what people *mean*? Do you have CrystalBall?
|
|  I don't know, and that's EXACTLY my point when I talk about
|  validators, later.
|
|  > Using 'width:auto' when you need div taking all width, is stupid, STUPID
|  > approach!
|
|  Actually, it's the correct approach. "width:auto" means "take all the
|  width".

And how *ordinary people*, not CSS WG members, will know that _"width:auto" 
means "take all the width"_?
First recation on width:auto can be *take any width that allows to put content 
inside*. 
And BTW combination of width: auto with borders and margins makes life really 
complicated!..

|
|  Of course, you are correct that using anything on a <div> is a stupid,
|  STUPID approach, since <div>s mean nothing and should generally not
|  appear in markup at all.

Ah, really?..
Nice to hear that from someone who is familiar with CSS specs and some kinds 
of markup.

May I ask you *what* should be used instead of <div>, than?

|
|  Note: "class" attributes and "id" attributes are semantically neutral
|  (the contents of the attributes are opaque and per the spec don't have
|  predefined meanings) and should be generally avoided. They are only

Ah, REALLY?!..  
Now we shopuld avoid 'class' and 'id', too? :-))

|  really valid when the difference in semantics is too subtle for HTML
|  (for example, <em class="sarcasm"> vs <em class="irony">) or for when
|  the markup needs to be explicitly marked up for style reasons (when
|  that is needed, at least some semblence of structure should be kept,
|  e.g. <div class="footer">). XHTML2, with its <section> element, is
|  going to be helping a bit here.

I guess some people *developing standards* just crazy.
(it's not directed particular to you, take it as a *general statement*)

XHTML1 is in *very early* stage of adoption.
W3C make nothing, NOTHING to push it as *the standrad* for web markup.
CSS2 is *not implemented* by Microsoft _and_ NS/Mozilla.
And you start taking about *yet another standrad* ???

|
|  > 5) "Those violations might not be caught by the imperfect and
|  > limited validators that the W3C provides, but they are just as bad
|  > if not worse than the simple technical errors that are caught by
|  > these automated verification tools."
|  >
|  > So, *good guys*
|
|  I make no moralistic judgements on who is good or bad; I'm just
|  pointing out that "validity" per the specs is a concept that is more
|  than just "validity" per the tools.

There was irony in my statement.
It's apity that you don't take it :-(

|
|  > wrote _perfect_ W3C specification
|
|  I have yet to see a perfect W3C specification.

ok, finally we agree :-)

BTW: if we recognize that W3C can't design good specification (perfect==good 
specifications with bugs fixed), may be we should 
a) shut down W3C and make other organization responsible for standards?
or
b) adopt some third-party specifications? Or ask someone talented to create 
one?

I keep in mind here Modula-2 (designed by Niklaus Wirth) and Ada (designed by 
consortium)
If you are familar with thgose languages - you already know what I mean here.
If not - compare 40p. specification with 500p. specification, and time 
requiremnt of 1week (for Mozula-2, to become familar and start developing 
projects) to 1 year (appx. time to become familair with Ada)

|
|  > and there are *bad guys* using it in a wrong way?
|
|  There are certainly millions of people using the W3C specs incorrectly.

And guess WHY?
I can give you some reasons:
* W3C ignoring user's needs (see, for example,  related thereads about 
positioning of eleemnts in *vertical* direction)
* W3C doen't promote / market those standards.
I mean here: *no advertising*, *no work is done with customers* 
(customers==browser vendors and web authors) to push standards to life, there 
are just no Sales / Marketing people in W3C consortium AFAIK.
Don't like Sales / Marketing people? Let's talk about Product Marketing or 
Business Development people than.
* value of using Valid markup (instead of HTML / CSS which could not be 
validated by HTML Validator/JIGSAW) is quite low for both corporate customers 
and private users.
Why? I have some reasons, but the best you can do is to contact Microsft and 
AOL Time Warner, which particiapte in W3C consortium, and ask them *why* 
their corporate web pages do npot have *validated* code?

|
|  > If W3C designed bad specification, or offers bad validation tools-
|  > that's the problem of W3C, not of web authors!
|
|  Bad specifications are everyone's problem. (e.g. XSL:FO, IMHO)
|
|  I did not say the validation tools were bad, merely that they were not
|  (and can never be) the be and and end all about validity.
|
|  There is no way an automated validator could ever spot all four markup
|  mistakes in the following HTML code -- can you? (A very well written
|  validator should be able to spot one of the four, actually.)
|
|     <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
|     <html lang="english">

<head> is missing

|     <title>Written by Ian Hickson</title>

</head> and <body> are missing here.

|     <h1>Current weather in <cite>Berlin, Germany</cite></h1>
|     <p>There are thunderstorms in Berlin at the moment. The air is very
|     humid. The temperature is a warm 24&deg;C.
|     <img src="icons/low-wind" alt="low wind icon">
|

closing tags for <body> and <html> are missing

|  You can see this document online, if it helps:
|
|     http://www.damowmow.com/mozilla/demos/validation/gigo/demo.html

thanks, I will take a look on it later.

|
|  Enjoy,

-- 

Vadim Plessky
http://kde2.newmail.ru  (English)
33 Window Decorations and 6 Widget Styles for KDE
http://kde2.newmail.ru/kde_themes.html
KDE mini-Themes
http://kde2.newmail.ru/themes/

Received on Monday, 19 August 2002 10:59:08 UTC