Re: Html for Beginers



dorayme wrote:

But I am surprised on the history, I would have thought tables were
introduced with their semantics very much in mind (making it more
likely for basic cell borders to be 1px by default) and it would have
been in later years that the influence of layout took hold.

It's easy to get that impression if you read "standards-track" documents (in the broad sense). RFC 1942 appears to be strongly structure-oriented, and all examples there are data tables - but this is partly illusionary, and RFC 1942 (the "HTML Tables" RFC) was a rather faint attempt at defining tables formally in the SGML framework. Its authors obviously didn't care much about SGML approach to tables as presented as an example in the SGML Handbook. HTML 3.2 then describes tables as for data tables and for layout, as a half-hearted compromise.

However, people used to say that Netscape invented HTML tables, and I guess we need to admit they did - producing an implementation that was fundamentally broken in many ways during the lifespan of Netscape, but it was still this initial implementation rather than published drafts and specifications that created the practice of HTML authoring with tables. HTML 3.2 and later HTML 4.0(1) just made it official, adding some features that nobody uses and some features that even weren't ever implemented.

And authors mostly used tables for layout. One of the reasons is that before even half-decent CSS implementations existed, tables were the only way to create anything as simple as a box with borders or colored background.

The default value of the border attribute is not fixed in HTML specs but left as browser-dependent. However, HTML 4.01 verbally specifies frame="void" and rules="none" as the default (though does not define this in the DTD!), but - now comes the really confusing part - setting a value for border also affects the other attributes. Quite a mess, but it is of little practical importance, as we normally set just border="1" and then use CSS for fine tuning, such as suppressing some of the borders if desired.

--
Yucca, http://www.cs.tut.fi/~jkorpela/

.


Quantcast