Learning: HTML Background Color & Image

As much as color are there in HTML, the same amount of HTML background color are there. It mean that, there are around 16,777,216 color which can be define by code.

What is difference between Background Color, Background Image and Background?

Background Color:

The name itself says that, background color is use to give background color to any page, element, object, article, text, etc. It also help to give a good look to a page and it also help to highlight the text.

Background Image:

Background Image are something same as Background Color. Background Image are of three types.

Image in Background

This method is totally different from other method. In this method, instead of giving background color or background Image in redial or in linear way, you are directly putting a image in the background. There are two ways to put Image in the background. One of the way is that you are directly putting url of the image and the image is getting visible in the background. The another way to putting background is that your are adding the image to the folder and then in the same way you are putting in, in the url tag


CODE BOX

See the Pen HTML Background Color & Image by Aakash Kavediya (@Aakash-Kavediya) on CodePen.