[Top][All Lists]

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

Re: [Lynx-dev] Inconsistency in formatting of headings in div elements a

From: Thomas Dickey
Subject: Re: [Lynx-dev] Inconsistency in formatting of headings in div elements and body elements
Date: Mon, 30 Apr 2012 05:35:30 -0400
User-agent: Mutt/1.5.18 (2008-05-17)

On Fri, Apr 27, 2012 at 04:10:28PM +0500, Chathranga Ranasingha wrote:
> Hello there!
> First off, this isn't really a Ā»problemĀ« with the application.

...more like a suggestion for improvement ;-)
> I've posted this problem on my distro forum and haven't really gotten the
> answers to my questions. So here I am, mailing you, hoping I can get an
> answer.
> Sometimes it's just my luck that things screw up around me, so I'll just
> give it here as well. This is the original posting on the forums:
> This is the actual problem: putting heading tags *directly* inside the body
> element, like so
> <body>
>   <h1>...</h1>
>   <h2>...</h2>
>   ...
>   <h6>...</h6>
> </body>
> the rendering in lynx is nice, h1 is centered, and the rest of the headings
> are in ascending indents; nice to identify the levels.
> The problem crops up is the headings are inside div's, like so
> <body>
>   <div>
>     <h1>...</h1>
>     <h2>...</h2>
>     ...
>     <h6>...</h6>
>   </div>
> </body>
> the rendering has completely lost all that nice formatting that made it
> easy to identify the levels.
> So, basically I just want to know the reason why this happens (I'm not
> treating this as a bug) . Div is for presentational, I understand, and lynx

Not exactly - quoting the HTML4.0

   The DIV and SPAN elements, in conjunction with the id and class
   attributes, offer a generic mechanism for adding structure to
   documents. These elements define content to be inline (SPAN) or
   block-level (DIV) but impose no other presentational idioms on the
   content. Thus, authors may use these elements in conjunction with
   style sheets, the lang attribute, etc., to tailor HTML to their own
   needs and tastes.

> doesn't support CSS, but I think this is kind of breaking the semantics,
> since most of the websites out there use extensive styling.

I'm not familiar with this chunk, but reading the source it appears that
lynx is making checks for the context in which the DIV is used, but none
of the checks are against headers (they're against OL, UL, etc).  It sets
a paragraph style which is (probably...) changing the defaults used for
the headers.

To "impose no other presentational idioms", in effect, lynx has to see the
context in which it is used to pass information from one level to another.
And the grouping would have some effect.

For what it's worth, w3m does the same here.

Thomas E. Dickey <address@hidden>

Attachment: signature.asc
Description: Digital signature

reply via email to

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