HTML Mini-Primer

Blogger expects bloggers to post their blogs in HTML. Luckily, for the purposes of the Arlington Town Meeting blog, one only needs a rudimentary level of HTML knowledge to post most things one may wish to post.

The most important thing to keep in mind is that when browsers render HTML they will eat up all whitespace. In other words, if you type something like:

This is          a
test
of

some whitespace.
it will be rendered as:
This is a test of some whitespace.

Generally this is not a bad thing. It means you do not have to worry about how wide people have set their browser windows, since the browser will format and wrap lines. However, it means that when you do need to explicitly end a line or start a new paragraph, you have to do something beyond hitting return or leaving a blank line in what you type.

The <p> Tag

The <p> tag is used to start a new paragraph. When the browser sees the tag, it will end the line, leave a bit of blank vertical space and then pick up its formatting until it sees the next <p> tag. For example, if you type:
This is going to be my first
paragraph.  I hope you like it.
<p>
This is the second paragraph.
May it be more interesting than
the first one.
a browser will display it as:
This is going to be my first paragraph. I hope you like it.

This is the second paragraph. May it be more interesting than the first one.

The <br> Tag

Occasionally you may need to break a line in a specific place. That's the job of the <br> tag. The HTML:
If I type two lines without
a linebreak tag, there is no break.
<p>
But when I use a the linebreak<br>
tag, you see that the line breaks.
results in:
If I type two lines without a linebreak tag, there is no break.

But when I use a the linebreak
tag, you see that the line breaks.

The <b></b> Tag

Sometimes you want to give text a strong emphasis. This tag will do it. Using it is simply:
This is <b>text I want to be in bold</b>.  See?
which gives you:
This is text I want to be in bold. See?
It is important to realize that you must remember the closing tag, i.e. the </b>, or else you'll end up boldifying the rest of the page.

The <i></i> Tag

Other times you'll want italics. This works just like the <b></b> tag:
This is <i>text I want to be italicized</i>.  See?
which gives you:
This is text I want to be italicized. See?
Again, you must remember to close the tag.

The <a href="url"></a> Tag

As you know, one of the most useful features of the web is the hyperlink. To put one into your post, you need to use this tag, known as the anchor tag. There are a number of forms of it, but the most common one uses the href attribute to point to the URL you want to link to.

The way to use the tag is:

<a href="http://some.url.here">Text of the link</a>
Here's a link to the Arlington List's website, for example:
If you click on the link, you'll go to the
<a href="http://www.arlingtonlist.org">Arlington List</a>, OK?
which becomes:
If you click on the link, you'll go to the Arlington List, OK?

Closing Points

As you can see, basic HTML use isn't that hard. You might want to type your post up in an editor on your own machine and proof it in your web browser before cut-and-pasting it to the blog editor's buffer.

If you have Netscape or MS-Word (and probably other pieces of software), you can use their HTML-editing capabilities. Try not to get too fancy, and please do proof the results in your browser before entering them into the blog editor.

Good luck, and I hope to see you posting soon!


LastModified: $Date: 2003/05/01 16:13:46 $ / rlcarr at mit.edu / Home