You are on page 1of 4

lecture-3

Chapter 5
Creating Webpage Using HTML
Attributes Functions Syntax
Specifies the background colour of the <BODY BGCOLOR = COLOUR NAME>
BGCOLOR EX. <BODY BGCOLOR=RED>
webpage
<BODY TEXT= COLOUR NAME>
Specifies the colour of the text written
TEXT EX. <BODY TEXT=RED>
on the webpage.

<BODY BACKGROUND = IMAGE FILE WITH PATH>


Specifies an image as a background of
BACKGROUND <BODY BACKGROUND=c:\desktop\flower.jpeg>
the webpage.

<BODY TOPMARGIN = VALUE>


Specifies the top margin of the
TOPMARGIN EX. <BODY TOPMARGIN = 10>
webpage.

<BODY LEFTMARGIN = VALUE>


LEFT MARGIN Specifies the left margin of the webpage EX. <BODY LEFTMARGIN = 10>

Specifies the bottom margin of the <BODY BOTTOMMARGIN = VALUE>


BOTTOMMARGIN EX. <BODY BOTTOMMARGIN = 10>
webpage

<BODY RIGHTMARGIN = VALUE>


Specifies the right margin of the
RIGHTMARGIN EX. <BODY RIGHTMARGIN = 10>
webpage
ATTRIBUTES FUCNTIONS SYNTAX

<HR SIZE =VALUE>


SIZE Specify the thickness of the line
EX. <HR SIZE=3>

<HR WIDTH =VALUE IN PERCENTAGE>


Specifies the width of the line in
WIDTH percentage
EX. <HR WIDTH=20%>

<HR COLOR =COLOUR NAME>


COLOR Specifies the colour of the line EX. <HR COLOR=RED>

Controls the alignment of the line on the


webpage
<HR ALIGN =LEFT/RIGHT/CENTER>
There are three types of alignment.
ALIGN Left: to align the line to the left
EX. <HR ALIGN=CENTER>
Right: to align the line to the right.
Center: To align the line to the center
FONT TAG
You have already know formatting. You can also use formatting in HTML using <FONT> tag. It is very useful when
different parts of the text require different looks and styles.
To change font face, size and colour, do the following:
1. Type the tag <FONT> with the attributes.
2. Type the closing tag </FONT>

ATTRIBUTE
FUCNTIONS SYNTAX
S
<FONT FACE=FONT NAME>
FACE Changes the font of the text
EX. <FONT FACE=MONOTYPE CORSIVA>
<FONT SIZE=VALUE>
Changes the height and width of the
SIZE character
EX. <FONT SIZE=5>

<FONT COLOR=COLOUR NAME>


COLOR Changes the colour of the text EX. <FONT COLOR=RED>

You might also like