jay59
jay59

Reputation: 11

How To Make HTML Links

I am trying to make an href button that when clicked changes the image on my website page to another image. How precisely can I do this?

I am trying to use the following code to point "Page 2" to page 2.html doc in my files as to change the image. The file cannot be found however.

<a href=“<a href=“page 2.html”> Page 2</a>

I do apologize if I am vague/if this question has been answered in past--Stack has been immensely helpful for answering my questions in past but I am just very confused as to how to solve this.

Thank you

Upvotes: 0

Views: 248

Answers (3)

slek
slek

Reputation: 309

If this is not still working <a href="page2.html">page 2</a> , try to input the whole file path. eg. <a href="C:\Users\Me\Desktop\folder\page2.html">page 2</a> . You may also refer here

Upvotes: 0

Snappawapa
Snappawapa

Reputation: 2032

correct syntax:

<a href="file" >link to be seen on page </a>

so for you:

<a href="page2.html"> Page 2</a>

If the file has a space in it, you should put a %20 where the space is:

href="page%202.html

Upvotes: 1

user1413338
user1413338

Reputation:

page 2.html shouldn't contain any spaces. Consider this: <a href="page2.html">Page 2</a>

Upvotes: 0

Related Questions