Part II: Bold & Italic

I hope you enjoyed the last lesson about backups. You are backing up sensibly now, aren't you? If not, then go to the back of the class and read the lesson again!

This time I'm going to pass on some basic HTML tips for making your blog posts and comments a bit more fancy. There are entire books written on this subject but don't worry, I'm only going to pick out a couple of the more commonly used things.

But first, some basics. HTML is predominantly made up of document elements. These elements are coded using tags. A tag tells a web browser or document reader how to render a piece of text. For example, here is a paragraph constructed using the <p> tag.

Code: Hover over with mouse for explanation Produces the following:
<p style="color:red">
  Here is a paragraph of text.

</p>

Here is a paragraph of text.

Bold 

Making parts of your text appear in a bold typeface is easy. You use the HTML <b> tag. Simply enclose the parts of the text you want in the body of the tag. Remember to close the tag, otherwise all subsequent text will also go bold. For example.

Code: Produces the following:
The crimson blobs wander lazily to the left, then...
<b>Baaarrrp!</b> The deafening horn resonates through my body, jerking me alert but temporarily frozen.

The crimson blobs wander lazily to the left, then... Baaarrrp! The deafening horn resonates through my body, jerking me alert but temporarily frozen.

Italic 

Making italic text is just as easy. Use the <i> tag instead of the <b> tag. In fact, you can use them both together to produce bold italic text if you like. Here are some examples.

Code: Produces the following:
<p>
A sign approaches:
<i>M6 Knutsford Services 16m</i>. Good. I'll make a stop there.
</p>
<p>
She remembers that her key fob has a tiny torch on it. A <b><i>micro</i>-maglite</b> that Craig gave to her - when? - she can't remember.
</p>

A sign approaches: M6 Knutsford Services 16m. Good. I'll make a stop there.

She remembers that her key fob has a tiny torch on it. A micro-maglite that Craig gave to her - when? - she can't remember.

That's it for this time. I hope this wasn't too difficult and that you'll now be able to put your new HTML skills into action when you next comment or post a blog article. Next time I'll be talking about hyperlinks and how to use the <a> tag.

For those of you that want more, I'll leave you with a question: If tags such as <b>this</b> produce effects - bold text in this case - then how did I get <b> and </b> to appear here on this page? I've seen some authors leave instructions about hyper-linking by using [a]square brackets[/a] and then saying to replace them with angle ones. There's no need for this, as you can produce <a>angle brackets</a> directly. So how did I do that? Answer next time...