Attempting to set up a logo button for my project, which would reload the page on-click. As of now, the file is saved in the images folder in the project itself. However, it doesn’t show up on the page. I tried taking out the styling from the button, to no avail.
Below is the HTML for the button. The img src is the relative path copied from the file in VS Code.
<h3 style="text-align:center;">
<button id = "logo" style="text-align:center;font-size:30px;font-family:Courier New;color:yellow;background-color:black;border: 1px solid" value = "Ryder">
<img src="imagesbykr_logo.jpg" border="0"/>
</button>
</h3>
I tried using the absolute path with file///: as other answers mentioned, and even changing it to an input of button type, doesn’t work. Any help would be great!
2
Answers
this code is working for me.
just make the directory name "images" in the project and name the logo "bykr_logo.jpg.jpg"
if you want to use the absolute path with file///:
just right-click on the file in vs code and click copy path and paste it into the browser URL, browser loads your image wi the absolute path.
Maybe if you specify the full path to the image like
or if you base your path from the current working directory, notice the dot at the beginning like