Marquee Tag
M2-R5.1 · Chapter 3: HTML Basics · 2 min read
MARQUEE TAG IN HTML
<marquee> tag का उपयोग webpage पर text या images को automatically scroll कराने के लिए किया जाता है।
Text या image को horizontal या vertical direction में move कराया जा सकता है।
<marquee> tag को अलग-अलग attributes की सहायता से customize किया जा सकता है, जैसे:
direction
behavior
scrollamount
scrolldelay
loop
bgcolor
height
width
Note:
<marquee>एक deprecated HTML tag है। Modern websites में scrolling effects के लिए सामान्यतः CSS animations का उपयोग किया जाता है। लेकिन HTML learning और पुराने HTML projects के लिए इसे समझना उपयोगी है।
ATTRIBUTES OF <marquee> TAG
| Attribute | Value | Description | Example |
|---|---|---|---|
| behavior | scroll / slide / alternate | यह निर्धारित करता है कि text या image marquee के अंदर कैसे move करेगा। | <marquee behavior="scroll">Scrolling Text</marquee> |
| direction | left / right / up / down | यह text या image के move करने की direction निर्धारित करता है। | <marquee direction="right">Moving Right</marquee> |
| scrollamount | Number | यह scrolling की speed निर्धारित करता है। Value जितनी अधिक होगी, movement उतना तेज होगा। | <marquee scrollamount="10">Fast Scroll</marquee> |
| scrolldelay | Number (ms) | यह प्रत्येक scrolling movement के बीच delay निर्धारित करता है। Value अधिक होने पर scrolling धीमी दिखाई देती है। | <marquee scrolldelay="200">Slow Scroll</marquee> |
| loop | Number / infinite | यह निर्धारित करता है कि marquee कितनी बार repeat होगा। | <marquee loop="3">Repeats 3 Times</marquee> |
| bgcolor | Color name | यह marquee area का background color set करता है। | <marquee bgcolor="yellow">Yellow BG</marquee> |
| height | Pixels (px) / % | यह marquee area की height निर्धारित करता है। | <marquee height="100px">Tall Marquee</marquee> |
| width | Pixels (px) / % | यह marquee area की width निर्धारित करता है। | <marquee width="300px">Wide Marquee</marquee> |
Examples
1. Behavior
<marquee behavior="scroll">
Scrolling Text
</marquee>
यह text को लगातार scroll करता है।
2. Direction
<marquee direction="right">
Moving Right
</marquee>
यह text को right direction में move करता है।
3. Scrollamount
<marquee scrollamount="10">
Fast Scroll
</marquee>
यह scrolling की speed को increase करता है।
4. Scrolldelay
<marquee scrolldelay="200">
Slow Scroll
</marquee>
यह हर movement के बीच delay बढ़ाता है, जिससे scrolling धीमी दिखाई देती है।
5. Loop
<marquee loop="3">
Repeats 3 Times
</marquee>
यह marquee को 3 times repeat करता है।
6. Background Color
<marquee bgcolor="yellow">
Yellow Background
</marquee>
यह marquee area का background color yellow कर देता है।
7. Height
<marquee height="100px">
Tall Marquee
</marquee>
यह marquee area की height 100 pixels set करता है।
8. Width
<marquee width="300px">
Wide Marquee
</marquee>
यह marquee area की width 300 pixels set करता है।