lynx-dev
[Top][All Lists]
Advanced

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

Re: lynx-dev <p>...</p><pre>...</pre>


From: Chuck Martin
Subject: Re: lynx-dev <p>...</p><pre>...</pre>
Date: Sat, 1 May 1999 22:01:34 -0400

On Sat, May 01, 1999 at 10:12:12PM +0200, Karl Eichwalder wrote:
> 
> If you don't close the first paragraph, it's even impossible to force
> lynx to display the needed blank line.  Please note, that every PRE
> element closes the previous block element (have a look at the HTML DTD).

Are you sure about that?  In http://www.w3.org/TR/PR-html40-971107/html40.txt,
it says:

| 9.3.4 Preformatted text: The PRE element
|
| <!ENTITY % pre.exclusion "IMG|OBJECT|BIG|SMALL|SUB|SUP">
|
| <!ELEMENT PRE - - (%inline;)* -(%pre.exclusion;) -- preformatted text -->
| <!ATTLIST PRE
|   %attrs;                              -- %coreattrs, %i18n, %events --
|   >

Doesn't that "%inline;" mean that <PRE> is supposed to be inline text?
And doesn't that mean that you should be able to include it in the
middle of a block of text without it starting a new line?  Lynx doesn't
currently do this, but that's what the 4.0 spec sounds like to me.  In
the above-mentioned document, it says:

| 7.5.3 Block-level and inline elements
|
| Certain HTML elements that may appear in BODY are said to be "block-level"
| while others are "inline" (also known as "text level"). The distinction is
| founded on several notions:
|
| Content model
|      Generally, block-level elements may contain inline elements and other
|      block-level elements. Generally, inline elements may contain only data
|      and other inline elements. Inherent in this structural distinction is
|      the idea that block elements create "larger" structures than inline
|      elements.
| Formatting
|      By default, block-level elements are formatted differently than inline
|      elements. Generally, block-level elements begin on new lines, inline
|      elements do not. For information about white space, line breaks, and
|      block formatting, please consult the section on text.
| Directionality
|      For technical reasons involving the [UNICODE] bidirectional text
|      algorithm, block-level and inline elements differ in how they inherit
|      directionality information. For details, see the section on inheritance
|      of text direction.

That paragraph under "Formatting" sure sounds like <PRE> shouldn't force
a new line at the beginning, let alone a blank line preceding it.  Am I
misinterpreting this?

Chuck


reply via email to

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