HTML Marquee

Bookmark
Learn about scrolling a text horizontally and vertically using marquee tag.

Marquee is not a standard HTML tag. It is sill being widely and supported by all the web browsers and let use learn about marquee in this HTML chapter. Marquee tag <marquee> is used to scroll text or image content horizontally or vertically in its tag element container.

  • It is better not use HTML marquee as it does not give a pleasant user experience.

Marquee Attributes

Marquee Attribute Description
behavior scroll, slide, alternate are possible values and it defines the marquee behvior.
direction left, right, up or down.
scrolldelay delay between scrolls in seconds.
scrollamount number of scrolls.
loop loop for marquee content.

Scroll Marquee Example

<marquee behavior="scroll">
HTML is easy to learn.
</marquee>

Example Output

HTML is easy to learn.

Slide Marquee Example

behavior of slide will scroll only once.

<marquee behavior="slide">
HTML is easy to learn.
</marquee>

Example Output

HTML is easy to learn.

Alternate Marquee Example

This will scroll the content alternately in both directions.

<marquee behavior="alternate">
HTML is easy to learn.
</marquee>

Example Output

HTML is easy to learn.

Exception Occured:

TypeErrorException
Messageerror_log(app.log): Failed to open stream: Permission denied
File/home/dh_czz6eb/tutorialwalk.com/common/error.php
Line36
Trace#0 (): log_error(2, 'error_log(app.log): Failed to open stream: Permission denied', '/home/dh_czz6eb/tutorialwalk.com/common/error.php', 36)
#1 /home/dh_czz6eb/tutorialwalk.com/common/error.php(36): error_log('21-12-2024 17:48:39 pm (IST),/home/dh_czz6eb/tutorialwalk.com/common/common.php,193,0,ErrorException,Optional parameter $per_page declared before required parameter $href is implicitly treated as a required parameter,/html/html-marquee.html,#0 /home/dh_czz6eb/tutorialwalk.com/common/error.php(115): log_error(8192, 'Optional parame...', '/home/dh_czz6eb...', 193)
#1 [internal function]: check_for_fatal()
#2 {main}
', 3, 'app.log')
#2 /home/dh_czz6eb/tutorialwalk.com/common/error.php(8): log_exception(ErrorException)
#3 /home/dh_czz6eb/tutorialwalk.com/common/error.php(115): log_error(8192, 'Optional parameter $per_page declared before required parameter $href is implicitly treated as a required parameter', '/home/dh_czz6eb/tutorialwalk.com/common/common.php', 193)
#4 (): check_for_fatal()
REQUEST_URI/html/html-marquee.html