Bouncing Image

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 <marquee> tag.

Side to Side

To make your image bounce back and forth, use behavior="alternate". Here's an example:

Source CodeResult
Cup of coffee on saucer

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:

Source CodeResult
Buzzy bee

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.

Some examples:

Source CodeResult
Buzzy bee Buzzy bee Buzzy bee Buzzy bee

Marquee Usability

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:

About HTML.am

HTML.am was created in order to provide HTML tools, codes, tutorials, and other resources to help webmasters create and maintain their HTML documents.

HTML.am aims primarily at beginners, but may also be useful to web professionals.

About the HTML Codes

The HTML codes on this website are provided free of charge, for you to use however you wish. Feel free to modify the code to suit your own needs.

Related Sites

Here are some other sites you may like: