Ask coding questions

← Back to all posts
Image linking is not working
CatherineBao (3)

<a href="page1.html> <img src="/../IMAGES/Goggles/basicgoggle.svg" alt="basic-goggle"> </a>

It doesn't link that image to the page we want. It just makes the image disappear. We don't know if something is wrong with code but it looks right to us. If we don't add the <a href="page1.html"></a> the image appears again.

Answered by SixBeeps (2572) [earned 5 cycles]
View Answer
Commentshotnewtop
SixBeeps (2572)

You forgot a " mark

CatherineBao (3)

@SixBeeps
I added it and it is still not working

SixBeeps (2572)

@CatherineBao Your <a> tag has a size of 0x0. Fix that, and your image will appear again (just tested)

CatherineBao (3)

@SixBeeps

What do you mean by a size of 0x0?

CatherineBao (3)

@SixBeeps

I'm not sure how I would change it to a large size. I did a style="width:20vw; height:20vw" and it doesn't chang anything

SixBeeps (2572)

@CatherineBao Don't use viewport units, use pixels.

[deleted]

Give me a link to the repl. And if you don’t add something and it works, do it. Check if there are any more problems when you do that. If everything’s good, you are successful!

vashh (0)

Omg that looks so cool! I guess I'm at the beginning of my journey. I've googled and saved an image to my desktop but how do I get it up on the website? <img src=""> <-- What would I pop between the quotes to make the image appear?

CatherineBao (3)

@vashh

In between the quotes you put the name of your image file. You can upload an image into Repl.it and then you rename it. You put the renamed file into the quotes.

vashh (0)

Thank you!! @CatherineBao , didn't know you could update the file and then do it. If you don't attach the file is there a way for Repl.it to locate it to the remote folder or can it only access local files only?

CatherineBao (3)

@vashh

I think that the best way to do it is to use it as a local file

vashh (0)

Another silly question, when a Repl website is created, is this just on Repl or is this on an actual webpage? @CatherineBao

vashh (0)

Do you know a way for the latter by any chance? @CatherineBao

CatherineBao (3)

@vashh

When you upload it onto the repl and put it in the code it automatically shows up on the website. You don't need to upload additional files to the website.