[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: lynx-dev <DIV>-tag formatting

From: David Woolley
Subject: Re: lynx-dev <DIV>-tag formatting
Date: Sat, 16 May 1998 12:15:54 +0100 (BST)

> I had read the specs, it gives the following example:
> <P>aaaaaaaaa<DIV>bbbbbbbbb</DIV><DIV>ccccc<P>ccccc</DIV>
>    This is typically rendered as:
The spec is advisory only, so you can't really declare a bug on this,
only a wishlist item.

> aaaaaaaaa
> bbbbbbbbb
> ccccc
> ccccc
>    Your user agent renders this as follows:
>    aaaaaaaaabbbbbbbbbccccc
>    ccccc

This would be expected behaviour for HTML 3.2 (DIV is undefined and ignored.
Note that DIV has almost no semantics other than it is a block type element;
it is intended to be used with classes and styles, neither of which Lynx
supports, to allow arbitrary semantics to be defined).

> So it seems that your example is indeed a bug in Lynx because the starting
> columns should be the same for both paragraphs. 

Lynx is incompatible with CSS1, in that indenting is not always relative to
the container, but there is no general requirement in HTML that nested
structures should or should not be indented with respect to their parent.

> Anyway, another tag problem:
> Shouldn't the alignment of <H1> is left by default instead of centre? 
> HTML 4.0 only says 'Visual browsers usually render more important headings
> in larger fonts than less important ones', but nothing about its default
> alignment (unless using 'align=' attribute or style sheet).  So I assume
> <H1> should use the previously defined alignment in Lynx, or document
> default (left) if none exist.

Earlier HTML specs suggested centred alignment (the sample style sheet for
HTML 2.0, in CSS1, the stylesheet standard that is half implemented by
current GUI browsers, sets H1 to centred).  The removal of this guideline
is probably the result of codifying abuse by the original GUI browsers.  In
any case, the CSS rules say that, in the absence of document style, the 
user style applies, and in default of that, the browser's style applies.
Lynx has an implicit:

H1 { text-align: center }

which is its right.

The most important thing to remember is that HTML is about structure, not

Generally, if you want precise layout with current generation browsers,
you need to use PDF, not HTML.  If you want it with next generation 
browsers, PDF is probably still better, but to do it with HTML you must use
style sheets.  Lynx doesn't yet properly support style sheets, but rather
than worrying about Lynx's choice of default styles, it would be a much
better thing, although, unfortunately much more work than a single tweak of
the style of one element, to implement style sheets.  Once you have that
support, you can provide the default style sheet so the users can easily
customise the appearance.

(If you want to tweak, the obvious changes to these lines in DefaultStyle.c
should do it (version 2.7.2):

PRIVATE HTStyle HTStyleHeading1 = {
        &HTStyleNote,  "Heading1", "H1",
        HT_FONT+HT_BOLD, 1, HT_BLACK,   0, 0,
        0, 0, 0, HT_CENTER,             1, 0,   0,
        YES, YES, 1, 1,                 0 };

i.e. HT_CENTER becomes HT_LEFT)

reply via email to

[Prev in Thread] Current Thread [Next in Thread]