![]() |
HTML
Tutorials
|
|
HTML Tutorial #2Adding
a background image. In the first
tutorial, you learned to add a background color to your page. The code to add a background image is; <body background="images/plainbgrnd.jpg"> As
you see, the background command is inside the body tag.
You will need to point the image to reflect the folder on your server where your
files are located. Taking the html code from the first tutorial and substituting a background image for the plain white background, our code would now look like this; <html> <head> <body
background="images/plainbgrnd.jpg"> Coloring Text. Now let's start giving this page a more fancy look. You will now add some color to the title and to make it stand out more, you will make it bold text. <p align="center"><font size="5" color="#000080"><b>WELCOME TO MY WEBSITE</b></font></p> All we have done is included the color code within the font tag and introduced the bold tag <b> Now your html should look like this; <html> <head> <body
background="images/plainbgrnd.jpg">
<p align="left"> Type in text here, blah blah blah. We are making
a website.</p> <p
align="center">
</body> You see how you are telling the browser exactly how to display each item with the simply use of html tags. Let's practice changing colors a little more and at the same time introduce you to using a line break to place your words on the next line. Here
you will use the <p> tag again to signify
a new paragraph. <p
align="left">><font color="#660066"><b>We
are going to color this text purple.<br> Adding a hyperlink. Hyperlinks are what make the internet exiting and easy to go from one place to the next. It's kind of like travelling in a fast jet versus walking a million miles to get to where you want. Let us put in a hyperlink so that you can go back to html tutorial #1, simply by clicking on the link. We now introduce the <a> tag that commands all hyperlinking. <p
align="center"> Again the <p> tag was used for the start of a new paragraph and the link was aligned with the center. The <a> tag started the hyperlink and the href signifies that a www url will be used. You can place whatever text you like and then close the </a> and the </p> Now let's see what the html will look like now. And view your webpage here <html> <head> <body
background="images/plainbgrnd.jpg">
<p align="left"><font color="#660066"><b>We
are going to color this text purple.<br> <p
align="center"> <p
align="center"> Your on your way now to becoming proficient in html coding.
|
|