MCQs Test!! VB Basic Test !! Essentials of VB !! Creating User Services !! function !! Anatomy !! GK March-2019 !! DATA TYPES IN JAVA !! Classes ,Constructor ,Methods,Inheritance !! Ecology-I !! Biology 2019 !! Gk april 2019 !! Biology (living world) !! Plant anatomy !! CELL STRUCTURES AND FUNCTION !! General biology !! Human physiology !! Data structure !! Ecology-II !! GK TEST !! Reproduction in plants !! Human reproduction !! The ABC of C !! Operating system set1 !! Operating system set2 !! Gk and current affairs !! Animal kingdom !! Number system !! Animal kingdom-II !! Gk TEST-III !! Number series !! Microorganisms !! Interview question in c !! Time and Work !! Percentage !! General history !! Average !! Cells !! Locomotion and Movement !! paging !! Bacteriology !! Page replacement policy !! Secondary memory and Disk scheduling !! Introduction of Nervous System and neurons !! Plant harmones !! Transport and Mineral Nutrition in Plants !! Neurotransmitters !! Modern Indian History !! Photosynthesis in Plants !! Modern Indian History-II !! Plant respiration !! Environment & Biodiversity !! Environment & Biodiversity - II !! Algae, Bryophytes, Pteridophytes !! Area !! Cricket !! Days of the Year (India and the World) !! Plant Pathology - I !! Indian Transport System !! Plant Pathology - II !! Aptitude !! Biology !! Botany !! C language !! Computer Science !! Core Java !! Gate !! GK !! Mysql !! Operating system !! Physics !! VB-Visual Basic !! Zoology

HTML

HTML Projects

HTML Project

Backgrounds In HTML
Previous Home Next

In the html background color is white (by default) and there are two ways to used in webpage background.

  1. By color on html background
  2. By image to use html background
HTML BACKGROUND WITH COLORS

It is control of HTML element by bgcolor attribute to show the web page body and table backgrounds.i In the bgcolor attribute with any HTML tag.

Syntax used
<tagname bg color="color_value"...>

There are three types of formate of HTML Background with colors

<!-- Format 1 - Use color name -->
<table bgcolor="green" >
 
<!-- Format 2 - Use hex value -->
<table bgcolor="#f1f1f1" >
 
<!-- Format 3 - Use color value in RGB terms -->
<table bgcolor="rgb(0,0,120)" >

 

Example HTML Background with colors

<!DOCTYPE html>
<html>
<head>
<title>HTML Background Colors</title>
</head>
<body>

<!-- Format 1 - Use color name -->
<table bgcolor="yellow" width="50%">
<tr><td>
This background is yellow
</td></tr>
</table>
 
<!-- Format 2 - Use hex value -->
<table bgcolor="#6666FF" width="50%">
<tr><td>
This background is sky blue
</td></tr>
</table>
 
<!-- Format 3 - Use color value in RGB terms -->
<table bgcolor="rgb(255,0,255)"  width="50%">
<tr><td>
This background is green
</td></tr>
</table>

</body>
</html>

Output :

HTML Background with Images

It can be use to background attribute for control the background of html page body and table backgrounds. Background attribute is use style sheet for background setting and iamge formats are JPEG .

Syntax used

<tagname background="Image URL"...>

Example HTML Background with Images

<!DOCTYPE html>
<html>
<head>
<title>HTML Background Images</title>
</head>
<body>
<!-- Set table background -->
<table background="../../../xampp/htdocs/
r4r_advance/images/background1.gif" width="260" height="194"></p>
<tr><td>
<br>
Example with HTML image.
</br>
</td></tr>
</table>
</body>
</html

Output :

Supporting Browsers
Previous Home Next