473,320 Members | 1,953 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

CSS versus HTML tables

I wanted to spiff up my overly spartan homepage, and started using some CSS
templates I found on a couple of weblogs. It looks fine in my browser (IE
6.0), but it doesn't print right. I tested the blogs, and one definitely
didn't print right.

Surveying the web, my impression is that CSS is very unreliable, because
even updated browsers fail to implement the standards correctly.

So should one just avoid CSS? Or is it OK if used carefully (maybe e.g. us
HTML tables for "global" layout, and CSS for things like font
specifications).
Jul 20 '05 #1
81 5044
sinister wrote:
I wanted to spiff up my overly spartan homepage, and started using some
CSS templates I found on a couple of weblogs. It looks fine in my browser
(IE 6.0), but it doesn't print right. I tested the blogs, and one
definitely didn't print right.
That's a bit vague. Perhaps you would be better off writing a print media
specific style sheet.
Surveying the web, my impression is that CSS is very unreliable, because
even updated browsers fail to implement the standards correctly.
Their foboils are not too difficult to work around.
So should one just avoid CSS?
No
Or is it OK if used carefully (maybe e.g.
us HTML tables for "global" layout, and CSS for things like font
specifications).


Its preferred that one uses CSS for all aspects of presentation.

--
David Dorward <http://dorward.me.uk/>
Jul 20 '05 #2
sinister wrote:

Are you a troll, or just someone who feels the urge to put your head into a
lion's mouth?
I wanted to spiff up my overly spartan homepage, and started using
some CSS templates I found on a couple of weblogs. It looks fine in
my browser (IE
6.0), but it doesn't print right. I tested the blogs, and one
definitely didn't print right.

Surveying the web, my impression is that CSS is very unreliable,
because even updated browsers fail to implement the standards
correctly.
Distinguish between CSS used for article styling, and CSS used for page
layout. The former is sound and valuable. The latter is an incompetent system.

"Separation of concerns"
http://www.barry.pearson.name/articl..._presentation/
So should one just avoid CSS? Or is it OK if used carefully (maybe
e.g. us HTML tables for "global" layout, and CSS for things like font
specifications).


"Layout tables considered valuable"
http://www.barry.pearson.name/articles/layout_tables/

"Reflections on CSS Positioning"
http://www.barry.pearson.name/articl...ositioning.htm

--
Barry Pearson
http://www.Barry.Pearson.name/photography/
http://www.BirdsAndAnimals.info/
http://www.ChildSupportAnalysis.co.uk/
Jul 20 '05 #3

"David Dorward" <do*****@yahoo.com> wrote in message
news:c0*******************@news.demon.co.uk...
sinister wrote:
I wanted to spiff up my overly spartan homepage, and started using some
CSS templates I found on a couple of weblogs. It looks fine in my browser (IE 6.0), but it doesn't print right. I tested the blogs, and one
definitely didn't print right.
That's a bit vague. Perhaps you would be better off writing a print media
specific style sheet.
Surveying the web, my impression is that CSS is very unreliable, because
even updated browsers fail to implement the standards correctly.


Their foboils are not too difficult to work around.


Hard to see how that's true, given that different browsers break the
standard in different places.
So should one just avoid CSS?
No
Or is it OK if used carefully (maybe e.g.
us HTML tables for "global" layout, and CSS for things like font
specifications).


Its preferred that one uses CSS for all aspects of presentation.


Because...?


--
David Dorward <http://dorward.me.uk/>

Jul 20 '05 #4

"Barry Pearson" <ne**@childsupportanalysis.co.uk> wrote in message
news:lF*********************@newsfep2-win.server.ntli.net...
sinister wrote:

Are you a troll, or just someone who feels the urge to put your head into a lion's mouth?
Hardly a troll. There's all this hoo-haw about CSS. Then I find that a
pretty simple CSS layout, one used by a blog set up with a popular templage
(Movable Type), doesn't print correctly using a very popular browser (IE
6.0). Then I do a websearch, and there's long long long lists of the
different ways different browsers break the standard. Then I post to
USENET.
I wanted to spiff up my overly spartan homepage, and started using
some CSS templates I found on a couple of weblogs. It looks fine in
my browser (IE
6.0), but it doesn't print right. I tested the blogs, and one
definitely didn't print right.

Surveying the web, my impression is that CSS is very unreliable,
because even updated browsers fail to implement the standards
correctly.
Distinguish between CSS used for article styling, and CSS used for page
layout. The former is sound and valuable. The latter is an incompetent

system.

This was my suspicion.

"Separation of concerns"
http://www.barry.pearson.name/articl..._presentation/
So should one just avoid CSS? Or is it OK if used carefully (maybe
e.g. us HTML tables for "global" layout, and CSS for things like font
specifications).
"Layout tables considered valuable"
http://www.barry.pearson.name/articles/layout_tables/

"Reflections on CSS Positioning"
http://www.barry.pearson.name/articl...ositioning.htm


Thanks for the cites; I'll check them out.

--
Barry Pearson
http://www.Barry.Pearson.name/photography/
http://www.BirdsAndAnimals.info/
http://www.ChildSupportAnalysis.co.uk/

Jul 20 '05 #5
sinister wrote:
Its preferred that one uses CSS for all aspects of presentation.


Because...?


Becuase it needs less bandwidth, its easier to maintain, it presents data to
search engines in a way that they are better able to understand, becuase
you can have different layouts for different media types, becuase it can do
things you can't do by lying with tables...

--
David Dorward <http://dorward.me.uk/>
Jul 20 '05 #6

"David Dorward" <do*****@yahoo.com> wrote in message
news:c0*******************@news.demon.co.uk...
sinister wrote:
I wanted to spiff up my overly spartan homepage, and started using some
CSS templates I found on a couple of weblogs. It looks fine in my browser (IE 6.0), but it doesn't print right. I tested the blogs, and one
definitely didn't print right.


That's a bit vague. Perhaps you would be better off writing a print media
specific style sheet.


Here's an example. This displays fine in IE 6.0, but when I go to print
preview, "content" is reduced to one word per line.

---------------begin html file-----------------------------

HTML file:
<html>
<head>
<link rel="stylesheet" href="tmp2.css" type="text/css" />
<title>Blank</title>
</head>

<body>

<div id="content">
<p>
Lots of content. Lots of content.
Lots of content. Lots of content.
Lots of content. Lots of content.
Lots of content. Lots of content.
....
....
Lots of content. Lots of content.
Lots of content. Lots of content.
Lots of content. Lots of content.
Lots of content. Lots of content.
</p>

</div>

<div id="links">
Some links.
</div>
</body>
</html>

-------------end of html file-----------------------

-------------begin CSS file------------------------

body {
margin:0px 0px 20px 0px;
background:#FFF;
}

#content {
position:absolute;
background:#FFF;
margin-right:20px;
margin-left:225px;
margin-bottom:20px;
border:1px solid #FFF;
width: 70%;
padding:15px;
}
#links {
padding:15px;
border:1px solid #FFF;
width:200px;
background:#CCC;
}
-------------end CSS file------------------------
[snip]
Jul 20 '05 #7

"David Dorward" <do*****@yahoo.com> wrote in message
news:c0*******************@news.demon.co.uk...
sinister wrote:
Its preferred that one uses CSS for all aspects of presentation.
Because...?


Becuase it needs less bandwidth, its easier to maintain, it presents data

to search engines in a way that they are better able to understand, becuase
you can have different layouts for different media types, becuase it can do things you can't do by lying with tables...
But if browsers don't present it correctly...?

--
David Dorward <http://dorward.me.uk/>

Jul 20 '05 #8
sinister wrote:
"Barry Pearson" <ne**@childsupportanalysis.co.uk> wrote in message
news:lF*********************@newsfep2-win.server.ntli.net...
sinister wrote:

Are you a troll, or just someone who feels the urge to put your head
into a lion's mouth?


Hardly a troll. There's all this hoo-haw about CSS. Then I find
that a pretty simple CSS layout, one used by a blog set up with a
popular templage (Movable Type), doesn't print correctly using a very
popular browser (IE
6.0). Then I do a websearch, and there's long long long lists of the
different ways different browsers break the standard. Then I post to
USENET.

[snip]

Chuckle! OK.

I find some of the arguments a bit strange. There isn't one technique that has
been demonstrated to be capable of handing all the desired layouts satisfied
by other techniques. What we have is a set of imperfect techniques, none of
which was ever designed to do what we really wanted.

Perhaps we should just put "normal flow", Frames, iFrames, and objects, (and
perhaps fixed positioning), into a category "interesting, but not what we
really wanted":
"Variations on the 5-box 3-column layout"
http://www.barry.pearson.name/articles/layout_5_3/

Then we should recognise 3 different page layout techniques, each with
advantages and disadvantages:
1. Layout tables.
2. CSS "float".
3. CSS "absolute positioning".

None of these can be replaced even by the other 2 of them. We should keep all
of them in our toolkits:
"Layout tables considered valuable"
http://www.barry.pearson.name/articles/layout_tables/

--
Barry Pearson
http://www.Barry.Pearson.name/photography/
http://www.BirdsAndAnimals.info/
http://www.ChildSupportAnalysis.co.uk/
Jul 20 '05 #9
sinister wrote:
But if browsers don't present it correctly...?


As I said - browser foibles are not very difficult to work around.

--
David Dorward <http://dorward.me.uk/>
Jul 20 '05 #10
David Dorward wrote:
sinister wrote:
Its preferred that one uses CSS for all aspects of presentation.


Because...?


Becuase it needs less bandwidth, its easier to maintain, it presents
data to search engines in a way that they are better able to
understand, becuase you can have different layouts for different
media types, becuase it can do things you can't do by lying with
tables...


Let's examine those statements:

"Becuase it needs less bandwidth"

My evaluation is that using a simple layout-table may add about 25 bytes per
block being positioned compared with alternatives. So a 3-column design, with
about 100 KB of content, may be about 75 bytes bigger if a layout-table is
used. Big deal!

"Variations on the 5-box 3-column layout"
http://www.barry.pearson.name/articles/layout_5_3/

"it presents data to search engines in a way that they are better able to
understand"

My understanding is that search engines work on a linrearised rendition. Soem
table-formats are actually better than some CSS techniques, especially when
"floats" are used.

"becuase you can have different layouts for different media types"

Perhaps. But how many CSS-P layouts go this far? And it is obvious from the
way that Opera handles "small screen mode" that table-layout can also be
handled on other media types.

"becuase it can do things you can't do by lying with tables"

Tables are telling the truth! Right from the start, tables were proposed for
laying out complex material in rows and columns.

"A brief history of tables"
http://www.barry.pearson.name/articl...es/history.htm

Layout tables simply expect compliance with standards - not distortion. We
should recognise 3 different page layout techniques, each with advantages and
disadvantages:
1. Layout tables.
2. CSS "float".
3. CSS "absolute positioning".

All of the 3 techniques above can do things that the others can't. Or, at
least, things that the others have not yet been proved to do. The web is a
medium capable of the superset of "1", "2", and "3", above, plus combinations
of these.

--
Barry Pearson
http://www.Barry.Pearson.name/photography/
http://www.BirdsAndAnimals.info/
http://www.ChildSupportAnalysis.co.uk/
Jul 20 '05 #11
sinister wrote:
#content {
position:absolute;
background:#FFF;
margin-right:20px;
margin-left:225px;
margin-bottom:20px;
border:1px solid #FFF;
width: 70%;
padding:15px;
}


Position: absolute without top or bottom and without left or right being
specified is a recipe for disaster (and doesn't really make sense anyway).

--
David Dorward <http://dorward.me.uk/>
Jul 20 '05 #12

"David Dorward" <do*****@yahoo.com> wrote in message
news:c0*******************@news.demon.co.uk...
sinister wrote:
#content {
position:absolute;
background:#FFF;
margin-right:20px;
margin-left:225px;
margin-bottom:20px;
border:1px solid #FFF;
width: 70%;
padding:15px;
}
Position: absolute without top or bottom and without left or right being
specified is a recipe for disaster (and doesn't really make sense anyway).


I tried this:
body {
margin:0px 0px 20px 0px;
background:#FFF;
}

#content {
position:absolute; top: 0 px; left: 0 px;
background:#FFF;
margin-right:20px;
margin-left:225px;
margin-bottom:20px;
border:1px solid #FFF;
width: 70%;
padding:15px;
}
#links {
padding:15px;
border:1px solid #FFF;
width:200px;
background:#CCC;
}

That had the same problem.

--
David Dorward <http://dorward.me.uk/>

Jul 20 '05 #13
Barry Pearson wrote:
design, with about 100 KB of content.
100K? Almost three and a half times the general recommended maximum size of
a page[1] _including_ cacheable external resources.
"it presents data to search engines in a way that they are better able to
understand"

My understanding is that search engines work on a linrearised rendition.
They do, that doesn't mean that CSS isn't better. My experience[2] is that
sites using CSS for layout tend to do better in search engine results.
Soem table-formats are actually better than some CSS techniques,
especially when "floats" are used.
Evidence?
"because you can have different layouts for different media types"

Perhaps. But how many CSS-P layouts go this far?
So because not many people use a feature, that feature isn't an advantage?
And it is obvious from the way that Opera handles "small screen mode" that
table-layout can also be handled on other media types.
It takes more effort and involves guesswork. This is suboptimal. Such
guesswork also fails to allow for such factors as not displaying the site
navigation controls for a printout.
"because it can do things you can't do by lying with tables"

Tables are telling the truth! Right from the start, tables were proposed
for laying out complex material in rows and columns.

"A brief history of tables"
http://www.barry.pearson.name/articl...es/history.htm
Then lets add some experience and we get to 1999[3] and the HTML 4.01
Specification.

"Tables should not be used purely as a means to layout document content"

http://www.w3.org/TR/html4/struct/tables.html
Layout tables simply expect compliance with standards - not distortion.


No they don't. Layout tables expect tabular data to be presented to the user
in a fashion approximating the means by which the page author's browser
presents that data. They can not expect compliance with standards because
the standard does not specify how tables should be presented to the user
(it gives examples of how it *might* be presented).

[1] Yes, there are atypical sites such as those which are there to present
an image or video file to the user which have to exceed this because their
function is to present more then that amount of data to the user.

[2] Yes, this is annacdotal evidence, just about everything relating to
search engine rankings is becuase search engines don't give out their
secret formula to be exploited.

[3] Almost half a decade old now, doesn't time fly?

--
David Dorward <http://dorward.me.uk/>
Jul 20 '05 #14
*sinister*:

position:absolute; top: 0 px; left: 0 px;


Are these space intentional? Because they're wrong.

--
Useless Fact #6:
In most advertisements, including newspapers, the time displayed on a watch is
10:10.
Jul 20 '05 #15
Barry Pearson wrote:

Are you a troll, or just someone who feels the urge to put your head into a
lion's mouth?


That's funny, I've been thinking *you* are the troll, they way you rant
on about table layouts. ;)

--
Reply address is a bottomless spam bucket.
Please reply to the group so everyone can share.
Jul 20 '05 #16

"Christoph Paeper" <ch**************@nurfuerspam.de> wrote in message
news:c0***********@ariadne.rz.tu-clausthal.de...
*sinister*:

position:absolute; top: 0 px; left: 0 px;
Are these space intentional? Because they're wrong.


Thanks for the tip.

Unfortunately, after fixing that in the *.css, the printing bug persists.

--
Useless Fact #6:
In most advertisements, including newspapers, the time displayed on a watch is 10:10.

Jul 20 '05 #17
Barry Pearson wrote:
Right from the start, tables were proposed for
laying out complex material in rows and columns.


But "original intentions ... are irrelevant for how we should behave
today. We can't afford to re-fight lost battles."

http://groups.google.com/groups?selm...erver.ntli.net

--
Brian (follow directions in my address to email me)
http://www.tsmchughs.com/

Jul 20 '05 #18
kchayka wrote:
Barry Pearson wrote:

Are you a troll, or just someone who feels the urge to put your head
into a lion's mouth?


That's funny, I've been thinking *you* are the troll, they way you
rant on about table layouts. ;)


Chuckle! I guess "rant" is in the eye of the beholder!

I consider myself to be an anti-troll. Instead of trying to provoke lengthy &
time-wasting debates, I am more interested in providing sufficient analysis &
references to satisfy a sub-thread, and perhaps bring it to an end. I'm in the
solution business, not the debating business, and always want to see a
consensus being built on a sound baseline.

I only started to examine the claims of the anti-table-layout people about
last October/November. Until then, I had vaguely assumed that they probably
knew what they were talking about. Then, when I wanted to develop some new
page templates, I wanted to understand what techniques to use. So I started to
systematically examine the various claims of the anti-table-layout people that
I had seen, (and other people too), and started to realise that they didn't
stand up to scrutiny. Pages that used table-layout simply didn't behave like
they were claimed to by their opponents.
http://www.barry.pearson.name/articles/layout_5_3/
http://www.barry.pearson.name/articl...es/defence.htm

I followed this by examining various claims about what tables were and were
not intended for, and what sort of information should go into tables. And,
once again, those claims didn't stand up to scrutiny. Many anti-table-layout
arguments are based on an out-of-date arm-waving statement published in 1997.
That is just about 4 years after the first proposal I have found for tables,
and over 6 years ago! Is that *really* the only argument? It was superseded by
W3C in principle in April 1999! We live in a vastly different world now.
http://www.barry.pearson.name/articl...es/history.htm

As I discover more, I publish it on my pages. I only created those pages a few
weeks ago. They have been indexed by Google, but obviously it is too soon to
detect any effect of them. It will be interesting to see if they have had any
effect in a year's time. Will people still be posting statements that can
easily be refuted by reference to sources that I identify? (I suspect that
some people will. This isn't a simple rational discussion. It is a "holy
war").

My pages should be treated on a number of levels. Some of the contents are
intended to be "the facts" - information, supported by credible references,
that we can surely all agree upon. If people tell me of errors, and provide
evidence, I will correct them. If people tell me of extra sources that I
should take into account, and these sources are consistent with a sound
baseline of sources, then I will take them into account.

Obviously, this leaves a lot of scope for differences of analysis & opinion.
If people have alternative views, supported by a sound information-baseline,
then I will link to those views, perhaps accompanied by a commentary. I want
my pages to be comprehensive and acceptable as a baseline.

The 2 key sets of pages (5 pages & 4 pages) start at the following:
http://www.barry.pearson.name/articles/layout_tables/
http://www.barry.pearson.name/articl..._presentation/

--
Barry Pearson
http://www.Barry.Pearson.name/photography/
http://www.BirdsAndAnimals.info/
http://www.ChildSupportAnalysis.co.uk/
Jul 20 '05 #19
Brian wrote:
Barry Pearson wrote:
Right from the start, tables were proposed for
laying out complex material in rows and columns.


But "original intentions ... are irrelevant for how we should behave
today. We can't afford to re-fight lost battles."

http://groups.google.com/groups?selm...erver.ntli.net

Thank you for drawing attention to my statements as follows:

"What were the original intentions? They are interesting from a historical
perspective. They are irrelevant for how we should behave today. We can't
afford to re-fight lost battles. (But history is still interesting! That is
why I am maintaining a page on the subject)."

"How do things behave today, and in the future? This is what matters. Authors
are trying to communicate with users."

"When in doubt, go back to the specification. I assume we all wish that all
browsers conformed to specification! .... So, what do the specifications say
is data for tables? "The HTML table model allows authors to arrange data --
text, preformatted text, images, links, forms, form fields, other tables,
etc. -- into rows and columns of cells"."

Mark-up is a means to an end. The "end" is communication. That is how success
or failure should be judged. Then mark-up can be judged according to how it
contributed to this success or failure.

"A brief history of tabes"
http://www.barry.pearson.name/articl...es/history.htm
"Separation of concerns"
http://www.barry.pearson.name/articl..._presentation/

--
Barry Pearson
http://www.Barry.Pearson.name/photography/
http://www.BirdsAndAnimals.info/
http://www.ChildSupportAnalysis.co.uk/
Jul 20 '05 #20
Barry Pearson wrote:
"When in doubt, go back to the specification. I assume we all wish that
all browsers conformed to specification! .... So, what do the
specifications say is data for tables? "The HTML table model allows
authors to arrange data -- text, preformatted text, images, links, forms,
form fields, other tables, etc. -- into rows and columns of cells"."
The specification which also says:
"Tables should not be used purely as a means to layout document content" and
"authors should use style sheets to control layout rather than tables".
Mark-up is a means to an end. The "end" is communication. That is how
success or failure should be judged. Then mark-up can be judged according
to how it contributed to this success or failure.


How do you measure the success of the communication? Do you get direct
feedback from every single one of of the people who tried to use it? Do you
get feedback from all the robots that index sites for search engines or
other purposes? Do you get feedback from everybody who might have found the
information useful if they could have found it (but didn't because it
wasn't indexed well enough)?

At least when the markup accurately describes the data you know you haven't
inserting any misleading meta data.

--
David Dorward <http://dorward.me.uk/>
Jul 20 '05 #21
DU
sinister wrote:
I wanted to spiff up my overly spartan homepage, and started using some CSS
templates I found on a couple of weblogs. It looks fine in my browser (IE
6.0), but it doesn't print right. I tested the blogs, and one definitely
didn't print right.

Surveying the web, my impression is that CSS is very unreliable, because
even updated browsers fail to implement the standards correctly.

There is no relativity in what you say. No numbers. No browser version.
No browser name. No url. No demo. No test suite. Nothing concrete. No
specifics whatsoever.

Can you substantiate your claim while using this test suite?
http://www.w3.org/Style/CSS/Test/CSS1/current/

According to westciv.com site, current versions of major browser
manufacturers (MSIE, Mozilla-based browsers like NS 7.x, Opera) support
very well CSS1 properties.

CSS1 and CSS2 browser support info
http://www.westciv.com/style_master/...ort/index.html

Older browser versions (less popular) still do well above 75% here:
http://devedge.netscape.com/library/...astergrid.html

8 current browsers out of 9 scored over 90% in tests involving 20 layouts:
http://www.wpdfd.com/editorial/wpd1003.htm#feature

Etc.. I could go on and on with other reviews, tests, articles.
So should one just avoid CSS? Or is it OK if used carefully (maybe e.g. us
HTML tables for "global" layout, and CSS for things like font
specifications).


My personal perception on this issue is that a wide majority of users
still do not have a lot of experience and understanding on coding
accordingly HTML and CSS. Otherwise there would be a lot more webpages
out there which would validate accordingly both their markup code and
css code: it's not the case for 99% of all indexed webpages according to
a W3C estimation.

DU
Jul 20 '05 #22
DU
sinister wrote:
"David Dorward" <do*****@yahoo.com> wrote in message
news:c0*******************@news.demon.co.uk...
sinister wrote:

I wanted to spiff up my overly spartan homepage, and started using some
CSS templates I found on a couple of weblogs. It looks fine in my
browser
(IE 6.0), but it doesn't print right. I tested the blogs, and one
definitely didn't print right.
That's a bit vague. Perhaps you would be better off writing a print media
specific style sheet.

Here's an example. This displays fine in IE 6.0, but when I go to print
preview, "content" is reduced to one word per line.

---------------begin html file-----------------------------

HTML file:
<html>


First problem with your file. No doctype declaration which will trigger
MSIE 6 into standards compliant rendering mode. No doctype declaration
at all. So, you can't validate the document either.

It is one thing to complaint that browsers do not support web standards
and CSS. It is another thing to code accordingly so that browsers will
implement correctly the CSS1 box model: that is true for MSIE 6 for
windows which is used by an estimated 70% of all users out there and
Opera 7.x as well.
<head>
<link rel="stylesheet" href="tmp2.css" type="text/css" />
<title>Blank</title>
</head>

<body>

<div id="content">
<p>
Lots of content. Lots of content.
Lots of content. Lots of content.
Lots of content. Lots of content.
Lots of content. Lots of content.
...
...
Lots of content. Lots of content.
Lots of content. Lots of content.
Lots of content. Lots of content.
Lots of content. Lots of content.
</p>

</div>
I just wonder if the inner <p> is serving some kind of purpose here.
Otherwise, I would avoid it.

<div id="links">
Some links.
</div>
</body>
</html>

-------------end of html file-----------------------

-------------begin CSS file------------------------

body {
margin:0px 0px 20px 0px;
background:#FFF;
}

#content {
position:absolute;
By deciding that your div#content will be abs. pos., your are deciding
that its positional parent will be the root element, not the body
element. This is utterly clearly explained, spelled out in CSS2.1,
section 10.1.
This is where is the problem with your code. All browsers render your
code accordingly, even MSIE 6 for windows in backward compatible
rendering mode (that is with its faulty implementation of the CSS1 box
model).
background:#FFF;
margin-right:20px;
margin-left:225px;
margin-bottom:20px;
border:1px solid #FFF;
Most of us have a default black color on a white background. Now, if you
choose to outline this div#content with a white border, then you will
defeat the purpose of such border for a wide majority of users.

DU
width: 70%;
padding:15px;
}
#links {
padding:15px;
border:1px solid #FFF;
width:200px;
background:#CCC;
}
-------------end CSS file------------------------
[snip]

Jul 20 '05 #23
Barry Pearson wrote:
Brian wrote:
Barry Pearson wrote:
Right from the start, tables were proposed for laying out
complex material in rows and columns.


But "original intentions ... are irrelevant for how we should
behave today. We can't afford to re-fight lost battles."


http://groups.google.com/groups?selm...erver.ntli.net

Thank you for drawing attention to my statements


Your welcome. And again, a question: you keep using the "original
intentions" of those who created html tables to justify misusing
tables for layout. Why, if such "original intentions ... are
irrelevant for how we should behave today?"

--
Brian (follow directions in my address to email me)
http://www.tsmchughs.com/

Jul 20 '05 #24
Barry Pearson wrote:

I consider myself to be an anti-troll. Instead of trying to provoke lengthy &
time-wasting debates, I am more interested in providing sufficient analysis &
references to satisfy a sub-thread, and perhaps bring it to an end.


IMO, you're coming off more as an evangelistic kook than anything else.
You're not bringing anything to an end but just dragging this thing
out, perhaps getting yourself added to killfiles everywhere. It's
become quite tedious, to say the least.

--
Reply address is a bottomless spam bucket.
Please reply to the group so everyone can share.
Jul 20 '05 #25

"DU" <dr*******@hotWIPETHISmail.com> wrote in message
news:c0**********@news.eusc.inter.net...
sinister wrote:
I wanted to spiff up my overly spartan homepage, and started using some CSS templates I found on a couple of weblogs. It looks fine in my browser (IE 6.0), but it doesn't print right. I tested the blogs, and one definitely didn't print right.

Surveying the web, my impression is that CSS is very unreliable, because
even updated browsers fail to implement the standards correctly.

There is no relativity in what you say. No numbers. No browser version.
No browser name. No url. No demo. No test suite. Nothing concrete. No
specifics whatsoever.


I *did* state "IE 6.0."

Though you're right; the rest of it is mostly anecdotal, not a statistical
survey.

Just FYI, here's a site that I "stole" the stylesheet from:
http://www.maxspeak.org/mt/

It has the same problem I mentioned about the print preview. Though IIRC
it's probably the issue you mentioned in your other post about "absolute"
positioning.

Can you substantiate your claim while using this test suite?
http://www.w3.org/Style/CSS/Test/CSS1/current/

According to westciv.com site, current versions of major browser
manufacturers (MSIE, Mozilla-based browsers like NS 7.x, Opera) support
very well CSS1 properties.
Thanks for the links.

CSS1 and CSS2 browser support info
http://www.westciv.com/style_master/...ort/index.html

Older browser versions (less popular) still do well above 75% here:
http://devedge.netscape.com/library/...astergrid.html
8 current browsers out of 9 scored over 90% in tests involving 20 layouts:
http://www.wpdfd.com/editorial/wpd1003.htm#feature

Etc.. I could go on and on with other reviews, tests, articles.
So should one just avoid CSS? Or is it OK if used carefully (maybe e.g. us HTML tables for "global" layout, and CSS for things like font
specifications).
My personal perception on this issue is that a wide majority of users
still do not have a lot of experience and understanding on coding
accordingly HTML and CSS. Otherwise there would be a lot more webpages
out there which would validate accordingly both their markup code and
css code: it's not the case for 99% of all indexed webpages according to
a W3C estimation.


I don't think most sites validated their own vanilla HTML. Not that I think
that's a good thing.


DU

Jul 20 '05 #26

"DU" <dr*******@hotWIPETHISmail.com> wrote in message
news:c0**********@news.eusc.inter.net...
sinister wrote:
"David Dorward" <do*****@yahoo.com> wrote in message
news:c0*******************@news.demon.co.uk...
sinister wrote:
I wanted to spiff up my overly spartan homepage, and started using some
CSS templates I found on a couple of weblogs. It looks fine in my
browser
(IE 6.0), but it doesn't print right. I tested the blogs, and one
definitely didn't print right.

That's a bit vague. Perhaps you would be better off writing a print mediaspecific style sheet.

Here's an example. This displays fine in IE 6.0, but when I go to print
preview, "content" is reduced to one word per line.

---------------begin html file-----------------------------

HTML file:
<html>


First problem with your file. No doctype declaration which will trigger
MSIE 6 into standards compliant rendering mode. No doctype declaration
at all. So, you can't validate the document either.


Does browser behavior actually change if you omit the declaration? (I'm not
saying I think it's OK that they do so, but my experience is it doesn't make
any difference.)
It is one thing to complaint that browsers do not support web standards
and CSS. It is another thing to code accordingly so that browsers will
implement correctly the CSS1 box model: that is true for MSIE 6 for
windows which is used by an estimated 70% of all users out there and
Opera 7.x as well.
<head>
<link rel="stylesheet" href="tmp2.css" type="text/css" />
<title>Blank</title>
</head>

<body>

<div id="content">
<p>
Lots of content. Lots of content.
Lots of content. Lots of content.
Lots of content. Lots of content.
Lots of content. Lots of content.
...
...
Lots of content. Lots of content.
Lots of content. Lots of content.
Lots of content. Lots of content.
Lots of content. Lots of content.
</p>

</div>


I just wonder if the inner <p> is serving some kind of purpose here.
Otherwise, I would avoid it.


OK. But why?

<div id="links">
Some links.
</div>
</body>
</html>

-------------end of html file-----------------------

-------------begin CSS file------------------------

body {
margin:0px 0px 20px 0px;
background:#FFF;
}

#content {
position:absolute;


By deciding that your div#content will be abs. pos., your are deciding
that its positional parent will be the root element, not the body
element. This is utterly clearly explained, spelled out in CSS2.1,
section 10.1.
This is where is the problem with your code. All browsers render your
code accordingly, even MSIE 6 for windows in backward compatible
rendering mode (that is with its faulty implementation of the CSS1 box
model).


Yes, you're right. When I got rid of the "position:absolute", the problem
went away.

Now I can't get the thing to layout correctly, though (i.e., links on left,
content on right).
background:#FFF;
margin-right:20px;
margin-left:225px;
margin-bottom:20px;
border:1px solid #FFF;


Most of us have a default black color on a white background. Now, if you
choose to outline this div#content with a white border, then you will
defeat the purpose of such border for a wide majority of users.


OK

[snip]
Jul 20 '05 #27
kchayka wrote:
Barry Pearson wrote:

I consider myself to be an anti-troll. Instead of trying to provoke
lengthy & time-wasting debates, I am more interested in providing
sufficient analysis & references to satisfy a sub-thread, and
perhaps bring it to an end.
IMO, you're coming off more as an evangelistic kook than anything
else.


That is a strange term to apply to someone with my "anything goes" attitude!
But, to someone with an extreme position, someone like me with a tolerant,
moderate, position may appear to be at the opposite extreme. (Perhaps along
the lines of "if you are not for us, you are against us").

OK, I am not an "anti-layout-table" person. But neither am I
anti-CSS-positioning. They are both useful tools, with their (well publicised)
different strengths and weaknesses. If you've read the pages I've quoted here
a number of times, you will know they are tableless-layout. Probably about 40%
of my pages on the web, including most recent pages, are tableless-layout.
Horses for courses.
You're not bringing anything to an end but just dragging this
thing out,
Dragging *what* thing out? If you check my posts, you should spot that my
statements on this matter are typically responses to others' posts, not
(sub-)threads I have initiated myself. I try to provide sufficient material,
with sufficient cites, to satisfy the (sub-)thread.
perhaps getting yourself added to killfiles everywhere.
I certainly wouldn't expect someone who has read my pages to re-read them
every time I quote them! Whether they agree with them or not. Whether those
people avoid re-reading what I say by just ignoring my posts, or by KF, is
obviously up to them. It won't affect what I do.

But, ultimately, my concern isn't with people who have the expertise to make
up their own minds on this. They don't need me, and may live happy lives if
they never again see anything I say! I'm more interested in seeing that less
experienced people, including newbies, get access to a more accurate &
balanced view than "The <table> element was designed to mark-up tabular data
(such as you'd find in a spreadsheet)".
It's become quite tedious, to say the least.


Is that simply because you've already read my pages on this topic, and don't
want to read them again? (I don't recall you commenting on them). Or do they
contradict your own views, and you don't like that? As I pointed out earlier,
if you comment on them, providing suitable evidence, I will take your comments
into account.

http://www.barry.pearson.name/articles/layout_tables/

--
Barry Pearson
http://www.Barry.Pearson.name/photography/
http://www.BirdsAndAnimals.info/
http://www.ChildSupportAnalysis.co.uk/
Jul 20 '05 #28
Barry Pearson wrote:

someone like me with a tolerant, moderate, position
My, you are full of yourself.
if you comment on them, providing suitable evidence, I will take
your comments into account.
No you won't. You'll just post the same links over and over again,
ignoring anything anyone else posts.
http://www.barry.pearson.name/articles/layout_tables/


See?

--
Brian (follow directions in my address to email me)
http://www.tsmchughs.com/

Jul 20 '05 #29
How can it be that a poster here who lists W3 pages in
his signature uses HTML TABLES for his own page layout?

Huh? Huh? And *me* in the process of eliminating them.

sheeeee

Mason C

Jul 20 '05 #30
Mason A. Clark wrote:
How can it be that a poster here who lists W3 pages in
his signature uses HTML TABLES for his own page layout?


I don't know. Can it? Perhaps you could quote some of the message
you're responding to so I could make a guess.

--
Brian (follow directions in my address to email me)
http://www.tsmchughs.com/

Jul 20 '05 #31
Brian wrote:
Barry Pearson wrote:

[snip]
if you comment on them, providing suitable evidence, I will take
your comments into account.


No you won't. You'll just post the same links over and over again,
ignoring anything anyone else posts.

[snip]

I will take comments into account. I have already added to and changed the
pages, as a result of comments received, several times. For example, the
reference to the HTML+ proposal came from Alan Flavell. In other cases, I use
the comments to provide keywords & suggestions to investigate further, for
example to search the W3C site or the web generally, and incorporate the
results into the pages.

The pages will exist until I see a good reason to remove them. Their content
is evolving all the time. Although I don't publish the complete change-history
for each page, each page states when it was last updated. As do all my pages
(except experiments) - I use a Dreamweaver feature to do this automatically
when it saves the page.

--
Barry Pearson
http://www.Barry.Pearson.name/photography/
http://www.BirdsAndAnimals.info/
http://www.ChildSupportAnalysis.co.uk/
Jul 20 '05 #32
sinister wrote:
So should one just avoid CSS?


Sheesh, you really need to learn how to troll. That one was far too
transparent.
Matthias

Jul 20 '05 #33
DU
sinister wrote:
"DU" <dr*******@hotWIPETHISmail.com> wrote in message
news:c0**********@news.eusc.inter.net...
sinister wrote:
"David Dorward" <do*****@yahoo.com> wrote in message
news:c0*******************@news.demon.co.uk.. .
sinister wrote:

>I wanted to spiff up my overly spartan homepage, and started using some
>CSS templates I found on a couple of weblogs. It looks fine in my

browser
>(IE 6.0), but it doesn't print right. I tested the blogs, and one
>definitely didn't print right.

That's a bit vague. Perhaps you would be better off writing a print
media
specific style sheet.
Here's an example. This displays fine in IE 6.0, but when I go to print
preview, "content" is reduced to one word per line.

---------------begin html file-----------------------------

HTML file:
<html>
First problem with your file. No doctype declaration which will trigger
MSIE 6 into standards compliant rendering mode. No doctype declaration
at all. So, you can't validate the document either.

Does browser behavior actually change if you omit the declaration?


Yes they do. The most important one to consider is MSIE 6 for windows.

Examine the red and green table of this site:
Activating the Right Layout Mode Using the Doctype Declaration
http://www.hut.fi/u/hsivonen/doctype.html

Doctype switching and standards compliance: An overview
http://gutfeldt.ch/matthias/articles/doctypeswitch.html

"Opera 7 has two rendering modes, Standards Mode and Quirks Mode."
"DOCTYPEs that will trigger standards compliant behavior in Opera 7, IE6
for Windows, and Netscape 7"
http://www.opera.com/docs/specs/doctype/

"Mozilla Quirks Mode Behavior"
http://www.mozilla.org/docs/web-deve...quirklist.html

(I'm not saying I think it's OK that they do so,

Most experienced or professional web developpers are against the idea
that doctype could trigger different rendering mode. I understand their
opinion and kinda agree but if this doctype declaration trigger thing
was implemented only to help, to support a transition to full compliance
to W3C web standards and recommendations, then it would make sense. So
far, I would say they were right since a very few percentage
(definitively less than 5%) of all webpages out there have truly
upgraded their markup and css code since this doctype trigger feature
was first implemented (march 2001 in MSIE 6 beta 1).
About 10 billions of webpages can be accessed on the web right now and
about 99% of all of them (according to an W3C estimate) would fail
markup and CSS validations.

but my experience is it doesn't make any difference.)

It does for a number of things: the most important and visual one is the
correct implementation of the CSS1 box model by MSIE 6.

"CSS Enhancements in Internet Explorer 6":
"The !DOCTYPE "Switch" section
"Fix the Box Instead of Thinking Outside It" setion
"Who Moved My Canvas?" section
http://msdn.microsoft.com/library/en...asp?frame=true

It is one thing to complaint that browsers do not support web standards
and CSS. It is another thing to code accordingly so that browsers will
implement correctly the CSS1 box model: that is true for MSIE 6 for
windows which is used by an estimated 70% of all users out there and
Opera 7.x as well.

<head>
<link rel="stylesheet" href="tmp2.css" type="text/css" />
<title>Blank</title>
</head>

<body>

<div id="content">
<p>
Lots of content. Lots of content.
Lots of content. Lots of content.
Lots of content. Lots of content.
Lots of content. Lots of content.
...
...
Lots of content. Lots of content.
Lots of content. Lots of content.
Lots of content. Lots of content.
Lots of content. Lots of content.
</p>

</div>
I just wonder if the inner <p> is serving some kind of purpose here.
Otherwise, I would avoid it.

OK. But why?


The more you nest elements inside of others, the more complex the
parsing is for *all* browsers, the longer the parsing phase is
(analytical, DOM construction, etc), the more branches and levels the
DOM tree has and the more chances the rendering could be different on
browsers.
The more you nest elements inside of others, the bigger the file is: I
have in mind webpages like yahoo.com which have over 60 nested tables
and webpages which have up to 4 levels of nested tables.
When nesting elements is not at all necessary, then best is to avoid it
altogether.
In your page block above, just

<p id="content">
Lots of content. Lots of content.
....
</p>
or
<div id="content">
Lots of content. Lots of content.
....
</div>

would suffice.

DU
<div id="links">
Some links.
</div>
</body>
</html>

-------------end of html file-----------------------

-------------begin CSS file------------------------

body {
margin:0px 0px 20px 0px;
background:#FFF;
}

#content {
position:absolute;


By deciding that your div#content will be abs. pos., your are deciding
that its positional parent will be the root element, not the body
element. This is utterly clearly explained, spelled out in CSS2.1,
section 10.1.
This is where is the problem with your code. All browsers render your
code accordingly, even MSIE 6 for windows in backward compatible
rendering mode (that is with its faulty implementation of the CSS1 box
model).

Yes, you're right. When I got rid of the "position:absolute", the problem
went away.

Now I can't get the thing to layout correctly, though (i.e., links on left,
content on right).

background:#FFF;
margin-right:20px;
margin-left:225px;
margin-bottom:20px;
border:1px solid #FFF;


Most of us have a default black color on a white background. Now, if you
choose to outline this div#content with a white border, then you will
defeat the purpose of such border for a wide majority of users.

OK

[snip]

Jul 20 '05 #34
DU wrote:
[snip]
About 10 billions of webpages can be accessed on the web right now and
about 99% of all of them (according to an W3C estimate) would fail
markup and CSS validations.

[snip]

I have no trouble believing that. But have you a reference to that estimate?

--
Barry Pearson
http://www.Barry.Pearson.name/photography/
http://www.BirdsAndAnimals.info/
http://www.ChildSupportAnalysis.co.uk/
Jul 20 '05 #35
Quoth the raven named Barry Pearson:
DU wrote: [snip]
About 10 billions of webpages can be accessed on the web right
now and about 99% of all of them (according to an W3C estimate)
would fail markup and CSS validations.


[snip]

I have no trouble believing that. But have you a reference to that
estimate?


Sometime last summer, a young gent posted a link to his master's
thesis in one of these groups. He wrote a program that spidered
several millions of web pages, and validated them.

The result was that 0.7% of these millions were valid HTML.

No, I don't remember a link, nor if the page would still be available,
but I do remember the figure 0.7%.

--
-bts
-This space intentionally left blank.
Jul 20 '05 #36

"DU" <dr*******@hotWIPETHISmail.com> wrote in message
news:c0**********@news.eusc.inter.net...
sinister wrote:


Thanks for the reply. I appreciate your lengthy and informative posts.

Best,

S
[snip]
Jul 20 '05 #37
DU
Barry Pearson wrote:
DU wrote:
[snip]
About 10 billions of webpages can be accessed on the web right now and
about 99% of all of them (according to an W3C estimate) would fail
markup and CSS validations.


[snip]

I have no trouble believing that. But have you a reference to that estimate?


The 10 billions of webpages number comes from google.com.

"Most of the Web sites on the Web are not valid. We may assume that this
is the case for 99% of the Web pages, but there are no statistics to
support this."
taken from a W3C Quality Assurance tutorial:
My Web site is standard! And yours?
http://www.w3.org/QA/2002/04/Web-Quality

DU
Jul 20 '05 #38
"Beauregard T. Shagnasty" <a.*********@example.invalid> wrote in
news:MH*******************@twister.nyroc.rr.com:
Sometime last summer, a young gent posted a link to his master's
thesis in one of these groups. He wrote a program that spidered
several millions of web pages, and validated them.

The result was that 0.7% of these millions were valid HTML.

No, I don't remember a link, nor if the page would still be available,
but I do remember the figure 0.7%.


One problem here is that by definition a page can't be valid HTML if it
doesn't contain a DOCTYPE declaration. That raises the issue of how many
of the 99.3% of invalid pages would in fact be valid according to at least
one recognized HTML DTD if a DOCTYPE had been provided.
Jul 20 '05 #39
DU
Eric Bohlman wrote:
"Beauregard T. Shagnasty" <a.*********@example.invalid> wrote in
news:MH*******************@twister.nyroc.rr.com:

Sometime last summer, a young gent posted a link to his master's
thesis in one of these groups. He wrote a program that spidered
several millions of web pages, and validated them.

The result was that 0.7% of these millions were valid HTML.

No, I don't remember a link, nor if the page would still be available,
but I do remember the figure 0.7%.

One problem here is that by definition a page can't be valid HTML if it
doesn't contain a DOCTYPE declaration.


WDG validator will include the transitional DTD as default when doing a
validation.

WDG HTML Validator
http://www.htmlhelp.com/tools/validator/

That raises the issue of how many of the 99.3% of invalid pages would in fact be valid according to at least
one recognized HTML DTD if a DOCTYPE had been provided.


Not really. If a page does not have a doctype declaration, then how do
you believe its whole code has been validated in the first place by the
W3C validator?

I can not imagine a single web developer out there editing a perfectly
valid page with a doctype declaration who validates his pages with the
W3C validator and then, after getting the "Valid!" results, would remove
the doctype declaration.

The doctype decl. is important for other purposes: to trigger well above
80% of all browsers (MSIE 6, all Mozilla-based browsers, Opera 7.x) in
use out there into standards compliant rendering mode (preferable for
tons of reasons) or not. No doctype decl. automatically means your
webpage will always be using a backward compatible rendering mode where
errors are deliberately "corrected", tolerated and dealt with.

DU
Jul 20 '05 #40
Quoth the raven named DU:
Eric Bohlman wrote:
"Beauregard T. Shagnasty" <a.*********@example.invalid> wrote in
news:MH*******************@twister.nyroc.rr.com:
Sometime last summer, a young gent posted a link to his
master's thesis in one of these groups. He wrote a program that
spidered several millions of web pages, and validated them.

The result was that 0.7% of these millions were valid HTML.

No, I don't remember a link, nor if the page would still be
available, but I do remember the figure 0.7%.

...because I've read _The Seven Percent Solution_.
One problem here is that by definition a page can't be valid HTML
if it doesn't contain a DOCTYPE declaration.


WDG validator will include the transitional DTD as default when
doing a validation.


...and at this point I don't remember how the thesis described the
methods used. Being a thesis, there were many rules. <g> The program
he wrote did its own validation as I recall, rather than piping the
pages to the W3C or the WDG.

I also remember that the thesis was a 6+ MB document download.

<schnip>

--
-bts
-This space intentionally left blank.
Jul 20 '05 #41
DU wrote:
Barry Pearson wrote:
DU wrote:
[snip]
About 10 billions of webpages can be accessed on the web right now
and about 99% of all of them (according to an W3C estimate) would
fail markup and CSS validations.

[snip]
I have no trouble believing that. But have you a reference to that
estimate?


The 10 billions of webpages number comes from google.com.

"Most of the Web sites on the Web are not valid. We may assume that
this is the case for 99% of the Web pages, but there are no
statistics to support this."
taken from a W3C Quality Assurance tutorial:
My Web site is standard! And yours?
http://www.w3.org/QA/2002/04/Web-Quality


Thanks. And thanks to Beauregard T. Shagnasty.

I validate my pages, and my target for new pages is 4.01 Strict. But I don't
really expect it to increase the penetration of those pages. Users will tend
to use tolerant browsers. I validate to check my own workflow.

I suspect that others' invalid pages will continue to be accessible. And I
mean accessible in the sense of accessible to blind people, etc. This is a
statement from a site that is admired by some as a model of an accessible web
site: "In creating the design, we use HTML to v3.2 standard but without the
use of framesets, graphics (beyond our logo!), cascading style sheets, and
browser scripts (such as JavaScript)."

OK - potentially-valid, perhaps (although without a DOCTYPE). But an example
of how different "valid at W3C" and "usable & accessible" are.

--
Barry Pearson
http://www.Barry.Pearson.name/photography/
http://www.BirdsAndAnimals.info/
http://www.ChildSupportAnalysis.co.uk/
Jul 20 '05 #42
On Tue, 17 Feb 2004, DU wrote:
Eric Bohlman wrote:

That raises the issue of how many
of the 99.3% of invalid pages would in fact be valid according to at least
one recognized HTML DTD if a DOCTYPE had been provided.
Not really. If a page does not have a doctype declaration, then how do
you believe its whole code has been validated in the first place by the
W3C validator?


What's always baffled me (but why are we discussing this anyway on
this particular group?) is that many of the invalid pages in question
have quite obviously been extruded by software.

If the software understood how to extrude valid HTML, there would be
no particular need for it to provide a DOCTYPE (I'm saying that in a
practical sense, disregarding for the moment the question of what
"Content-type: text/html" is supposed to mean, and what relevance a
DOCTYPE might or might not have to that meaning).
The doctype decl. is important for other purposes: to trigger well above
80% of all browsers (MSIE 6, all Mozilla-based browsers, Opera 7.x) in
use out there into standards compliant rendering mode
A disgusting hack that gets no better with the lapse of time, but yes,
it seems we are left little choice than to fall into line with that
particular piece of nonsense.
No doctype decl. automatically means your webpage will always be
using a backward compatible rendering mode where errors are
deliberately "corrected", tolerated and dealt with.


I'd put it in different words, but no matter how you spin it, it's a
disgusting hack. It's the first time in my experience of programming
(started 1958, if anyone cares) that I've seen bugs deliberately
reproduced, and no attempt made to correct the "code" which needed
them in the first place. And yes, I _am_ aware (and have been since I
first met the term) that mark-up isn't programming, but that isn't the
point.
Jul 20 '05 #43
"Alan J. Flavell" <fl*****@ph.gla.ac.uk> writes:
On Tue, 17 Feb 2004, DU wrote:
Not really. If a page does not have a doctype declaration, then how do
you believe its whole code has been validated in the first place by the
W3C validator?
Nobody who knows the first best thing about it would use a remote
system to perform a frequently needed syntax check; only the kids do
that. That's why they have those fancy buttons over there to stick on
your site.
If the software understood how to extrude valid HTML, there would be
no particular need for it to provide a DOCTYPE
There *is no* particular need to provide a doctype declaration to the
application if the document is fully-tagged, the document doesn't
reference declared entities, the declaration subset doesn't declare
ambiguous content models or the application is known not to be able to
care about any of the preceding points anyway.

For HTML UAs, only the last point applies.

It would make much more sense to provide the doctype declaration to the
authoring software; and that--surprise--is not only possible but even
useful.
(I'm saying that in a
practical sense, disregarding for the moment the question of what
"Content-type: text/html" is supposed to mean, and what relevance a
DOCTYPE might or might not have to that meaning).
Pardon? What relevance might that be?
The doctype decl. is important for other purposes: to trigger well above
80% of all browsers (MSIE 6, all Mozilla-based browsers, Opera 7.x) in
use out there into standards compliant rendering mode


A disgusting hack that gets no better with the lapse of time,


It contradicts standards, punishes people who *exactly* know what they
are doing and in turn rewards the clueless. We call that the realm of
common sense over here (you also don't need to have nails to use a
hammer, because hammers are important for other purposes, like smashing
heads; since this obviously works very well, it must be considered a
good thing).
but yes,
it seems we are left little choice than to fall into line with that
particular piece of nonsense.


I wonder why; some of us have to deal with the corresponding bugs in
IE's older versions of the M$ malware anyway and have no need for
additional bonus bugs that are exclusive to 'standards compliance mode'.

Secondly client-side software can pull MSIE into quirks mode which means
you have the responsibility to test your stuff in quirks mode anyway.
How cool. Doubling the effort for no avail seems to be the primary
motivation of web(so-called)standards evangelism.

Lastly, M$ explicitly says that the results of 'standards compliant
mode' might not be compatible with future versions of IE and outright
warns not to put such documents on fixed media. The kids have been
'fighting for standards'; M$ has given them a toy; the kids are happy.
If I put my general disgust for organized crime aside for a moment, I
have to admit that they are excellent salesmen.
--
| ) 111010111011 | http://bednarz.nl/
-(
| ) Distribute me: http://binaries.bednarz.nl/mp3/aisha
Jul 20 '05 #44
DU
Barry Pearson wrote:
DU wrote:
Barry Pearson wrote:
DU wrote:
[snip]

About 10 billions of webpages can be accessed on the web right now
and about 99% of all of them (according to an W3C estimate) would
fail markup and CSS validations.

[snip]
I have no trouble believing that. But have you a reference to that
estimate?
The 10 billions of webpages number comes from google.com.

"Most of the Web sites on the Web are not valid. We may assume that
this is the case for 99% of the Web pages, but there are no
statistics to support this."
taken from a W3C Quality Assurance tutorial:
My Web site is standard! And yours?
http://www.w3.org/QA/2002/04/Web-Quality

Thanks. And thanks to Beauregard T. Shagnasty.

I validate my pages, and my target for new pages is 4.01 Strict. But I don't
really expect it to increase the penetration of those pages. Users will tend
to use tolerant browsers.


Allow me to rectify your last sentence. You say: "Users will tend
to use tolerant browsers." But when you use a doctype declaration like,
say, HTML 4.01 strict definition, then such browsers (and most users out
there overwhelmingly use recent browsers) are *_no longer tolerant
browsers_*. That is importantissimo to understand about a browser like
MSIE 6 for windows which is used by above 60% of all users out there on
the web.
No one can argue that MSIE 6 for windows when triggered to support
standards compliant rendering mode parses style sheet in a stricter way,
in a conforming way to CSS1. The whole file
http://msdn.microsoft.com/library/de...hancements.asp
explains all this exhaustively and more.

DU

I validate to check my own workflow.
I suspect that others' invalid pages will continue to be accessible. And I
mean accessible in the sense of accessible to blind people, etc. This is a
statement from a site that is admired by some as a model of an accessible web
site: "In creating the design, we use HTML to v3.2 standard but without the
use of framesets, graphics (beyond our logo!), cascading style sheets, and
browser scripts (such as JavaScript)."

OK - potentially-valid, perhaps (although without a DOCTYPE). But an example
of how different "valid at W3C" and "usable & accessible" are.

Jul 20 '05 #45
In article <Bn*************@newsfep3-gui.server.ntli.net>, "Barry Pearson"
<ne**@childsupportanalysis.co.uk> wrote:

I have no trouble believing that. But have you a reference to that estimate?


<http://www.benmeadowcroft.com/me/archive/2003/january.shtml#link25th>
puts it all together along with a link to the original thesis.

leo

--
<http://web0.greatbasin.net/~leo/>
Jul 20 '05 #46
DU wrote:
Eric Bohlman wrote:
That raises the issue of how many
of the 99.3% of invalid pages would in fact be valid according to at
least one recognized HTML DTD if a DOCTYPE had been provided.

Not really. If a page does not have a doctype declaration, then how do
you believe its whole code has been validated in the first place by the
W3C validator?

I can not imagine a single web developer out there editing a perfectly
valid page with a doctype declaration who validates his pages with the
W3C validator and then, after getting the "Valid!" results, would remove
the doctype declaration.


For validation purposes there's no need to include the Doctype. The W3C
validator has a Doctype override feature.
The doctype decl. is important for other purposes: to trigger well above
80% of all browsers (MSIE 6, all Mozilla-based browsers, Opera 7.x) in
use out there into standards compliant rendering mode (preferable for
tons of reasons) or not. No doctype decl. automatically means your
webpage will always be using a backward compatible rendering mode where
errors are deliberately "corrected", tolerated and dealt with.


The Doctype switch is an abomination.
Matthias

Jul 20 '05 #47
DU wrote:
Barry Pearson wrote:

[snip]
I validate my pages, and my target for new pages is 4.01 Strict. But
I don't really expect it to increase the penetration of those pages.
Users will tend to use tolerant browsers.


Allow me to rectify your last sentence. You say: "Users will tend
to use tolerant browsers." But when you use a doctype declaration
like, say, HTML 4.01 strict definition, then such browsers (and most
users out there overwhelmingly use recent browsers) are *_no longer
tolerant browsers_*. That is importantissimo to understand about a
browser like MSIE 6 for windows which is used by above 60% of all
users out there on the web.

[snip]

What I meant was: suppose I was choosing between publishing validated 4.01
Strict, and publishing without a DOCTYPE & perhaps poorly-formed HTML.

I suspect that I could get away with the latter, because users will tend to
use tolerant browsers. They would try to make sense of it, and within limits
would probably succeed.

So what I have gained by publishing valid 4.01 Strict? In fact, according to
your 3rd sentence, perhaps I have made matters worse? Have I actually exposed
my pages to extra scrutiny from browsers that may reveal something that
validation didn't spot?

Or do browsers only become intolerant about the specific things that are
checked by validation, so as long as I validate, and don't just stick a
DOCTYPE in, I'm OK? (Since I *do* validate, I'm OK in that case. But others
who just a DOCTYPE in might cause themselves problems).

--
Barry Pearson
http://www.Barry.Pearson.name/photography/
http://www.BirdsAndAnimals.info/
http://www.ChildSupportAnalysis.co.uk/
Jul 20 '05 #48
Leonard Blaisdell wrote:
In article <Bn*************@newsfep3-gui.server.ntli.net>, "Barry
Pearson" <ne**@childsupportanalysis.co.uk> wrote:
I have no trouble believing that. But have you a reference to that
estimate?


<http://www.benmeadowcroft.com/me/archive/2003/january.shtml#link25th>
puts it all together along with a link to the original thesis.


Thanks. 125 pages to read! Ouch.

--
Barry Pearson
http://www.Barry.Pearson.name/photography/
http://www.BirdsAndAnimals.info/
http://www.ChildSupportAnalysis.co.uk/
Jul 20 '05 #49
Barry Pearson wrote:
DU wrote:
Allow me to rectify your last sentence. You say: "Users will tend
to use tolerant browsers." But when you use a doctype declaration
like, say, HTML 4.01 strict definition, then such browsers (and most
users out there overwhelmingly use recent browsers) are *_no longer
tolerant browsers_*. That is importantissimo to understand about a
browser like MSIE 6 for windows which is used by above 60% of all
users out there on the web.
[snip]

So what I have gained by publishing valid 4.01 Strict? In fact, according to
your 3rd sentence, perhaps I have made matters worse? Have I actually exposed
my pages to extra scrutiny from browsers that may reveal something that
validation didn't spot?


You've just hit upon the central idiocy (there is more than one) of
doctype-sniffing mode-switching browsers. The process depends on an
*irrelevant signal*. The doctype sniffing of the *HTML* file has no
effect whatsoever on the browser's HTML parser. It uses this vague
signal (the presence/absence and form of !DOCTYPE) to alter the
behaviour of the *CSS* parser and the rendering process.

You can place a DOCTYPE that refers to HTML4 or ISO-HTML or any other
flavour you want on your HTML files and the browsers will continue to
happily implement <MARQUEE>s and <BLINK>s, move your <STYLE>s from
BODY to HEAD, and perform other wonders. BUT, they will take the
presence of this totally irrelevant declaration to mean, "Please don't
use the scrollbar colours I have specified." (Why would I include them
in the CSS if I wanted them ignored?) or "Please ignore my width
specification and calculate widths according to IE5 bug nostalgia."
(Why would I include a width property if I didn't understand what it
meant in CSS?)

Or do browsers only become intolerant about the specific things that are
checked by validation, so as long as I validate, and don't just stick a
DOCTYPE in, I'm OK? (Since I *do* validate, I'm OK in that case. But others
who just a DOCTYPE in might cause themselves problems).


No, they don't become intolerant of any of the things HTML validation
will check. You don't need to validate the HTML, just stick the
DOCTYPE declaration in to invoke fussy parsing of CSS. The process
undermines the very meaning of the declaration - you're asserting
"This is validated HTML" (You're not really, but that's what
validation fetishists think the declaration means), but what you
really want to say is, "This is validated CSS." They do this because
there is nothing for them to base their guesswork on in CSS. There is
no equivalent of the DOCTYPE declaration for a CSS file - no "@level
CSS1" or "@level CSS2".

So just put <!DOCTYPE html> on top of the files - you'll get
"standards compliant" rendering and you won't be kidding yourself
about the significance of what you're doing.

--
Karl Smith.
Jul 20 '05 #50

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: sinister | last post by:
From http://www.oreillynet.com/pub/a/javascript/synd/2002/03/01/css_layout.html "Typically CSS layout replaces tables, which are currently the most popular method of placing page elements. There...
16
by: Axel Dahmen | last post by:
Hi, I always thought that "1em" equals one line height. But if I replace <br><hr><br> by <hr style="margin: 1em 0;">
3
by: Vithar | last post by:
I have a database that is being used as sort of a reports data warehouse. I use DTS packages to upload data from all the different sources. Right now I have it truncating the tables and appending...
3
by: MP | last post by:
context: vb6/ ado / .mdb format / jet 4.0 (not using Access - ADO only) - creating tables via ADO (don't have access) - all tables have a primary key (PK) - many of the PK will become FK(Foreign...
135
by: Xah Lee | last post by:
Tabs versus Spaces in Source Code Xah Lee, 2006-05-13 In coding a computer program, there's often the choices of tabs or spaces for code indentation. There is a large amount of confusion about...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.