+ 3

[HTML] How to make a Image that when clicking redirects you to a Link?

Hi! I am Merstty, i am 29 years old and i have a question for my project. How do i make a "Button" but instead of the input button, make it with a image? Anyhelp would be greatful! Thank you and sorry for my bad grammar :)

10th Oct 2022, 4:46 PM
Merstty
Merstty - avatar
6 odpowiedzi
+ 1
There is a chance you may still need help. If so here are the attributes needed to complete the task. Edit: added CSS to give it a button press animation. https://code.sololearn.com/WPU3o6E38df9/?ref=app
10th Oct 2022, 6:39 PM
Chris Coder
Chris Coder - avatar
+ 2
Maybe you could simply make the image a link? <a><img/></a>
10th Oct 2022, 5:08 PM
Lisa
Lisa - avatar
+ 2
Inclose the image inside the anchor tags <a href="your link"> <img src="your image url" alt="image decription"/> </a> and that's it .
11th Oct 2022, 1:00 PM
Madrine Nansiimbi
Madrine Nansiimbi - avatar
+ 1
<a><img></a> <a href="link.com"><img src="image directory"></a>
10th Oct 2022, 7:52 PM
John Doe
John Doe - avatar
0
Lisa there should be no / inside the <img> tag
10th Oct 2022, 7:53 PM
John Doe
John Doe - avatar
0
The / in self closing tags is optional. You can use it or leave it out.
10th Oct 2022, 8:17 PM
Lisa
Lisa - avatar