The body

Now we've prepared everything it's time to move onto the content of your page, so you need to tell your web browser that's what you're about to write. This is done using the BODY tag, it's also at this point you can define what colour you want the page background to be. So on the next line type:


This will give your page a red background. To change the colour you need to change the six figure number, for a list of what code you need check this website.

Now you can really get cracking and type the content you want to put on your webpage, just type away as you would normally.

Formatting

Font

By default your text will appear in good old Times New Roman, but if you're after something a little more interesting you'll need the FONT tag. So in front of your text type the following code:

My text here


This will change the font to Arial, but you can type the name of any font you like.

Size

If you want to use a larger or smaller text size it's back to the FONT tag, but instead of FACE we use SIZE:

My text here


The text sizes are different from those used in Word, they range from 1 (smallest) to 7 (largest), so experiment until you find what you like. You can combine the FACE and SIZE attributes into a single tag if you like.

New Line

When you want to move your text onto the next line you can't just press the return key like you do in word, you need to use the BR tag:

My text here.
More text here.

 

New Paragraph

When you want to start a new paragraph you'll need the P tag:

My text here.

More text here.

 

Center

If you want your text to appear in the centre of the page you'll need the CENTER tag:

My text here

 

Bold

If you want a piece of your text to stand out by making it bold you'll be wanting the B tag:

My text here

 

Underline

To underline a piece of text the U tag is used:

My text here

 

Italics

To italicise a piece of text we use the I tag:

My text here


So just to summarise what you might have so far:

My First Webpage

Welcome

This is my very first webpage, I'm going to write a bit about myself, my family and my pet hamster Fred.

Next: A Guide to HTML Page 3

Was this answer helpful? 0 Users Found This Useful (8 Votes)