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

              
                <div dir="ltr">
  <img src="https://assets.codepen.io/144736/neue-donau+%281%29.webp" alt="the danube river in Vienna" width="300"/>

  <blockquote>The Danube (/ˈdæn.juːb/ DAN-yoob; known by various names in other languages) is a river that was once a long-standing frontier of the Roman Empire and today connects 10 European countries, running through their territories or being a border. Originating in Germany, the Danube flows southeast for 2,850 km (1,770 mi), passing through or bordering Austria, Slovakia, Hungary, Croatia, Serbia, Romania, Bulgaria, Moldova, and Ukraine before draining into the Black Sea. Its drainage basin extends into nine more countries. The largest cities on the river are Vienna, Budapest, Belgrade and Bratislava, all of which are the capitals of their respective countries. The Danube passes through four capital cities, more than any other river in the world.[8] Five more capital cities lie in the Danube's basin: Bucharest, Sofia, Zagreb, Ljubljana and Sarajevo. The fourth-largest city in its basin is Munich, the capital of Bavaria, standing on the Isar River.</blockquote>
  
  <p>Wikipedia: <a href="https://en.wikipedia.org/wiki/Danube">Danube</a>
</div>

<div dir="rtl">
    <img src="https://assets.codepen.io/144736/neue-donau+%281%29.webp" alt="the danube river in Vienna" width="300"/>

  <blockquote>The Danube (/ˈdæn.juːb/ DAN-yoob; known by various names in other languages) is a river that was once a long-standing frontier of the Roman Empire and today connects 10 European countries, running through their territories or being a border. Originating in Germany, the Danube flows southeast for 2,850 km (1,770 mi), passing through or bordering Austria, Slovakia, Hungary, Croatia, Serbia, Romania, Bulgaria, Moldova, and Ukraine before draining into the Black Sea. Its drainage basin extends into nine more countries. The largest cities on the river are Vienna, Budapest, Belgrade and Bratislava, all of which are the capitals of their respective countries. The Danube passes through four capital cities, more than any other river in the world.[8] Five more capital cities lie in the Danube's basin: Bucharest, Sofia, Zagreb, Ljubljana and Sarajevo. The fourth-largest city in its basin is Munich, the capital of Bavaria, standing on the Isar River.</blockquote>
  
  <p>Wikipedia: <a href="https://en.wikipedia.org/wiki/Danube">Danube</a>
</div>
              
            
!

CSS

              
                img {
  float: inline-start;
  margin-inline-end: 1rem;
  margin-block-end: 0.5rem;
}


p {
  clear: inline-start;
}












body {
  max-width: 50rem;
}

blockquote {
  margin: 0;
}

div {
  margin-block-end: 3rem;
}

              
            
!

JS

              
                
              
            
!
999px

Console