I was wondering what is the advantages and disadvantages to use HTML tag as opposed to achieving the same scrolling text effect using Javascript?
Is the use of <marquee>
HTML tag encouraged?
I was wondering what is the advantages and disadvantages to use HTML tag as opposed to achieving the same scrolling text effect using Javascript?
Is the use of <marquee>
HTML tag encouraged?
- 3 marquee, my oh my oh my divshot.github.io/geo-bootstrap – NimChimpsky Commented May 14, 2013 at 12:44
- I, for one, wele our underconstruction.gif animated overlords. – Jeff Watkins Commented May 14, 2013 at 12:45
- Have a look at developer.mozilla/en-US/docs/Web/HTML/Element/marquee. – Felix Kling Commented May 14, 2013 at 12:45
2 Answers
Reset to default 8You ask
Is the use of
<marquee>
HTML tag encouraged?
The w3 answers :
No, really. don't use it.
You have no guarantee of marquee
element support across future browsers and even when it's present, some of its options might be absent in today's browsers (for example I tested MDN's examples in Chrome and I got a different bouncing effect than in Firefox).
Most users would prefer not to see any JavaScript based solution either, but if you really need it (like, your boss asks for it), then a search of "JavaScript marquee" gives many solutions, for example
Very Simple, Very Smooth, JavaScript Marquee
JavaScript based solutions have the advantages of being configurable and of not being based on a non standard element ("HTML5 classifies it as a non-conforming feature.").
- Marquee is Microsoft 1990's technology
- Marquee was/is/will never be a w3c standard
- Marquee is very ugly,
but
ALL browsers support it (even IOS safari!)
then
if you are sure you want this very ugly think on your website, use it.
eventual future non supporting browsers simply fallback to simple static style.