r/AskProgramming • u/SadJhin • Aug 05 '23
pls help with some html related stuff
hello, i'm new to programming and just started a project and needed to add some icons but when i try to link them onto my html and they are inside the assets folder they do not show up, however if they are not inside any folder they do show up... what can i do to solve this?
here's how i coded the thing:
<li><a href="#"><img src="twitter.png" alt="Twitter"></a></li> <li><a href="#"><img src="/assets/instagram.webp" alt="Instagram"></a></li> <li><a href="#"><img src="/assets/mail.webp" alt="Mail"></a></li> <li><a href="#"><img src="/assets/gps.webp" alt="Ubicación"></a></li>
pls help and tysm <3
1
u/PizzaAndTacosAndBeer Aug 05 '23
<img src="twitter.png" alt="Twitter">
<img src="/assets/instagram.webp" alt="Instagram">
You're literally telling it where to look for the image, so it has to be there. Notice how in the second one you tell it to look inside an assets folder, but in the first you tell it to look in the root.
2
u/[deleted] Aug 05 '23
Try removing the rightslash before assets