Width of http://www.gentoo.org/doc/build.html

Lars Knoll lars at trolltech.com
Fri Jun 14 11:12:15 BST 2002


> On Friday 14 June 2002 1:34 am, Koos Vriezen wrote:
> |  On Thu, 13 Jun 2002, Rolf Magnus wrote:
> |  > On Thursday 13 June 2002 22:18, Koos Vriezen wrote:
> |  > > Hi,
> |  > >
> |  > > This page is rendered by khtml very wide, its hardly readable.
> |  > > Attached a small fragment of this page, that's already too wide. It
> |  > > seems to be the combination of FONT tags inside PRE tags inside a
> |  > > table cell. Is this a known problem?
> |  >
> |  > I don't know if it's a known problem in khtml, but it's broken html.
> |  > <font> tags aren't allowed in <pre>.
> |
> |  Ok, what about this page
> |  http://www-106.ibm.com/developerworks/java/library/j-javaopt/?loc=j
> |  They use SPAN inside PRE tags. Substituting font with span, in the test
> |  case, is rendered also too wide. Seems to help to %s/<span [^>]*>//g and
> |  %s/<\/span>//g in vi on this page.
> |  Is SPAN also not allowed?
>
> ANY tags are not allowed inside <pre>.
> IMO, KHTML should just ignore such tags inside.

This is wrong. Here's the HTML 4 dtd specification for <pre>:

<!ENTITY % pre.exclusion "IMG|OBJECT|BIG|SMALL|SUB|SUP">

<!ELEMENT PRE - - (%inline;)* -(%pre.exclusion;) -- preformatted text -->
<!ATTLIST PRE
  %attrs;                              -- %coreattrs, %i18n, %events --
  >

Which means any inline element is allowed inside <pre> except for the ones in 
pre.exclusion.

Lars

> As about IBM pages - well, they are known to have crappy HTML :-(
> Unfortunately, none of major IT companies takes care to check their pages
> with Validator.
>
> |  Koos





More information about the kfm-devel mailing list