Survey Form - Build a Survey Form

hi i am giving address to image but not working. whats the proper syntax

Your code so far

background-image: url("C:\Users\Skiin\Downloads\red-supercar-koenigsegg-carbon-fiber-30us39wmkbhbcxbq.jpg");


/* file: styles.css */

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/ Safari/537.36

Challenge: Survey Form - Build a Survey Form

Link to the challenge:

You can’t use a file address to an image on your computer. It has to be a URL to an image file publicly available on the Internet. If you want to use that exact image then you will need to upload it to a web server. Google “free image hosting” and you’ll probably find some choices.

hi thanks. by the way i saw an article on this website that you can use filr address from computer as well.

Yes, you can use a file:// URL to open up local files on your computer through your web browser. But that only works on your computer. No one else will be able to open that file on your computer through their web browser using that file:// URL.

heres link for article CSS Background Image – How to Add an Image URL to Your Div

Thanks for the article. All of the image links in that article are using standard URLs to files on a web server, which is exactly what I was trying to explain above. The all start with http:// or https:// (or it is implied by using a relative URL). None of them access files on a local computer, only from a web server.

theres one line in article that says how to give address of image from computer

You’ll have to be more specific. Can you tell me exactly which line?

Or it can be a local path. Here’s an example:

body {
   /* Background pattern from Toptal Subtle Patterns */
   height: 400px;
   width: 100%;
   background-image: url("./images/oriental-tiles.png");

its near the top in first section where two examples are given

That’s a relative URL. It means that the browser automatically sticks the current server domain name on to the front of it. So the browser would turn ./images/oriental-tiles.png into something like It’s just a convenient shortcut so you don’t have to type out the entire URL. But it’s still a file on a web server, not on your local computer.

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.