Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

why marquee tag not working in google chrome.?

I want to insert an image into marquee tag.

I have written following code:

<marquee scrollamount="4" behavior="alternate" direction="right" width="300"><img width="180px" style="padding-left:30px;opacity:0.7" src="img/cloud3.png"></marquee>

Its working fine in firefox and IE but not working in chrome. What is the problem.? Please reply as early as possible. Thanks in advance.

like image 844
Anand Jaju Avatar asked May 06 '13 05:05

Anand Jaju


People also ask

Will the marquee work in any browser?

The MARQUEE element was first created by Internet Explorer and was eventually supported by Chrome, Firefox, Opera, and Safari, but it is not an official part of the HTML specification. If you must create a scrolling section of your page, it's best to use CSS instead.

Does the marquee tag still work?

The HTML <marquee> tag defines a scrolling text area in the HTML document that moves across the page in a horizontal or vertical direction. By default, text found within the <marquee> tag will scroll from right to left. The <marquee> tag has been deprecated in HTML5 and should no longer be used.

Why was marquee removed?

The marquee element creates scrolling text that is difficult to read and click on. Beyond that, it can be distracting to viewers, especially to those with low vision, cognitive disabilities, or attention deficits. People with attention deficits or cognitive disabilities could become distracted by content that scrolls.

What replaced marquee in HTML?

Use CSS animation instead of <marquee> CSS animation enables you to create the marquee effect and make it user-friendly by using the prefers-reduced-motion media query to stop all animations for those who don't want them.


2 Answers

Because the marquee tag is a crime against nature. And it's no longer supported in newer versions of Chrome.

like image 139
feesh Avatar answered Nov 02 '22 19:11

feesh


The marquee is not supported in modern html. Chrome dropped support for it a while ago. You need to implement this via CSS3 or Javascript.

Further W3C states that it is non standard and should not be used.

The effect can be easily acheived via jQuery or via CSS3

like image 43
zellio Avatar answered Nov 02 '22 19:11

zellio