1889Re: [NH] Image Tags and Carriage Returns
- May 31, 2001Hi Mike,
I'm not sure if I can explain it but that has never stopped me before.
The browser always condenses white space unless told to do different. If
you have this line somewhere in your document:
I am a
It will be rendered:
I am a long line.
However if you have this line:
I a m a l o n g l i n e .
The browser will render it as it is typed.
In html, everything is basically a letter.
If you have an image 30 pixels high and wide, in a line of text, unless
you use attributes or css or some other such command, the browser moves
the line of text down far enough to fit this huge letter (as if it were
a really fancy capital letter.)
So your first example,
<IMG SRC="a.jpg"><IMG SRC="b.jpg">,
is rendered as if it is a two letter word made of two images. Your
is rendered as if it is two one letter words each consisting of an
When you have an element, links are notorious for this, and there is
white space between the closing bracket of the opening tag and the
content of the element, the white space is considered part of the
element. That's why you see links with blue lines extending from the
I think that is basically it. When I first learned HTML, I was told
that white space was negligible.
You found out it is not.
Keep on learning, and may all your lessons be fun!
- << Previous post in topic Next post in topic >>