Format of HTML Source Output

Neil Hodgson neilh at hare.net.au
Thu Mar 30 00:40:13 EST 2000


[Bill Explains]
> [Joseph Queries]
>
> |Would outputting \n and other escaped characters
> | work without disrupting the browser-viewed
> | HTML document?
>
> Yes sir.  That is what you do.  It will not disturb the formatting of the
> browser viewed document unless you place the characters within a tag.

   While this is how HTML is supposed to work, its not the case with common
browsers. The results of adding whitespace sometimes causes small but
unpleasant insertions of whitespace in the display which may wreck carefully
contrived layouts.

   Most of the time you should try to produce readable HTML with short lines
and indentation, as you will need to debug it, but check the results in all
your target browsers.

   Neil






More information about the Python-list mailing list