DEV Community

John Au-Yeung
John Au-Yeung

Posted on • Originally published at thewebdev.info

How to change the interval time on Bootstrap carousel with HTML?

To change the interval time on Bootstrap carousel with HTML, we set the data-interval attribute.

For instance, we write

<div
  data-ride="carousel"
  class="carousel slide"
  data-interval="10000"
  id="myCarousel"
>
  ...
</div>
Enter fullscreen mode Exit fullscreen mode

to set the data-interval attribute to 10000ms to make the carousel update every 10000ms.

Top comments (0)