Floating objects.

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
<CITE src="http://www.w3.org/TR/html401/present/graphics.html#h-15.1.3 ">
15.1.3 Floating objects
Images and objects may appear directly "in-line" or may be floated to one
side of the page, temporarily altering the margins of text that may flow on
either side of the object.

What does it mean "text" and "margins of text" here?

Can I describe text as sequence of words taken from consequent paragraphs,
where paragraph boundaries just sort of LF or <BR> ?

If yes, I believe that results of rendering of the following:

http://blocknote.net/tests/30.htm is just wrong for IE, NS, Opera and Amaya.

If now, what does text mean exactly?  Could somebody point on formal

And I guess that "floated to one side of the page" is not a case anymore.

Are these problems of non-deterministic standard or rather existing

Could somebody shed a light on this part of standard?

Thanks in advance.

Andrew Fedoniouk.

Re: Floating objects.

Quoted text here. Click to load it
src="http://www.w3.org/TR/html401/present/graphics.html#h-15.1.3 ">
Quoted text here. Click to load it
flow on

Text is the visible words.  They are displayed within established
margins.  In your first paragraph, you have specified width=50%.  That
establishes the margins within which the text will be displayed.

Quoted text here. Click to load it

Not exactly.  A paragraph starts with <p> and ends with the start of the
next block element, which could be another <p> or something else.
Although it is not required to end a paragraph with </p>, it is good
practice to do so.  <br> does not end a paragraph, nor does LF in the

Quoted text here. Click to load it

See below.

Section 9.2.2 of the CSS2 specification, at
http://www.w3.org/TR/REC-CSS2/visuren.html#q7 , is probably what you
want, but it won't make much sense out of context.

Quoted text here. Click to load it

Better wording would have been "floated TOWARD one side of the page".
It floats TO the current MARGIN, which may not be at the page edge (and
isn't in your test case.)

Also, the recommended method for requesting a float has changed (note
that the HTML align="right" is shown as a DEPRECATED example in the
paragraph you refer to, meaning there is now a better way, using CSS).
Still, the old way should work.

Quoted text here. Click to load it

The folks who wrote the standard intend it to be deterministic, up to a
point, beyond which they usually say 'is outside the scope of this
specifiecation".  Sometimes they aren't as clear as needed; sometimes
implementors don't read carefully enough.

Quoted text here. Click to load it

Here's what I see:
 - In IE 5.5 for Windows, the words 'one two three' appear together in
the upper left corner of the bordered <p> block, as expected.  The image
appears against the right margin of that block, also as expected, since
the image is logically (at the time of the HTML 4.01 spec) INSIDE the
paragraph, but has been floated to the right.  The top of the image is
positioned one line down from the top of the block.  The spec says
"Floating objects generally begin a new line.", so that's consistent.
  The second paragraph has no specified width, so the viewport (window)
width is used, thus the paragraph block extends clear across the page
and contains the text, as expected.
  So, I think IE 5.5 does what you asked, as its developers interpreted
the spec.

 - In Netscape 7.1,  the results are different.  The first paragraph box
is only one line high, containing the three words, and 50% of the screen
width.  That's fine.
  The floated image appears next (moving downward), in the same location
as for IE, but it is outside the bordered paragraph box, i.e. it has
been removed from the 'Normal' flow, (using CSS terminology), and
floated to the right margin (previously established by the paragraph
  Next comes the second paragraph box, which extends clear across the
page again, slipping UNDER the image.  The text itself, however, cannot
pass the new right margin defined by the left side of the image, so it
spills to a second line.
  So Netscape did the right thing too, just using a slightly newer
definition of 'right'.

The problem is twofold:
  First, things change.  One standard gets partially obsoleted by
another.  Descriptions are clarified in response to incorrect browser
  Second, there are ambiguities in any communication.  The W3C folks try
to be crisp, but there are economic pressures on browser developers to
deliver products quickly or with a bias toward their own proprietary
features.  That may cause them to read too carelessly or with an
unanticipated bias.
  The result is that the presence of standards has not produced browsers
that render every page consistently with each other, hence most of the
discussion on these fora.

What should you do?  Get a basic understanding of HTML (which I think
you've done).  Then go through the HTML spec again.  EACH TIME you come
to something DEPRECATED, jump over to the CSS2 spec and learn how to do
it using today's technology.  (The CSS1 spec wording isn't as crisp,
especially in the area you're looking at).

Oh, and put an appropriate  <doctype> at the top of every HTML page.  It
will tell the browser which version of HTML you are trying to use (which
may affect its behavior), and will allow you to run the page through the
W3C HTML validator (http://validator.w3.org /).

Chris Beall

Re: Floating objects.

Quoted text here. Click to load it

Yes, you *can*.  But in old HTML you *could* use <font> and <br> to do
almost as much damage to your document.

Quoted text here. Click to load it

CSS is optional.

<div class="looklikeh1">My Page</div>

<div class="looklikep">My Paragraph <span class="looklikestrong">has

:: In CSS supporting browser

*My Page*

My Paragraph *has emphasis*

:: In non-CSS supporting browser

My Page
My Paragraph has emphasis

HTML is a language for describing the structure of the document - so
if there's an element that exists that has the desired meaning, it
should be used in preference to a generic element such as <div> or

<h1>My Page</h1>
<p>My Paragraph <strong>has emphasis</strong></p>


Re: Floating objects.

Hi Chris.

Agreed with you by(on?) 100% !

My point: standard must force to use e.g. <EM> instead of anything else. It
just shouldn't allow to do that.
And FONT by the way. In those cases when changing font color for example
does not have any semantic meaning.

And what is it style="display:table"? What for? Where we are going to use
it? With which tag?

XML+CSS is our future?  We are loosing letter 'T' in the word HTML....

Andrew Fedoniouk.

Quoted text here. Click to load it
Quoted text here. Click to load it

Site Timeline