HTML: <marquee> tag

The HTML <marquee> tag defines a scrolling text area in the HTML document that moves across the page in a horizontal or vertical direction.

In HTML we learn different type of <marquee> tags.

Marquee used different type of element which executes as per user choice:

Syntax:

  • <marquee>Default scrolling</marquee>

  • <marquee bgcolor="#d9d9ff" hspace="50" vspace="20">Background and Space</marquee>

  • <marquee behavior="alternate">Bounce back and forth</marquee>

  • <marquee direction="right">It moves right</marquee>

  • <marquee direction="down" height="100">It moves down</marquee>

  • <marquee direction="down" behavior="alternate" height="150"><marquee behavior="alternate"><font size="7">?</font></marquee></marquee>

  • <marquee scrolldelay="85" scrollamount="6">Default speed</marquee>

  • <marquee scrolldelay="50" scrollamount="10" truespeed>Very fast !!</marquee>

  • <marquee scrolldelay="200" scrollamount="3">Very slow ...</marquee>

Example

<!DOCTYPE html>
<html>
    <head>
        <title>Page Title</title>
<style>
#id{
  background-color: lightblue;
  color: black;
  padding: 40px;
  text-align: center;

</style>
    </head>
    <body>
 <body><div id="id">
<marquee direction="down" height="100" width="200" bgcolor="white">Scrolling text</marquee>
</body>
    </body>
</html>

Conclusion

This tutorial covers all type of marquee effects. By using marquee we make web pages with the running text. Now a day all web application created with marquee effect so it is very important for each developer to develop web application.

Powered  by Codersarts