Loading ...
Sorry, an error occurred while loading the content.

1889Re: [NH] Image Tags and Carriage Returns

Expand Messages
  • Stephen Riddle
    May 31, 2001
      Hi 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
      long line!
      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
      second example,
      <IMG SRC="a.jpg">
      <IMG SRC="b.jpg">,
      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
      bottom edges.
      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!
    • Show all 5 messages in this topic