Creating a Web Page III : Text

0 Conversations

Previous entries in the "Creating a Web Page" series:

Paragraphs

To put text into a paragraph, use this:

<P> stuff stuff stuff stuff stuff < /P>

You'll notice that HTML doesn't indent paragraphs. Sorry.1 There are other ways of separating chunks of text:

Line Breaks and Horizontal Rules

<BR>

This is a "line break". It is one of the few tags in HTML that does not have a partner. It will leave a blank line in your page.

The next one is also a single tag- it is the "horizontal rule":

<HR>

...which will look like this:

Emphasis

Sometimes you want to emphasize a particular word or phrase, make it stand out. Here are some common ways to do it:

<B>bold< /B>
<I>italic< /I>
<U>underline< /U>

Again, you can nest the different tags in almost any combination: bold and italic, bold and underline, italic and underline. Just make sure that the one closest to the text is the first one you turn off, then work your way out. For example:

<B><I><U>
This is all three at once!
< /B>< /I>< /U>

(You may want to avoid underlining for emphasis: by now, underlined text in a web page is almost universally assumed to be a link.)

Font size

The next item we'll tackle is font size.2 There are two ways of changing the font size. One is to use headings. This isn't really the best way to do it since, as the name implies, heading tags are intended for the headings, subheadings, titles, subtitles, etc within a page. Not only does the size change but they are automatically bold and a line break is put after it. Try copying and pasting this into your sample page to get an idea of what the different sizes are.

<H1> biggest< /H1>
<H2> big< /H2>
<H3> normal< /H3>
<H4> smallish< /H4>
<H5> tiny< /H5>
<H6> eek!< /H6>

The other way of changing the font size is through the FONT tag. The size can be set from 7 to 1. (For whatever reason, the numbers are in reverse order for the FONT tag then they are for the heading tag: 7 is largest, and 1 is smallest.)

<FONT SIZE=7> HUGE
</FONT>
<FONT SIZE=6> Big
</FONT>
<FONT SIZE=5> largish
</FONT>
<FONT SIZE=4> about normal </FONT>
<FONT SIZE=3> small
</FONT>
<FONT SIZE=2> tiny
</FONT>
<FONT SIZE=1> helllooo out there </FONT>

Another way to liven up your text is to change the font. To set the default font for your page, put this tag just before the body tag:

Setting the font for your page

<FONT FACE="TAHOMA, VERDANA, ARIAL">

It's best to put at least two, if not three possible fonts in your default setting. The browser will try the first one, and if it isn't available will go to the second, then the third, and if all else fails it will resort to its own default font. If you really must have an exotic font, be careful- you may severely restrict who can view your sight if very view people have that font. As a rule of thumb, the more common fonts that are widely accepted are Times, Helvetica, Arial, and Tahoma.

With this, you can do a plain text page. Not very exciting yet, but you have to start somewhere, right?

1However, Cascading Style Sheets do. Look for a future entry on this subject...2“Font” is the technical term for text.

Bookmark on your Personal Space


Conversations About This Entry

There are no Conversations for this Entry

Entry

A668270

Infinite Improbability Drive

Infinite Improbability Drive

Read a random Edited Entry


Written and Edited by

Disclaimer

h2g2 is created by h2g2's users, who are members of the public. The views expressed are theirs and unless specifically stated are not those of the Not Panicking Ltd. Unlike Edited Entries, Entries have not been checked by an Editor. If you consider any Entry to be in breach of the site's House Rules, please register a complaint. For any other comments, please visit the Feedback page.

Write an Entry

"The Hitchhiker's Guide to the Galaxy is a wholly remarkable book. It has been compiled and recompiled many times and under many different editorships. It contains contributions from countless numbers of travellers and researchers."

Write an entry
Read more