Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the equivalent of <marquee> tag in HTML5?

Tags:

html

In HTML 4, there is this <marquee> tag that shows sliding text across the screen.
What is its equivalent in HTML5?

like image 716
Computings Avatar asked Dec 05 '18 12:12

Computings


People also ask

What is replacement of marquee in HTML5?

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.

Is marquee tag available in HTML5?

The <marquee> tag has been deprecated in HTML5 and should no longer be used. It is recommended that you use CSS instead to create a similar scrolling effect. This tag is also commonly referred to as the <marquee> element.

What is marquee in HTML tag?

The <marquee> tag in HTML is used to create scrolling text or image in a webpages. It scrolls either from horizontally left to right or right to left, or vertically top to bottom or bottom to top.

What happened HTML marquee?

The <marquee> element was used to identify text that should move across a defined section of a webpage in a horizontal or vertical direction. The element has been deprecated and should no longer be used. CSS or JavaScript can be used to create similar effects.


1 Answers

By css animation you can do the same thing

.holder {
  background:#ccc;
  padding:0.5rem;
  overflow: hidden;
}
.news {
  animation : slide 10s linear infinite;
  
}

@keyframes slide {
  0% {
    transform: translatex(0%)
  }

  100% {
    transform: translatex(100%)
  }
}
<div class="holder">
  <div class="news">Hello....</div>
</div>
like image 168
Muhammed Albarmavi Avatar answered Oct 06 '22 21:10

Muhammed Albarmavi