Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

+ add another resource

JavaScript

Babel is required to process package imports. If you need a different preprocessor remove all packages first.

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

Behavior

Save Automatically?

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 Settings

Here you can Sed posuere consectetur est at lobortis. Donec ullamcorper nulla non metus auctor fringilla. Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.

HTML

              
                <img id="banner">
<h1 id="headline"></h1>
<p id="bodytext"></p>
              
            
!

CSS

              
                @import url('https://fonts.googleapis.com/css?family=Source+Sans+Pro:400,400i,600,700,700i&subset=latin-ext');

body {
  font-family: 'Source Sans Pro', 'Proxima Nova', 'Open Sans', sans-serif;
  text-align: center;
  font-size: 15px;
  padding: 5%;
}

img {
  max-width: 100%;
}
h1 {
  display: block;
    font-size: 2em;
    margin-block-start: 0.67em;
    margin-block-end: 0.67em;
    margin-inline-start: 0px;
    margin-inline-end: 0px;
    font-weight: bold;
}
              
            
!

JS

              
                // Initializes the Delivery JS SDK
const Kk = window['kontentDelivery'];

// Tip: Change the project ID of the API call to yours to display your own content. Make sure the codenames still match.
const deliveryClient = new Kk.DeliveryClient({
  projectId: '8d20758c-d74c-4f59-ae04-ee928c0816b7'
});

// Retrieves the content item from your project
deliveryClient
  .item('hello_caas_world')
  .elementsParameter(['headline', 'body_text', 'picture'])
  .toPromise()
  .then(response => {
    processData(response)});

// Processes the retrieved data and displays it on the page.
function processData(response) {
    const bodyText = response.item.body_text.value;
    const headline = response.item.headline.value;
    const picture = response.item.picture.value[0].url;

    document.getElementById("bodytext").innerHTML = bodyText;
    document.getElementById("headline").append(headline);
    document.getElementById("banner").src = picture;
}
              
            
!
999px

Console