Thursday, September 13, 2007

Simple HTML for Blogger

I find it easier and more reliable to create posts in Blogger with simple HTML rather than with the Compose feature. You need to remember only a handful of HTML tags and your posts will never rarely come out looking weird.


First, go to your Blogger Dashboard, go to the Settings tab, and select the Formatting link. Find the "Convert line breaks" setting (presently the seventh setting), set it to "Yes", and click the Save Settings button at the bottom of the page.

Creating a new Post

When you create a new post, be sure to select the Edit HTML tab. Your text will appear in the Courier monospaced (typewriter-like) font.

Simple Formatting

Start the text you want in boldface with a <b> tag, and end it with a </b> tag.

HTML: <b>boldface</b>
Appears as: boldface

Use <i> and </i> for italics, <u> and </u> for underline, and <s> and </s> for strikeout.

Block Quotations

You can use the <blockquote> and </blockquote> tags to create an indented block quotation. Put the <blockquote> tag before the quotation and the </blockquote> after the quotation.

HTML: <blockquote>When fascism comes to America, it will be wrapped in the American flag and carrying a cross. —Sinclair Lewis</blockquote> See how easy it is?

Appears as:
When fascism comes to America, it will be wrapped in the American flag and carrying a cross. —Sinclair Lewis
See how easy it is?


The most complicated tag you'll need to use is called (for stupid historical reasons) the "anchor" tag. The anchor tag has the general form:
<a href="[url]">[link text]</a>
The [url] is the type stuff you see in the address bar of your browser when you visit a page. You need the entire URL, including the "http://" part. The [link text] is the text the user will see; it'll (typically) be blue and underlined.

HTML: <a href="">Often Right, Rarely Correct</a>
Appears as: Often Right, Rarely Correct

I usually find it easier to write the tags and the link text first, and then paste the URL between the quotation marks.

Step 1: <a href="">Often Right, Rarely Correct</a>
Step 2: <a href="">Often Right, Rarely Correct</a>

Using Compose

If you want to do anything fancier, you can write your post in the Edit HTML mode and then use Compose to change fonts, add images, etc. Before using Compose, make sure all the URLs for your links are filled in; if you don't, Compose will fill them in for you, and do it wrong. I used Compose to make all the HTML commands in the Courier font.

1 comment:

  1. This advice totally works better for cut-and-pasted material. Thanks!


Please pick a handle or moniker for your comment. It's much easier to address someone by a name or pseudonym than simply "hey you". I have the option of requiring a "hard" identity, but I don't want to turn that on... yet.

With few exceptions, I will not respond or reply to anonymous comments, and I may delete them. I keep a copy of all comments; if you want the text of your comment to repost with something vaguely resembling an identity, email me.

No spam, pr0n, commercial advertising, insanity, lies, repetition or off-topic comments. Creationists, Global Warming deniers, anti-vaxers, Randians, and Libertarians are automatically presumed to be idiots; Christians and Muslims might get the benefit of the doubt, if I'm in a good mood.

See the Debate Flowchart for some basic rules.

Sourced factual corrections are always published and acknowledged.

I will respond or not respond to comments as the mood takes me. See my latest comment policy for details. I am not a pseudonomous-American: my real name is Larry.

Comments may be moderated from time to time. When I do moderate comments, anonymous comments are far more likely to be rejected.

I've already answered some typical comments.

I have jqMath enabled for the blog. If you have a dollar sign (\$) in your comment, put a \\ in front of it: \\\$, unless you want to include a formula in your comment.

Note: Only a member of this blog may post a comment.