HTML Background ImageThe SyntaxNote: The Background attribute is not supported in HTML5. Use the following syntax of CSS:Examples: The following examples set the background image in different styles: Example 1: This example uses the background attribute with the body tag for displaying the image as a background of the web page. Output: Example 2: This example uses the background attribute with the table tag for displaying the image as a background of html table. Output: Example 3: This example uses the CSS syntax for the background-image property of the style attribute with the body tag. Output: Example 4: This example uses the CSS syntax for the background-image property in the style attribute with the table tag. Output: Example 5: This example uses the CSS syntax for the background-repeat and background-size property of the style attribute with the body tag. Output: Browser Support
Next TopicHtml Button Type
|