Sunday, 07 September 2008
 
 
English Language
Bahasa Indonesia
Computer
Website
Gallery
Health
Ebook
Tips
Movies
Add Site
Directory Listing

Visitor Data
Your IP
38.103.63.59
United States United States :
Browser
Unknown Browser Unknown Browser
Operating System
Unknown Operating System Unknown Operating System

Adding colour | Print |
 

When you create a web page you will want to use different
background and text colours and to add images. This makes the site
more attractive to visitors and generally makes the website look
better. Take care not to make the text and background colour the
same!
In this exercise we will change the background colour of your
website you created in Chapter 2, to blue.
To do this you would add the following HTML code into the body of
your text file. (To open your first website as a text file and not
HTML, open the HTML file and select "View>Source"):
<body bgcolor = "#0000FF">
Notice how instead of saying <body bgcolor = blue> We have used
some strange looking code.
Don’t worry this is called "Hexadecimal colour" and can be used for
inserting complex colours into your website.
Click HERE for a full list of colours and their Hexadecimal values.
If you are finding all of these different colour codes confusing don’t
worry!
As well as using the Hexadecimal method, you can also use good
old-fashioned English! Meaning that placing the following code into
your HTML file would have the exact same effect:
<body bgcolor = "blue">

 

When inserted into your code, the code should look like this:
<html>
<head>
<title>My Own Home Page </title>
</head>
<body>
<body bgcolor= "blue">
<H1> I am Your-Name and this is my web Page!</H1>
</body>
Test your file by saving it, remember to save it as "index.html" and
make sure you select "All Files" from the save as type box.
Your website should now look something like this:
Now that we have our background colour sorted out, we can now
alter the text colour.
We go about doing this in the same way. This is the code we need
to insert into our webpage:
<font color="Red">Text that you want to make red goes
here</font>
Notice that you must put </font> after the text has ended. If you
didn’t insert the </font> then your entire document would have the
text as red. This isn’t too important for now but if you ever have
more than one text colour on a page this may become a problem.
 

Here is how your code should now look:
<html>
<head>
<title>My Own Home Page </title>
</head>
<body>
<body bgcolor= "blue">
<font color="Red">
<H1> I am Your-Name and this is my web Page!</H1>
</font>
</body>
IMPORTANT TIP: A common error when coding with colours and
HTML in general are simple spelling mistakes.
Remember that when typing "color" it is the American spelling,
make sure you don’t use the English spelling "colour" or your HTML
wont work.
Now lets move onto Chapter 4 and look at adding images
This entry was posted on . You can follow any responses to this entry through the RSS 2.0 feed. You can leave a comment.
Users' Comments (0)

Comment an article
  Name
  E-mail
   Title
Available characters: 600
This image contains a scrambled text, it is using a combination of colors, font size, background, angle in order to disallow computer to automate reading. You will have to reproduce it to post on my homepage
Enter what you see:

No comment posted

 
Top! Top!