Using HTML Tables in Blogger Posts
For the three or four of you who are frequent readers of my blog (as opposed to the random 30 or 40 of you who find yourself here via Google searches), you may have noticed that my previous post was formatted really poorly for a while (there was a huge amount of whitespace above the HTML table in the entry).
A little Google searching led me to this Blogger Help page, which explained that Blogger automatically puts a <br /> commands after each line break in a blog post (you can change that in the configuration screen if you want, but then you have to manually put in HTML <br>'s when you type your posts & who wants that...).
Anyway, I had created my table, as many people do, with code that looked like this:
<table>
<tr><td>Blah, Blah, Blah</td></tr>
<tr><td>Blah, Blah, Blah</td></tr>
<tr><td>Blah, Blah, Blah</td></tr>
</table>
and so Blogger was adding the <br />'s after each carriage return in that code (which HTML interprets above the table, apparently). The solution, as stated on the help page, is to remove all the carriage returns from the table code, so it looks more like this:
<table><tr><td>Blah, Blah, Blah</td></tr><tr><td>Blah, Blah, Blah</td></tr><tr><td>Blah, Blah, Blah</td></tr></table>
Voila! No whitespace above the table!
I've said it before and I'll say it again: God Bless Google! Both for documenting the problem and the fix so completely on the help page, and then for providing a search engine that made it so easy to find that help page, without going to the Blogger help site & paging through multiple entries...
They've certainly got their bases covered, those Google folks...
posted by Brian at
1:16 AM
![]()




11 Comments:
Thanks! Indeed, I found this post via Google.
By
Marc, at 10:13 PM, January 03, 2007
Glad to be of service, Marc...
By
Brian, at 10:37 PM, January 03, 2007
As did I. Nicely explained too!
By
Tim, at 11:03 AM, August 13, 2007
hehe this helped me as well..
By
Nexis, at 5:04 PM, December 23, 2007
Thanks for the tip. Your result came before Blogger's!
By
MBH, at 5:36 AM, January 23, 2008
Thanks, folks. I'm often amazed by the high page ranks my site gets sometimes.
Those who Google 'tables in blogger' will find this post as the #1 response (out of 554,000), and the Blogger help page to which I referred as #2. Amazing...
Anyway, I'm glad to help out...
By
Brian, at 9:28 AM, January 23, 2008
Seems like Google is passing a ton of traffic your way. Thanks for the info, my page looks much better.
By
Hilton Meyer, at 1:43 AM, January 29, 2008
I just wanted to say thanks, too!
By
Evil King Macrocranios, at 9:32 PM, January 31, 2008
Hey thanks, this problem was driving me crazy.
By
Matt, at 7:56 PM, March 06, 2008
awesome, that was irritating me too
By
Matthewlein, at 10:46 AM, May 09, 2008
And me... also via Google...
By
The Rebbetzin's Husband, at 8:10 PM, August 10, 2008
Post a Comment
<< Home