tags:

views:

132

answers:

3

I've been looking at the source of the A List Apart website, and I've noticed something strange - every line (blank or not) has a trailing space. I work in typesetting, so trailing spaces are something I regularly remove out of course, so why in this case would you want them? I have a lot of respect for ALA so I'm assuming there's a good reason!

A: 

Thats because the text auto wraps. If you look at the HTML, each of those paragrahs on the front page are not preformatted, they are one long continuos line of text, with a space separating each word. So they arent "extra" spaces, they are the actual spaces of the paragraph text.

Now if that text WAS preformatted, then your right, the whitespace at the end of each line would be needless, but why would they go through the trouble of doing that when each browser will fit the text into its container, keeping justifications, for you.

Neil N
+4  A: 

:P It's not the page, it's Chrome's view source function - it adds a space to each line. Still don't know why though!

Skilldrick
Chrome apparently massages the data. We've seen this here before: http://stackoverflow.com/questions/654688/php-cant-read-files-containing-php-code-as-text-files
Rob Kennedy
A: 

The html source does not have extra spaces. Used wget to retrieve the page and vim to view.

epochwolf