Home » questions » What is the htlm code for:?

What is the htlm code for:?

2006-08-07 13:21:19, Category: Programming & Design
What is the html code for making a small jpg picture on a website page enlarge when you click on it? And where do you place that code on your website page to make it work properly, or do you place it on the picture? I'm a newbie at html.

Answers

  1. cdg1111us

    On 2006-08-07 13:35:55


    You need to think about this a little differently. Rollover effects allow you to switch images on certain events such as hover (cursor over image) and click ("active" in CSS terms). Anyway, you need two images -- one for the standard state and another to show on the active state. Note the NAME property of IMG is the same as the beginning of ".src" in onmouseover and onmouseout. The code above is an image used as a link, with a rollover on hover, which is the most common rollover. If you want to change the image only on a click, change onmouseover to onclick.
  2. DMaddox

    On 2006-08-07 14:41:49


    You can also try this. change the width and height to how small you want the picture to appear in your webpage.
  3. hussainktm

    On 2006-08-07 13:41:03


    the effect you are looking for can be archived with javascript. it cannot be done with html alone. you can try the following code insert the below code in the head of your html document The image tag should look something like this Hope that helps
  4. John J

    On 2006-08-07 13:38:08


    to make it enlarge you need two images, lets call them img.jpg and imgLarge.jpg. You can then use the tag: When a user clicks on the image it will get large. If you want to make it small again you will need to use more complicated javascript than i just gave you, but I can help if you need it.