Java applets can automate and animate your web page. To use them, you will need to go beyond standard html and you may also increase download time for your user, but sometimes these applets are well worth the effort. Nathan Miserocchi has created the following examples pages that employ Java applets:
The third page puts together the principles of the first two. Nathan has supplied source code that includes comment lines that explain how these samples work. All of the files he refers to can be found copied in the html folder containing my page that you are now reading. Nathan and I are happy to have people try out these example pages, View | Source to read the commentary, download the files, and modify them and use them in their own web pages.
One can find hundreds of free Java applets on the web just ready for use, such as those on specialized sites (search via Google) or on general resource sites such as Adeveloper.com.