Mohammed Ali
Mohammed Ali

Reputation: 211

How to make images as buttons in HTML?

I want to put some images in my website with enabling the ability to click on these images. I was using MapEdit software before but now I am looking for a simple method rather than image mapping, so could you please provide me with the simplest tools and ways for doing that.

Upvotes: 0

Views: 157

Answers (3)

dukevin
dukevin

Reputation: 23178

If you want forms try:

<form name="myform" action="path/to/something.php" method="POST">
<input type="image" src="myImage.png" name="myname" width="60" height="60">
</form>

Upvotes: 0

Chuck Norris
Chuck Norris

Reputation: 15190

There are 2 simpliest solutions.

1.Put your image into tag like this

<a href="..."><img>...</img></a>

2.Write javascript function for image click

Upvotes: 1

Blender
Blender

Reputation: 298106

It's a pretty straightforward. An image inside of a link:

<a href="/foo/bar.html">
  <img src="foo.png" alt="A Foobar, roaming in its natural territory." />
</a>

Upvotes: 1

Related Questions