How to Move Image in HTML ?
You can easily move images in HTML using <marquee> tag. It is used to create scrolling images either from horizontally left to right or right to left, or vertically top to bottom or bottom to top. By default, image found within the <marquee> tag will scroll from right to left.
<marquee> <img src=""> </marquee>
Attributes of <marquee> tag:
- direction: Sets the direction for the scrolling images. The value of this attribute can be left, right, up or down.
- behavior: The behavior tells about how the text scrolls. It can be one of the following values which are alternate, scroll, slide.
Example 1: The following example uses scroll behavior.
Example 2: The following example uses the alternate behaviour.