- HTML Tutorial
- HTML - Home
- HTML - History and Evolution
- HTML - Overview
- HTML - Editors
- HTML - Basic Tags
- HTML - Elements
- HTML - Attributes
- HTML - Formatting
- HTML - Headings
- HTML - Paragraphs
- HTML - Quotations
- HTML - Comments
- HTML - Phrase Tags
- HTML - Meta Tags
- HTML - Style Sheet
- HTML - CSS Classes
- HTML - CSS IDs
- HTML - Images
- HTML - Image Map
- HTML Tables
- HTML - Tables
- HTML - Headers & Caption
- HTML - Table Styling
- HTML - Table Colgroup
- HTML - Nested Tables
- HTML Lists
- HTML - Lists
- HTML - Unordered Lists
- HTML - Ordered Lists
- HTML - Definition Lists
- HTML Links
- HTML - Text Links
- HTML - Image Links
- HTML - Email Links
- HTML - Iframes
- HTML - Blocks
- HTML Backgrounds
- HTML - Backgrounds
- HTML Colors
- HTML - Colors
- HTML - RGB
- HTML - HEX
- HTML - HSL
- HTML Forms
- HTML - Forms
- HTML - Form Attributes
- HTML - Form Control
- HTML - Input Attributes
- HTML Media
- HTML - Video Element
- HTML - Audio Element
- HTML - Embed Multimedia
- HTML Header
- HTML - Head Element
- HTML - Adding Favicon
- HTML - Javascript
- HTML Layouts
- HTML - Layouts
- HTML - Layout Elements
- HTML - Layout using CSS
- HTML - Responsiveness
- HTML - Symbols
- HTML - Emojis
- HTML - Style Guide
- HTML Graphics
- HTML - SVG
- HTML - Canvas
- HTML APIs
- HTML - Geolocation API
- HTML - Drag & Drop API
- HTML - Web Workers API
- HTML - WebSocket
- HTML - Web Storage
- HTML - Server Sent Events
- HTML Miscellaneous
- HTML - MathML
- HTML - Microdata
- HTML - IndexedDB
- HTML - Web Messaging
- HTML - Web CORS
- HTML - Web RTC
- HTML Demo
- HTML - Audio Player
- HTML - Video Player
- HTML - Web slide Desk
- HTML Tools
- HTML - Velocity Draw
- HTML - QR Code
- HTML - Modernizer
- HTML - Validation
- HTML - Color Code Builder
- HTML References
- HTML - Tags Reference
- HTML - Attributes Reference
- HTML - Events Reference
- HTML - Fonts Reference
- HTML - ASCII Codes
- ASCII Table Lookup
- HTML - Color Names
- HTML - Entities
- MIME Media Types
- HTML - URL Encoding
- Language ISO Codes
- HTML - Character Encodings
- HTML - Deprecated Tags
- HTML Resources
- HTML - Quick Guide
- HTML - Useful Resources
- HTML - Color Code Builder
- HTML - Online Editor
HTML - <marquee> Tag
An HTML marquee is a scrolling piece of text displayed either horizontally across or vertically down your webpage depending on the settings. This is created by using HTML <marquees> tag.
The HTML <marquee> tag may not be supported by various browsers so its not recommended to rely on this tag, instead you can use Javascript and CSS to create such effects.
Syntax
A simple syntax to use HTML <marquee> tag is as follows −
<marquee attribute_name="attribute_value"....more attributes> One or more lines or text message or image </marquee>
The <marquee> Tag Attributes
Following is the list of important attributes which can be used with <marquee> tag.
Sr.No | Attribute & Description |
---|---|
1 | width This specifies the width of the marquee. This can be a value like 10 or 20% etc. |
2 | height This specifies the height of the marquee. This can be a value like 10 or 20% etc. |
3 | direction This specifies the direction in which marquee should scroll. This can be a value like up, down, left or right. |
4 | behavior This specifies the type of scrolling of the marquee. This can have a value like scroll, slide and alternate. |
5 | scrolldelay This specifies how long to delay between each jump. This will have a value like 10 etc. |
6 | scrollamount This specifies the speed of marquee text. This can have a value like 10 etc. |
7 | loop This specifies how many times to loop. The default value is INFINITE, which means that the marquee loops endlessly. |
8 | bgcolor This specifies background color in terms of color name or color hex value. |
9 | hspace This specifies horizontal space around the marquee. This can be a value like 10 or 20% etc. |
10 | vspace This specifies vertical space around the marquee. This can be a value like 10 or 20% etc. |
Below are few examples to demonstrate the usage of marquee tag.
Example 1
<!DOCTYPE html> <html> <head> <title>HTML marquee Tag</title> </head> <body> <marquee>This is basic example of marquee</marquee> </body> </html>
Example 2
<!DOCTYPE html> <html> <head> <title>HTML marquee Tag</title> </head> <body> <marquee width="50%">This example will take only 50% width</marquee> </body> </html>
Example 3
<!DOCTYPE html> <html> <head> <title>HTML marquee Tag</title> </head> <body> <marquee direction="right">This text will scroll from left to right</marquee> </body> </html>
Example 4
<!DOCTYPE html> <html> <head> <title>HTML marquee Tag</title> </head> <body> <marquee direction="up">This text will scroll from bottom to up</marquee> </body> </html>
html_deprecated_tags.htm
Advertisements