Customizing your web page means enhancing the look of your page. You can do this by adding pictures, videos and other media files too such as audio clips (.mp3, .wmv, etc)
Here I will tell you how you will add images to your web pages instead of colors as we did earlier.
For adding image as a background of your web pages you can choose either of the following options:-
By using background attribute you can easily add image as a background. This is how you will be using it-
<body background="image source">
Here you will replace "image source" [without the quotes] with the complete path of the image.
Example: Suppose your image is stored in the folder named "images" located in the "E" drive of your computer, then you will be using the following path for this image:-
E:\image\something.jpg
Here something.jpg is your image name with .jpg extension.
This method gives you more flexibility and command over your background images. Use the following code:-
<body background="the compete path of your image">
This will be the output:
To add image to your page, use the following code:-
<img src="image source" height="200" width="400" align="left/right/center" alt="image">If your image is in the same folder then use only the image name.
example:-
<img src="imagename.jpg" height="200" width="400" alt="image">
OR if u have the image in a folder, than use the following code:-
<img src="foldername/imagename.jpg" height="200" width="400" alt="image">
<video controls="controls" src="video location/videoname.mp4" height="350" width="500" autoplay> </video>
If you use the "autoplay" attribute, then your video will start playing as soon as you open your web page.
The output would be like this:
If you use this tag then you will see a audio player on your web page.
<bgsound src="E:\image\audioname.mp3" loop="infinite">
Here "loop" represents the number of times you want to play the audio. You can use 0, 1 ,2 or any other number, depending on your interest.
Use this tag just after the <body> tag:
<body><bgsound src="files/audioname.mp3" loop="infinite">XXXXXXXXXXXXXXXXXXXXXXXXXXXXX</body>
Using <bgsound> tag will not add any music player to your web page but still you will be hearing it.
You learned following things:
Now go to page 5 to learn step 4.
How Many People Visit |
|