469,891 Members | 2,139 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,891 developers. It's quick & easy.

Meaning of <font> without attributes

This is pretty theoretical, but it might matter if you convert existing HTML
documents to more modern style, getting rid of <fontmarkup.

One might expect that just removing all attributes from a <fonttag would
make it dummy, no-op. But I just realized that IE 7 doesn't behave that way.
If I have

<big>foo <font>bar</font</big>

then bar appears as smaller than bar. Apparently, the browser implies
size="3". Is this acceptable by the specifications?

If I have

<big>foo <font color="red">bar</font</big>

then foo and bar appear in the same size, i.e. size="3" is _not_ implied by
the browser. This is not consistent at all, of course. Apparently someone
that since <fontalone does not make sense, some attribute needs to be
implied. (Yet <fontcould be used for styling and in scripting, or it might
be a holdover after the intentional removal of attributes.)

--
Jukka K. Korpela ("Yucca")
http://www.cs.tut.fi/~jkorpela/

Dec 15 '06 #1
1 1957

Jukka K. Korpela wrote:
If I have

<big>foo <font>bar</font</big>

then bar appears as smaller than bar. Apparently, the browser implies
size="3". Is this acceptable by the specifications?
Why does it matter? If you're concerned with refactoring legacy code,
then the behaviour that matters as your initial state is the actual
behaviour of the browser, not the expected behaviour from the
specification.

Dec 15 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

7 posts views Thread by Louis. | last post: by
reply views Thread by Darren Li | last post: by
3 posts views Thread by Dan Jacobson | last post: by
17 posts views Thread by teser3 | last post: by
reply views Thread by Salome Sato | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.