
Signature
Jukka K. Korpela ("Yucca")
http://www.cs.tut.fi/~jkorpela/
> Since there is no authoritative specification on how to map presentational
> HTML elements and attributes to CSS, and even no informal description (as
[quoted text clipped - 6 lines]
> things anyway, and people seem to ask rather often questions like "what's
> valign in CSS?"
<br style="clear: both"> for <br clear="all"> is an interesting one.
Clear is only supposed to apply to block-level elements. The value of
display for <br> is not specified in Appendix D of CSS 2.1, which makes
it the default, inline, which is also what I would expect. So
technically, setting the clear property on <br> ought to be ignored,
just as it would be if you set it on <span> or <em>. But most browsers
I've tried allow it, as an alternative to using the clear attribute.
I suppose you could have <div style="clear: both"></div>. Content after
the clearing div will start a new anonymous block nested inside the one
you were in. That is mostly equivalent but there are I think ambiguities
here when it comes to containing blocks.
In this example,
<div style="height: 400px">Hello
<div style="clear: both"></div>
world
<div style="height: 50%; width: 20px; background-color: blue"></div>
</div>
should the 50% mean anything? It depends what is the containing block
for the second div: the outer div, which has a fixed height or the
auto-height anonymous block that begins before "world"? If the latter,
the 50% should be ignored.
In this case however:
<div style="height: 400px">Hello
<br clear="all">
world
<div style="height: 50%; width: 20px; background-color: blue"></div>
</div>
the 50% should definitely work out as 200px since there is no ambiguity
about which block is the containing block for the second div. The <br>
is just an inline element which causes a line break and there are no
anonymous blocks.
So arguably browsers should treat these two examples differently. If
they should, then there is no CSS equivalent to <br clear="all">.
A quibble is that you say "border-spacing: npx" for each cell. But you
set border-spacing on the table, not on the cells, and it is really a
property of the table.
> Since there is no authoritative specification on how to map
> presentational HTML elements and attributes to CSS, and even no informal
> description (as far as I can see), I finally composed one:
> http://www.cs.tut.fi/~jkorpela/html2css.html
Nice, Jukka, thanks. I hadn't realized there wasn't something like this
around already. I guess there's probably something on about.com or
similar, but that'd be rather "non-authoritative," wouldn't it?
> The idea was to create something simple, but now it looks rather messy.
Well, it could stand a bit of a textual introduction at the top, even if
it's only a tip to see the Legend [linked] below.
> Anyway, maybe it's of some use. I do _not_ recommend converting old
> pages (using presentational HTML) to anything, in general, but people do
> such things anyway, and people seem to ask rather often questions like
> "what's valign in CSS?"
I gather this is your description of things which should work
equivalently, without much regard for browser bugs or lack of support in
one or the other UA. You might want to make clearer what level(s) of CSS
you are listing. From your first note it seems you've just grabbed
equivalents out of the CSS cupboard, without mentioning whether it came
out of the 2.1 drawer or the 3.0 drawer.
Is there some universal definition for terms like fontlist and htmlsize,
or are we just supposed to know what you mean (I _do_, but I'm also
compulsive enough to check for the explanation or link, and I don't see
one)?
For some reason, when I try to print the page in FF, the first printed
page ends after the first rox of table content (element
align="bottom">). The second page starts with <element align="center">,
and all of the other pages print full of content. I don't see why, and
my other browsers don't seem to have this problem, so I guess it's just
a bug in my installation here.
Corrigenda:
1) Search for
<span class="x">foo</b> and you would additionally write .x {
font-weight: bold;
Change the /b to /span.
Add a closing brace }.
2) Search for
subscripting may change the meaning of and expression.
Remove the d from "and".
3) Search for
functional rather than presentation.
Possibly change to "presentational".
Thanks for sharing, Jukka.

Signature
John
Stan Brown - 24 May 2007 12:46 GMT
Thu, 24 May 2007 00:02:01 +0200 from John Hosking
<John@DELETE.Hosking.name.INVALID>:
> For some reason, when I try to print the page in FF, the first printed
> page ends after the first rox of table content (element
> align="bottom">). The second page starts with <element align="center">,
> and all of the other pages print full of content. I don't see why, and
> my other browsers don't seem to have this problem, so I guess it's just
> a bug in my installation here.
If it's a problem in your installation then it's a problem in mine as
well. I'm using Mozilla 1-point-something, print margins set to 1
inch all around. If I change the margins to .5 all around, Mozilla
does a better job of breaking the table across the page boundary.
Mozilla and Firefox seem to have terrible trouble printing tables
that won't fit entirely within one page. It's very frustrating. For
example, in printing this schedule for my students
http://www.tc3.edu/instruct/sbrown/stat58/sked.htm
a difference of literally a tenth of an inch in the top or bottom
margin makes the difference between the *entire* table moving to page
2 (most of page 1 then being blank), and keeping 90% of the table on
page 1.

Signature
Stan Brown, Oak Road Systems, Tompkins County, New York, USA
http://OakRoadSystems.com/
HTML 4.01 spec: http://www.w3.org/TR/html401/
validator: http://validator.w3.org/
CSS 2.1 spec: http://www.w3.org/TR/CSS21/
validator: http://jigsaw.w3.org/css-validator/
Why We Won't Help You:
http://diveintomark.org/archives/2003/05/05/why_we_wont_help_you
Jonathan N. Little - 26 May 2007 16:08 GMT
> Mozilla and Firefox seem to have terrible trouble printing tables
> that won't fit entirely within one page. It's very frustrating. For
> example, in printing this schedule for my students
Not sure which browser you find does a proper job, FF2.0.0.3 or
SeaMonkey (You do know SeaMonkey replaces Mozilla and Mozilla is no
longer supported) Prints the tables just find, if a 70% fits all on one
page or at 100% on two pages *and* repeats the table heading row on the
second page. MSIE 6* (Maybe 7 fixes this) does not repeat the table
heading...
> http://www.tc3.edu/instruct/sbrown/stat58/sked.htm
>
> a difference of literally a tenth of an inch in the top or bottom
> margin makes the difference between the *entire* table moving to page
> 2 (most of page 1 then being blank), and keeping 90% of the table on
> page 1.

Signature
Take care,
Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com
David Stone - 24 May 2007 12:56 GMT
> > Since there is no authoritative specification on how to map
> > presentational HTML elements and attributes to CSS, and even no informal
[quoted text clipped - 9 lines]
> Well, it could stand a bit of a textual introduction at the top, even if
> it's only a tip to see the Legend [linked] below.
Agreed about the brief introduction - something along the lines of
Jukka's starting post in this thread would be good. Personally, I'm
not sure about explicitly hinting about the links to the legend,
since it's pretty obvious that clicking on a link is going to get
you more information. On the other hand, a line mentioning that
further details are presented in the legend below the table would
be good - the legend contents make good reference reading in their
own right.
My only other comment would be to avoid the use of red as a text
colour in the "html mark-up" column, given the prevalence of
red-green colour blindness and the marked gender imbalance
of its occurrence?
David Stone - 24 May 2007 13:55 GMT
I hate self-follow-ups, but...
> > > Since there is no authoritative specification on how to map
> > > presentational HTML elements and attributes to CSS, and even no informal
[quoted text clipped - 12 lines]
> Agreed about the brief introduction - something along the lines of
> Jukka's starting post in this thread would be good.
[snip]
Actually, the opening paragraph of the legend should probably be at the
top, preceding the table. It makes a great introduction to what its
all about!
Jukka K. Korpela - 24 May 2007 18:01 GMT
Scripsit John Hosking:
> Well, it could stand a bit of a textual introduction at the top, even
> if it's only a tip to see the Legend [linked] below.
I avoided an introduction in order to make the page work better as a
reference material - and to make the table print on two pages (hopefully).
But I now added a very short intro and a link there (with CSS code that
omits it on printing).
> I gather this is your description of things which should work
> equivalently, without much regard for browser bugs or lack of support
> in one or the other UA.
Well, rather a description of how things might work.
> You might want to make clearer what level(s)
> of CSS you are listing. From your first note it seems you've just
> grabbed equivalents out of the CSS cupboard, without mentioning
> whether it came out of the 2.1 drawer or the 3.0 drawer.
Unless I'm mistaken, all the features discussed belong to both CSS 2.0 and
the CSS 2.1 draft.
> Is there some universal definition for terms like fontlist and
> htmlsize, or are we just supposed to know what you mean (I _do_, but
> I'm also compulsive enough to check for the explanation or link, and
> I don't see one)?
They are generic placeholders for "anything that might be used here". I find
it difficult to explain the idea, so I hope it works intuitively.
> For some reason, when I try to print the page in FF, the first printed
> page ends after the first rox of table content (element
> align="bottom">).
It didn't happen to me, but it started happening when I added a three-liner
note after the main heading (and didn't use CSS to tell browsers to drop it
on printing as I did later). I'm puzzled but I can't tell what to do with
this.
(The observed difference might depend on different paper sizes; I'm using
A4.)
> Corrigenda:
Thanks, I tried to fix them.
Also thanks to others who commented and suggested corrections. I've modified
some wordings, though I guess they are still somewhat vague.

Signature
Jukka K. Korpela ("Yucca")
http://www.cs.tut.fi/~jkorpela/
> Since there is no authoritative specification on how to map presentational
> HTML elements and attributes to CSS, and even no informal description (as
> far as I can see), I finally composed one:http://www.cs.tut.fi/~jkorpela/html2css.htm
the basefont link is broken
you have "bf" in id of heading but "basefont" in anchor's href.
> Since there is no authoritative specification on how to map presentational
> HTML elements and attributes to CSS, and even no informal description (as
> far as I can see), I finally composed one:http://www.cs.tut.fi/~jkorpela/html2css.html
<br><element> element:before { content: "\A"; white-space: pre; }
^^ appears twice
> Since there is no authoritative specification on how to map presentational
> HTML elements and attributes to CSS, and even no informal description (as
> far as I can see), I finally composed one:http://www.cs.tut.fi/~jkorpela/html2css.html
This is not HTML to CSS-
<dir>content</dir> ->> <ul>content</ul>
<menu>content</menu> ->> <ul>content</ul>
Why the size link on this line :
<nobr>content</nobr> ->> <span style="white-space: nowrap">content</
span> (size)
Why not white-space:pre ?? :
<pre>content</pre> ->> <div style="white-space: nowrap">content</
div>
suggestion-
put these in one line
<s>content</s> -> <span style="text-decoration: line-
through">content</span>
<strike>content</strike> -> <span style="text-decoration: line-
through">content</span>
group some elements like:
<b>,<i>,<u>,<s>
e.g.
<b>content</b> -> <span style="font-weight: bold">content</span>
<i>content</i> -> <span style="font-style: italic">content</span>
> Since there is no authoritative specification on how to map presentational
> HTML elements and attributes to CSS, and even no informal description (as
> far as I can see), I finally composed one:http://www.cs.tut.fi/~jkorpela/html2css.htm
the basefont link is broken
you have "bf" in id but "#basefont" in anchor's href
> http://www.cs.tut.fi/~jkorpela/html2css.html
Are you joining the Friends of DIV Layout, Jukka?
This is disappointing. One should avoid the meaningless SPAN and DIV
as far as possible. We can discuss whether to write <I> or <EM>
in a given situation. But SPAN with a style is worse! It's not
even necessary for HTML 4 Strict since <B> and <I> are in Strict.
Please remove
b, bdo, big, blockquote, br, col, i, small, sub, sup
and possibly U from your list! You can *additionally* style
these elements but I can see no advantage in replacing them
by meaningless SPAN.
A word on BDO:
BDO markup is mostly *not* presentational. See the examples at
http://www.unics.uni-hannover.de/nhtcapri/bidirectional-text.html#bdo
On the other hand, <H1> from
http://www.unics.uni-hannover.de/nhtcapri/bidirectional-text.html
is clearly presentational. So we should distinguish between
BDO markup and unicode-bidi style.

Signature
In memoriam Alan J. Flavell
http://groups.google.com/groups/search?q=author:Alan.J.Flavell
Andy Dingley - 25 May 2007 10:37 GMT
On 24 May, 16:50, Andreas Prilop <AndreasPrilop2...@trashmail.net>
wrote:
> One should avoid the meaningless SPAN and DIV as far as possible.
As far _as_possible_
There's nothing wrong with <span> or <div>, just that something else
better ought to be used if a suitable element exists. In a great many
cases there doesn't, so use the anonymous elements.
<span class="..." > is also better than <span style="..." > or <span>
(in most situations).