PRODUCTS · SPAIN · CONTACT · USEFUL INFO · FINANCIAL · SEARCH · COMPETITIONS · SITEMAP
Computer  · Manuals  · Telephone  · Webmaster  · Ebay  · Advert
Website Traffic · Google ranking · Resources · HTML
What is HTML  · Text & Formatting  · Use of Colour  · Working with images  · Hyperlinks  · Advanced  · CGI Access

Changing the background colour of a page
<body bgcolor="#CCFFCC">
As explained previously, the <BODY> tag can be used to specify the background colour of the webpage. By changing the hexadecimal value contained within the bgcolor="" command to #CCFFCC we are telling the browser to display a light green colour. If you do not include a background colour in your body tag the page will default to white. For more information about colours including a table of colours and their hexadecimal number please see the "Colours" section.

Paragraphs
<P> & </P>
Any text that is entered between these tags will be treated as one paragraph, which means that there will be a lines space between the end of one paragraph and the beginning of the next. It is similar to adding two <br> tags at the end of a paragraph.

Text alignment
align=
Align is an additional command that is added to the opening paragraph tag, <p>. It tells the browser where to align the text in relation to the browser window.

<p align="left"> - this is the default
<p align="center">
<p align="right">

Note: When you close the paragraph with </p> all text will then return to being displayed down the left hand side of the screen by default.

Font styling
<FONT> & </FONT>
This is the font tag. This tag allows you to specify the type of font you use, the size of the font and the colour of the font. This is achieved by adding additional commands within the opening <FONT> tag. The additional commands are:

color=""
This will contain a hexadecimal value that specifies the colour that is to be used to display the text.

face=""
This will contain the font information. The names of the fonts that are to be used to display the text. You can have more than one type face, each seperated by a comma. The browser will then look for the first on the on the users system, if it is not there try the 2nd and so on.

size=""
This will contain the value that specifies the size that the text is to be displayed at. The size range is from 1 to 7, 2 is a good size for main body text.

Note: If you do not specify a font tag, the default font, size and colour will be used.

Text attributes
Bold text:  <B> & </B>
This is the bold tag. Any text that is entered between these tags will be displayed in bold.

Example:
<b>Hello Everyone</b> - this will display Hello Everyone within your web browser.

Underlined text:  <U> & </U>
This is the underline tag. Any text that is entered between these tags will be underlined.

Example:
<u>Hello Everyone</u> - this will display Hello Everyone within your web browser.

Italic text:  <I> & </I>
This is the italic tag. Any text that is entered between these tags will be displayed in italics.

Example:
<i>Hello Everyone</i> - this will display Hello Everyone within your web browser.

Horizontal rules
<HR>
The <HR> tag tells the browser to display a horizontal rule. This will simply draw a line across the webpage and is a way to split up sections of a page. Like the <BR> tag, there is no closing </HR> tag.

Create a page
The screen shot below is of the page we want to create, and beneath that is the HTML code required to do so. Copy this into Notepad, making any alterations you wish and try it out for yourself. To view your page save the file somewhere on your desktop as "index.htm" and then view it on your browser by double clicking on your newly created html file.

screenshot


The HTML
<html>
<head>
<title>My Home Page</title>
</head>

<body bgcolor="#96C072">
<p align="center"><font size="4" color="#000000"><b><u>My Website</u></b></font></p>
<hr>
<p><font color="#000000" face="Arial, Helvetica, sans-serif" size="3">Hello,</font><br><br>
<font color="#000000" face="Arial, Helvetica, sans-serif" size="3">Welcome to my website. I hope you like it.</font></p>
<p align="right"><font color="#000000" face="Arial, Helvetica, sans-serif" size="7"><i>Rob</i></font></p>
</body>
</html>


 


You are here: Home-USEFUL INFO-Webmaster-HTML-Text & Formatting

Previous Topic: What is HTML Next Topic: Use of Colour