Login    New User    Forgot Password    Help      

HTML BackGrouds

GO TO INDEX

The background attribute is deprecated in HTML 4.01.

The background attribute specifies a background image for a document.

body {  	
background: white url(http://www.educationpoint.in/images/bg.gif) no-repeat top right;  
}

This amalgamates these properties:

  • background-color, which we have come across before.
  • background-image, which is the location of the image itself.
  • background-repeat, which is how the image repeats itself. This can be repeat (equivalent to a 'tile' effect across the whole background), repeat-y (repeating on the 'y-axis', above and below), repeat-x (repeating on the 'x-axis', side-by-side) or no-repeat (which shows just one instance of the image).
  • background-position, which can be topcenterbottomleftright or any sensible combination, such as above.

GO TO INDEX