The following example code demonstrates How to Use Marquee Tag in HTML.

How to Create a Multi-Page Document in HTML

For the purpose of creating moving text on a web page, we use the marquee tag. The marquee tag has several attributes. Some important attributes of the marquee tag are direction, scrolldelay, and behavior. While the direction attribute determines the direction of movement. It takes four values – left, right, top, and bottom. Likewise, scrolldelay determines the delay in scrolling. The behavior attribute determines whether the text will move or slide. Other attributes are vspace, hspace, width, height, and bgcolor.

marquee.html

<html>
  <head>
     <title>Marquee Tag</title>
     <style>
        li{
             font-size: 20px;
             color: #800000;
		 padding: 10px;
          }
        div{
		margin: 10px;
		padding: 10px;
            border: 3px #800000 solid;
       }
       ul{
		padding: 10px;
            margin-left: 20px;            
       }
       p{
          font-size: 18px;
          text-align: justify;
          color: #3a3a3a;
       }
     </style>
  </head>
  <body bgcolor="#F4E5F7">
      <center><h1>Marquee Tag</h1></center>
      <div>
           <h2>Marquee Tag</h2>
           <p>The &lt;marquee&gt; tag displays a moving text</p>
           <p>Marquee tag has several attributes. Some of the attributes are given below.</p>
           <ul>
               <li>width</li>
               <li>height</li>
               <li>direction</li>
               <li>scrolldelay</li>
               <li>vspace</li>
               <li>hspace</li>
               <li>behavior</li>
               <li>bgcolor</li>
           </ul>
           <h2>Examples</h2>
           <marquee direction="right" width="300" height="50" vspace="30" hspace="30" bgcolor="#ff1122">First Marquee Text</marquee><br/>
           <marquee direction="left" width="300" height="50" vspace="30" hspace="30" bgcolor="#1122ff">Second Marquee Text</marquee><br/>
           <marquee direction="up" width="300" height="50" vspace="30" hspace="30">Third Marquee Text</marquee><br/>
           <marquee direction="down" width="300" height="50" vspace="30" hspace="30">Fourth Marquee Text</marquee><br/>
           <marquee direction="right" scrolldelay="100">Fifth Marquee Text</marquee><br/>
           <marquee direction="right" scrolldelay="2">Sixth Marquee Text</marquee><br/>
           <marquee direction="right" behavior="slide">Seventh Marquee Text</marquee><br/>

 
     </div>
      <div>
          <a href="home.html">Home</a>
      </div>
      <div style="padding: 20px;">
          <a href="image.html">Image</a><br/>
          <a href="marquee.html">Marquee</a><br/>
          <a href="othertags.html">Other Tags</a><br/>
      </div>
   </body>
</html>

Output

An Example Demonstrating How to Use Marquee Tag in HTML
An Example Demonstrating How to Use Marquee Tag in HTML

The Next Page shows the use of other basic tags in HTML.

https://www.programmingempire.com/how-to-display-different-font-styles-on-a-web-page/


Further Reading

Evolution of JavaScript from ES1 to ES2020

Introduction to HTML DOM Methods in JavaScript

JavaScript Practice Exercise

Understanding Document Object Model (DOM) in JavaScript

Understanding HTTP Requests and Responses

What is Asynchronous JavaScript?

JavaScript Code for Event Handling

Princites

IITM Software Development Cell