Open In App

HTML Marquee scrollamount attribute

Last Updated : 16 Jan, 2024
Improve
Improve
Like Article
Like
Save
Share
Report

The Marquee scrollamount attribute in HTML is used to set the amount of scrolling at each interval in pixels. The default speed of the marquee value is 6. It moves the content by displaying it, then delaying it for some short period, and then displaying the content again in a new position.

Note: This attribute is depreciated from HTML5.

Syntax: 

<marquee scrollamount=number >

Attribute value: 

Attribute Value

Description

Number

It defines the speed value.

Example: The implementation of scrollamount attribute

HTML




<!DOCTYPE html>
<html lang="en">
 
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, initial-scale=1.0">
    <title>HTML marquee scrollamount attribute</title>
    <style>
        marquee {
            color: green;
            font-size: 50px;
        }
    </style>
</head>
 
<body>
    <marquee scrollamount="20">GeeksforGeeks</marquee>
</body>
 
</html>


Output:

hju

Example: The implementation of scrollamount attribute with default and custom value of the attribute.

html




<!DOCTYPE html>
<html>
 
<head>
    <title>HTML marquee scrollamount attribute</title>
    <style>
        h1 {
            color: green;
            text-align: center;
        }
 
        .main {
            text-align: center;
        }
 
        .marquee1 {
            padding-top: 30px;
            padding-bottom: 30px;
            background-color: Green;
            direction: left;
        }
    </style>
</head>
 
<body>
    <h1>GeeksforGeeks</h1>
    <div class="main">
        <marquee class="marquee1">
            scrollamount: default(6)
        </marquee>
        <marquee class="marquee1" scrollamount="10">
            scrollamount: 10
        </marquee>
    </div>
</body>
 
</html>


Output: 

Supported Browsers:

  • Google Chrome 1
  • Edge 12
  • Firefox 65
  • Apple Safari 7.2
  • Opera 1.2


Like Article
Suggest improvement
Share your thoughts in the comments

Similar Reads