
Using HTML in Chat Board Messages
This document has been prepared as a response to inquiries about using HTML on chat boards, particularly BoyChat, MetaBoyChat and other similar boards.
Note: Click on the hand
to return to the Contents from anywhere in the document.
Introduction
Pad-O-Rama
Preparing your text
Common guidelines
Don't Lose It!
Composing offline
Preview
Overall appearance
Background
Text
Text size
Text color
Typeface
Horizontal lines
Hyperlinks
Emphasis
Lists
Centering and Indenting
Centering
Indenting
Formatted text
Summary

HTML (HyperText Markup Language) allows some fairly complex text formatting. When you view a message or response on a chat board, you are viewing an HTML document. HTML "tags" control how the message will look on your screen. That said, it's important to note that the message will look a little different on each individual's screen, because:
With this in mind, there are several simple rules that you can follow to make your messages stand out a bit from the rest, or to use emphasis where needed. Please; this document is NOT an HTML primer, it is intended only for this very limited application.

It can be found at Downseek, but it's probably available elsewhere.


No matter how you prepare the text, there are a few things you should know. First of all, just type your text normally without pressing ENTER needlessly. You do NOT have to break your text up into lines; that's the job of the browser. Indeed, you MUST not break your text up into lines (unless you're writing a poem, for example). Why? Because everyone will use a different font size and window size, and the line length that is appropriate for you may not be correct for anyone else.
If you do attempt to do your own line breaks, either of two things will happen:
| ** | This ONLY works on chat boards. Normally, HTML completely ignores "new line" (i.e. Enter) characters. However, the chat board script converts these to <br> tags which are not ignored by browsers. |


If you're using Windows, Wordpad works fine. So do Microsoft Word, and TextPad (with soft returns selected). You can also use a raw HTML editor to make it easier to put in tags. These are readily available on freeware sites such as Freeware Home. Do not use a WYSIWYG (what you see is what you get) HTML editor. It will insert all the page tags that the chat board script has already inserted, and that's against the rules of HTML.
Important: If you use an editor such as Word, you should turn off "smart quotes" in Options. The characters used for "smart quotes" are not correctly interpreted by all browsers or in all fonts.
Once you've prepared your text, just select it all (ctrl-A), then copy it (ctrl-C or EDIT:COPY). Once you are online and in the text entry box on the chat board, just press ctrl-V (EDIT:PASTE) and you're all done.
Note: Some of you may know that CR's are ignored by HTML, and may wonder why you can't use them with impunity. This is because the script file of the chat board converts CR's to line breaks when preparing your message.

If you are using HTML tags it is important to preview your message before posting it (if your chat board allows this). This will allow you to spot errors and fix them before you suffer the embarrassment and horror of posting a message with a really dumb mistake in it (we'll leave the really dumb CONTENT to you).


For example, I came across a message the other day in which the writer had used white text, and had set a dark background so it could be read. Well, it didn't work. I ended up with white text on a white (default) background, and it was illegible. I had to temporarily set the browser default background to a dark color to be able to read the message. Just because some browsers actually respond to the second <body> tag doesn't make it right: it is NOT part of the HTML rules. Solution? Don't use light colored text.

You can control the size, typeface and color of the text in a message. These are all done using the <font> tag. For example, the line:
will produce the following output"
Note that you must always use the </font> tag to close the font and return to normal. Let's look at each of these in turn.

| Markup | Result |
| <font size=1>Testing size 1</font> | Testing size 1 |
| <font size=2>Testing size 2</font> | Testing size 2 |
| <font size=3>Testing size 3</font> | Testing size 3 |
| <font size=4>Testing size 4</font> | Testing size 4 |
| <font size=5>Testing size 5</font> | Testing size 5 |
| <font size=-1>Testing size -1</font> | Testing size -1 |
| <font size=+1>Testing size +1</font> | Testing size +1 |

Text color can be controlled with the font command too. The syntax is <font color="cccc> where cccc is the color specification. cccc may be a color name (keep it SIMPLE); most browsers (not all) will recognize names like green, red, blue, light green, etc. It may also be a numeric color, in the form #RRGGBB where RR, GG and BB are the red, green and blue components of the color. These are actually expressed as hexadecimal numbers, but don't worry about that. Just follow the simple rules below.
In 256 color mode (somewhat rare these days), browsers choose colors from a limited palette which restricts the numbers you can use in the RRGGBB format. (Note: although this doesn't apply if the viewer is using hicolor or true color, it's always best to program for the lowest common denominator.) The rule is really simple; you should always choose RR, GG and BB from the following numbers: 00, 33, 66, 99, CC and FF, where 00 is the darkest (black) and FF is the brightest (pure color). If you use other numbers the browser will pick the closest from the list I just gave.
So if I wanted pure red text, I'd set the color to "#FF0000". "#FFFF00" would give red + green = yellow text, and so on. Play with these and see just what you can come up with. For example, the orange I used at the top of this page is "#FF6600". Here it is:
gives:

This is a tricky one. Browsers allow the face to be specified as part of the font command. But you must remember one thing; you can specify any typeface you want, but unless the person viewing your post has the same face on his computer, it won't work and he'll just see the default. Obviously if you want it to work for a majority of users, you should choose typefaces that most people have installed. These include (for PCs):
The examples I'm going to give MAY not show up correctly on all machines; it depends on what fonts you have installed. If I wanted to use Arial, for example, for a short paragraph I'd do this:
Warning! The Microsoft "Webdings" font doesn't work at all in some browsers, even if it is installed on the computer being used to view the chat board. For this reason it's advisable not to use this font in posts.

You can place a horizontal line in your message by using the <hr> tag. You may want to put an extra ENTER above and below it to space it out a bit.

You can place hyperlinks to other documents in your message in two ways:
To build a link into the document, use the following syntax:
If you want to point to another message on the board (or anywhere else) in your message, do this:
Note: If you want to show someone else how a hyperlink is constructed (as I did just above), instead of actually using the < and > symbols, write them out as < and > instead.

You can use italics, bold-face, underline, etc. to emphasize text. Here's how:
| Markup | Result |
| <i>Italicized text</i> | Italicized text |
| <b>Bold text</b> | Bold text |
| <u>Underlined text</u> | Underlined text |
| <s>Strikethrough text</s> | |
| <b><i>Bold italics</i></b> | Bold italics |
| <blink>Blinking text</blink> |
If you don't see the above text blink, blinking may be disabled in your browser, or your browser (e.g. Opera) may not support that tag.

Lists can be numbered (ordered) or unordered. Here's how to make them.
Make a numbered list like this:
Which comes out as:
The <ol> and <li> are placed on the same line to avoid extra CR's, which the script turns into blank lines.
Note that the <li> tag is a list item. Make an unordered list like this:
Which comes out as:
Note: To maintain correct line spacing when using lists on a chat board:
Otherwise you'll end up with double spacing above and below the list.


You can center text by using the <center> tag. Do not follow this tag with ENTER because the script will put extra line breaks in your text if you do. So:
will give
Don't forget to close this tag with </center> or everything following it on the board (or at least in your message) may end up centered.

You can't indent text by using spaces. HTML browsers ignore spaces except as word breaks. HTML provides a special tag for indenting: <blockquote>. All you have to do is to surround your indented text with these tags.
<blockquote> Think, when you talk of horses, of the patter of their hooves on the gravel of a country lane. What kind of machine can ever replace such magnificent beasts?
But the machine age has come, and the quiet neighing of a faithful friend is to be replaced forever by the raucous clatter of the "horseless carriage". </blockquote>
Will produce:
Think, when you talk of horses, of the patter of their hooves on the gravel of a country lane. What kind of machine can ever replace such magnificent beasts?But the machine age has come, and the quiet neighing of a faithful friend is to be replaced forever by the raucous clatter of the "horseless carriage".
An alternative method that works well is to simply use an unordered list with no list item tags. Watch:
<ul> This is an indented paragraph. Only a short one because I can't think of much to say. Oh, did you hear the one about the Irishman and the dog? Too bad, neither did I. </ul>
gives
should result in

Sometimes you will want to use manually formatted text. For example, if you are quoting something or need a short list. But if you try to line things up in a message, it won't work as you expect. For example, if I were to type:
To fix this we will need: - a rubber ball i. to fill the hole ii. to play with afterwardsIt will come out as:
To fix this we will need:
- a rubber ball
i. to fill the hole
ii. to play with afterwards
Some of you may know that the HTML tag <pre> is normally used to do this. Alas, if you try to use it in posts, all the lines will come out double spaced (because the persnickity script puts in a line break every time you press Enter).
The solution is to set a fixed pitch font (Courier New is the usual one) and use non-breaking spaces where you want to indent, as shown here:
<font face="courier, courier new">To fix this we will need:
- a rubber ball
i. to fill the hole
ii. to play with afterwards
</font>
and it will come exactly as you want. The font tag should be on the same line as the start of the text or you will get an extra blank line that you don't expect.
Note: The use of both "Courier" and "Courier New" accommodates non-Windows viewers who don't have the Courier New font installed.

Don't try to use any of the following tags in a message:
Also note that many chat boards may disallow other tags, like
Make sure you always close tags. If you forget to close an <i> with an </i>, all the rest of the text in your message (and maybe even the board in some cases) will be italicized.
The only tags you do not need to close* are:
* Actually, the HTML standard requires all tags to be closed, but most authors, authoring programs and browsers don't close the ones listed.
** Note that the use of these tags is discouraged in messages, the script inserts them automatically as required.
or go to Somersault's Tech Forum.