Que.1 Explain how can you set an image as a background on web pages?
Ans.1 If you want to get creative and put an image in the background of your Web page, you can use CSS and apply the property to the body element.
write this class in css and apply
.bg{
   background-image:url(filename.jpg);
}
and apply in body like this


In this example, replace "URL" with the actual URL of the image you would like to appear in the background.


Que.2 What is a CSS file and why we use.
Ans.2 CSS stands for Cascading Style Sheet.
          CSS files can help define font, size, color, spacing, border and location of HTML information on a web page, and can also be used to create a continuous look throughout multiple pages of a website.
Use
It can control the layout of multiple web pages all at once. External stylesheets are stored in CSS files.


 

 

 

Quick ask your Question