[thelist] Spaces instead of tabs, (was: anyone spot the software....)

Mark Howells mark at mountain.ch
Fri Mar 22 17:35:01 CST 2002


> IMHO tabs are much easier when editing via Notepad or Homesite, or the like.
> It takes less effort to move the cursor around and it's much easier on the
> eyes.  Plus it's more consistent throughout because it only takes 1 tab
> instead of 2, 3, 5 or 7 spaces, whatever your style may be.
>
> But you're right, tabs can sometimes be "misconstrued" depending on the
> platform and/or editor, strangely.  A space is always a space, but a tab can
> differ.

I use tabs because they create the same amount of white space with less
physical characters.

Three further notes:

<tip type="Optimising your HTML" author="mark at mark.ac">

- If you're coding a large and code-intensive HTML page, removing all the
tabs can save you a few kb on the overall file size, making the page load
quicker in the long run.

- Many HTML editors create Javascript code directly in the <head> of the
page, particularly code for Javascript rollovers, browser detection and
layer manipulation. If you don't have the Javascript expertise to use your
own functions instead of the automated solutions, cut the generated
Javascript from the finished page and call it via an external Javascript
file. That way, the visitor to the site only has to load the Javascript file
once, then it's cached for future visits.

- If you're having a problem with CSS or complex table-based layouts, where
the layout ignores your size settings and inexplicably shifts a pixel or so
in one direction, try removing white space from between the tags in the
page. White space *does* impact page layout, but only on a very small scale
(the occasional pixel).
</tip>

Regards
Mark Howells
<http://www.mark.ac/evl/>




More information about the thelist mailing list