Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs added here will be added as <link>s in order, and before the CSS in the editor. You can use the CSS from another Pen by using its URL and the proper URL extension.

+ add another resource

JavaScript

Babel includes JSX processing.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource

Packages

Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.

Behavior

Auto Save

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

HTML

              
                <!-- Carousel -->
<div id="demo" class="carousel slide" data-bs-ride="carousel">
  <!-- .carousel  creates a carousel -->
  <!-- .slide  Adds a CSS transition and animation effect when transitioning from one element to the next. If you don't want to use this effect, you can remove this class. -->
  <!-- Indicators/dots -->
  <div class="carousel-indicators">
    <!-- .carousel indicators create the dots. The ots can inform the user which slide it is on and how many images are in this carousel.-->
    <button type="button" data-bs-target="#demo" data-bs-slide-to="0" class="active"></button>
    <button type="button" data-bs-target="#demo" data-bs-slide-to="1"></button>
    <button type="button" data-bs-target="#demo" data-bs-slide-to="2"></button>
  </div>
  <!-- The slideshow/carousel -->
  <div class="carousel-inner">
    <!-- .carousel-inner add slides to the carousel -->
    <div class="carousel-item active">
      <img src="https://images.unsplash.com/photo-1604580864964-0462f5d5b1a8?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=1170&q=80" class="d-block" style="width: 100%" />
      <div class="carousel-caption">
        <h3>Why did the snowman get a divorce?</h3>
        <p>His wife was a total flake...</p>
      </div>
    </div>
    <div class="carousel-item">
      <!-- .carousel-item specifies the content of each slide -->
      <img src="https://images.unsplash.com/photo-1472173148041-00294f0814a2?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=1170&q=80" class="d-block" style="width: 100%" />
    </div>
    <div class="carousel-item">
      <img src="https://images.unsplash.com/photo-1447069387593-a5de0862481e?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=1169&q=80" class="d-block" style="width: 100%" />
    </div>
  </div>
  <!-- Left and right controls/icons -->
  <!--.carousel-control-prev adds a left (previous) button to the loop that lets the user cycle back through slides -->
  <button class="carousel-control-prev" type="button" data-bs-target="#demo" data-bs-slide="prev">
    <span class="carousel-control-prev-icon"></span> <!-- .carousel-control-prev-icon adds a icon for previous button -->
  </button>
  <button class="carousel-control-next" type="button" data-bs-target="#demo" data-bs-slide="next">
    <span class="carousel-control-next-icon"></span> <!-- .carousel-control-next-icon adds a icon for next button -->
  </button>
</div>
</div>

  <a style="all:unset;font-family: Roboto, arial, sans-serif;font-size: 20px;width: 100%;text-align: center;display: block;background: linear-gradient(135deg,#001634 10%,#2e143e);line-height: 50px;color: white;position: absolute;top: 0;left: 0;right: 0;text-decoration: none;cursor:pointer;z-index: 9999;" target="_blank" href="https://appcode.app/how-to-create-an-html-carousel/">Made With ❤️ Click this banner to checkout the tutorial --></a>
              
            
!

CSS

              
                
              
            
!

JS

              
                
              
            
!
999px

Console