HTML Backgrounds

In this tutorial you will learn about the HTML Backgrounds and its application with practical example.

HTML Backgrounds gives us a way to set background image for HTML elements like – HTML Table.

Table Of Contents

We can set various type of background like solid color, transparent background, gradient etc.HTML Backgrounds grow or shrink dynamically as the HTML element grows or shrinks.

Example:

Output:

Repeating Background

Sometimes when we use a image for the background we get into trouble when HTML element’s height or width grows comparatively to the background image. In this case we can repeat the background image in X or Y direction.

 

In this tutorial we have learn about the HTML Backgrounds and its application with practical example. I hope you will like this tutorial.