Open In App

HTML DOM Marquee vspace Property

Last Updated : 03 Mar, 2022
Improve
Improve
Like Article
Like
Save
Share
Report

The HTML DOM Marquee vspace Property is used to set or return the value of the vspace attribute of the <marquee> Tag. The vspace attribute is used to specify the vertical margin around the marquee element.

Syntax

It returns the marquee vspace Property.

marqueeObject.vspace;

It sets the marquee vspace Property.

marqueeObject.vspace = "px/%"

Property Values

  • px: Specify vertical space around marquee.
  • %: Specify vertical space around marquee.

Return Value: It returns a numeric value that represents the number of vertical spaces around an element. 

Note: The marquee vspace Property is not supported in HTML 5.

Example: Below HTML code helps to return the marquee vspace Property. 

HTML




<!DOCTYPE html>
<html>
 
<head>
    <title>
        HTML DOM Marquee vspace property
    </title>
</head>
 
<body style="text-align:center;">
 
    <h1 style="color:green;">
        GeeksforGeeks
    </h1>
 
    <h2>DOM Marquee vspace Property</h2>
 
    <marquee id="marqueeID" direction="right"
             loop="3" bgcolor="green" vspace="10%">
        GeeksforGeeks:A computer Science
        Portal for Geeks
    </marquee>
 
    <button onclick="btnClick()">
        Return vspace property
    </button>
    <p id="sudo"></p>
 
 
    <script>
        function btnClick() {
            var txt = document.getElementById("marqueeID").vspace;
            document.getElementById("sudo").innerHTML = txt + "%";
        }
    </script>
</body>
 
</html>


Output:

HTML DOM Marquee vspace Property

HTML DOM Marquee vspace Property

Supported Browsers:

  • Google Chrome
  • Internet Explorer
  • Firefox
  • Apple Safari
  • Opera


Like Article
Suggest improvement
Previous
Next
Share your thoughts in the comments

Similar Reads