Css | Sololearn: Learn to code for FREE!



Why doesn’t a picture appear on the page if I wrote everything correctly in css?

2/21/2019 3:26:01 PM

Олег Кирсанов

14 Answers

New Answer


It will be easier to answer your question if you show your code.


Post your code here so we can help.


Use "file:///" then but note that only people that have this image in the same directory in their devices will be able to see it.


Is your image correct too?


I think you have to use relative paths rather than absolute paths...as some localhost may not accept absolute paths....


You are probably doing your code here on SL... Here,in case of code playground, you have to put the url from the ORIGINAL SOURCE... I.e. even after searching the image on Google, go to that image's SOURCE WEBSITE, and from there after clicking on the image.. copy paste the URL in your code. Hope it was helpful😊


<!DOCTYPE html> <head><title>Ethiopian Flag</title></head> <body> <svg width="620" height="320"> <rect width="600" height="100" x="20" y="20" fill="green" /> <rect width="600" height="100" x="20" y="120" fill="yellow" /> <rect width="600" height="100" x="20" y="220" fill="red" /> <circle cx="320" cy="170" r="100" fill="blue" /> <polyline style="stroke-linejoin:miter; stroke:yellow"; stroke-width:20; fill:blue" points="280 230, 320 90, 355 230,255 140,380 140,280 230" /> <line x1="290" y1="120" x2="270" y2="100" style="stroke:#ffff00; stroke-linecap:round; stroke-width:2" /> <line x1="370" y1="200" x2="350" y2="180" style="stroke:#ffff00; stroke-linecap:round; stroke-width:2" /> <line x1="260" y1="200" x2="280" y2="180" style="stroke:#ffff00; stroke-linecap:round; stroke-width:2" /> <line x1="345" y1="130" x2="375" y2="100" style="stroke:#ffff00; stroke-linecap:round; stroke-width:2" /> <line x1="32




I want to insert a picture that is stored on my phone



It might be your path wrong Or publish your code so we can help you


May be your path is not correct




Submit your code here I will solve your problem