
| Syntax Of HTML Marquee Tag |
| <marquee> <content needed to be scrolled> </marquee> |
| Common Attributes Of HTML Marquee Tag | ||
| Attributes | Syntax | Uses |
| bgcolor | <marquee bgcolor="Name of the color"> | Used for changing the background color of the text. |
| direction | <marquee direction="left/right/up/down"> | It specifies the direction of scrolling content |
| loop | <marquee loop="Number of Loop you want"> | It defines the number of times the content will move. The default value is infinite. |
| height | <marquee height="value"> | It is used for defining the height of the text or image. |
| width | <marquee width="value"> | It is used for defining the width of the text or image. |
| hspace | <marquee hspace="value"> | Specify horizontal space around the text or image. |
| vspace | <marquee vspace="value"> | Used for defining the vertical space around text or image. |
| HTML Marquee Tag Example Of Right to Left Scrolling |
| <!DOCTYPE html> <html> <head> <title>Marquee Tag</title> <style> .main { text-align: center; } .marq { padding-top: 30px; padding-bottom: 30px; } .PW1, .PW2 { font-size: 48px; /* Increased font size */ font-weight: bold; color: yellow; /* Changed color to yellow for better contrast */ padding-bottom: 10px; } </style> </head> <body> <div class="main"> <marquee class="marq" bgcolor="Blue" direction="left" loop=""> <div class="PW1"> PW Skills </div> <div class="PW2"> A Physics Wallah Tech Portal </div> </marquee> </div> </body> </html> |
| Output- |
| Example Of HTML marque Tag with Bottom to Top Scrolling |
| <!DOCTYPE html> <html> <head> <title>Marquee Tag</title> <style> .main { text-align: center; } .marq { padding-top: 30px; padding-bottom: 30px; height: 200px; overflow: hidden; } .PW1, .PW2 { font-size: 48px; font-weight: bold; color: yellow; padding-bottom: 10px; } </style> </head> <body> <div class="main"> <marquee class="marq" bgcolor="Blue" direction="up"> <div class="PW1"> PW Skills </div> <div class="PW2"> A Physics Wallah Tech Portal </div> </marquee> </div> </body> </html> |
| Output- |