Re: [Re: formatting html code]
by Raymond Vazquez <r.j.vazquez(at)usa.net>
|
Date: |
25 Mar 99 16:03:44 EST |
To: |
Kayla Block <kblock(at)placeware.com>, hwg-software(at)hwg.org |
|
todo: View
Thread,
Original
|
|
Kayla Block <kblock(at)placeware.com> wrote:
> I haven't seen this documented anywhere and much of it seems to be
> idiosyncratic. But one of my co-workers writes the most beautiful html =
I've
> ever seen so I have learned to use his as a role model. (He also writes=
the
> prettiest Java and Javascript code I've ever seen.)
> =
> He uses an indent space of 2 for html. (Other programming languages usu=
ally
> use 4 but the nature of html makes an indent of 4 unwieldy.) Any contai=
ner
> tags are on their own separate line. The contents between the open and
> close tag are on a separate line and also indented by 2 spaces. This wa=
y of
> writing html usually makes problems become pretty obvious.
> =
> I can type in an example better than I can explain it:
> =
> <table>
> <tr>
> <td>
> <font size=3D"+1">
> <b>
> Here is some text.
> </b>
> </font>
> </td>
> <td>
> Here is some more text.
> </td>
> </tr>
> <tr>
> <td>
> And yet more text.
> </td>
> </tr>
> </table>
> =
Kayla:
In theory, I agree with you and your co-worker. The two-space indent is
better suited to HTML than four. The only difficulty I have with youe ex=
ample
is many UA's (including most versions of IE and NN/C) will insert extra s=
pace
before and after content of <td> if they are on there own line. Not a big=
deal
for text, but when you use a table to piece an image back together, it's =
a
problem. Just my two cents...
Raymond Vazquez
r.j.vazquez(at)usa.net - Home/Personal
raymond(at)rga.com - Work/Professional
http://www.msu.edu/~vazquezr/
PCS: 917.327.2811
____________________________________________________________________
Get free e-mail and a permanent address at http://www.netaddress.com/?N=3D=
1
HWG: hwg-software mailing list archives,
maintained by Webmasters @ IWA