HTML background is used to style background of any html page or element. It uses CSS to apply styles like background color, background image etc.
Background color is used to apply color in background of HTML page or element by using colors.
background-color:color;
You can apply any color to html element or document.
Background image is used to apply image in background of html page or any element.
background-image:url(URL);
You can use any image type like jpg, jpeg, png or even gif.
You can apply background image to any HTML element. For more background properties visit our CSS Background.
Remember it is not neccessary that background image is olny gievn in body of HTML page, you can give background image to any HTML element like in above example it is given to div element.
Open notepad or any other text editor, follow the following points.
save file with name task.html or task.htm and then open it using any browser and see results.