This page contains HTML code for creating bouncing images.
You can create a bouncing image in HTML using
<marquee> tags. You can make your image bounce sideways or up and down. You can use any image - photos, animated gifs, icons, etc.
Note: Browser support for bouncing images is limited. If you can't see the images bouncing around on this page, it could be that your browser doesn't support this feature of the
Side to Side
To make your image bounce back and forth, use
behavior="alternate". Here's an example:
Note that browser support for bouncing marquees is quite limited.
Up & Down
You can make your image bounce up and down too. To do this, just add
behavior="alternate" direction="up". Example:
Changing the Speed
You can speed up your bouncing image - or slow it down if you prefer. To do this, add the
scrollamount attribute. For example,
scrollamount="1" results in a very slow bounce, while
scrollamount="50" will be very fast.
Try to be careful when using HTML marquees. Many web users dislike websites that contain scrolling or bouncing images and other elements, so try to use them tastefully :)
Also note that the
<marquee> tag is not part of the official HTML specification. Having said that, it is recognized by most major browsers.
More Marquee Codes
You can do much more with HTML marquees than is covered on this page. Here's the full list of marquee codes on this website: