[thelist] Why do we say what we say?

Jon Hughes jon at phazm.net
Thu Oct 25 08:45:43 CDT 2007

> Something else that the validator will happily ignore is code
> indentation.
> Personally, I use tabs, but some people like to use spaces, in various
> amounts (2, 3, 4 or sometimes even 6 spaces per indentation). Other
> developers tend to close their elements after the indentation, e.g.:
> <ul
>    ><li>Item 1</li
>    ><li>Item 2</li
> ></ul>


I have no idea if any browsers would choke on that, but I wouldn't be
surprised if some did.

I actually prefer to keep my HTML non-tabulated. For me, it makes it much
easier to read.

Javascript, PHP and ASP, however, I tabulate with tabs:

Function foo(bar) {
	var bar = "foo";

Mostly because it gets to convoluted with error checking and whatnot. If I
was still doing tables, I would still tabulate my HTML :)

Regarding spacing, as long as you have it like this:


You will be fine.  The problem comes when you have:


One issue I get when I collaborate with back-end programmers is things like


<?php if (foo=bar) { ?>


<?php } ?>


Which outputs (if foo=bar, of course)




The code should be written as such:


If (foo=bar) {




This will result in:


 - Jon

More information about the thelist mailing list