Pen Settings



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


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


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.


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.


                <!DOCTYPE html>
<html lang="en">
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <link rel="stylesheet" href="style.css" />
    <!-- header -->
    <header class="header">
      <div class="header-logo">TextLogo</div>
      <nav class="nav">
        <ol class="header__list">
          <li class="header__list-item">Home</li>
          <li class="header__list-item">About</li>
          <li class="header__list-item">Contact</li>

    <!-- cards -->

    <div class="horizontal__cards">
      <img src="" alt="image" class="horizontal__cards-image" id="dogimg" />
      <h3 class="horizontal__cards-title">tata</h3>
      <h4 class="horizontal__cards-subtitle">tata tea</h4>
      <p class="horizontal__cards-paragraph">
        Lorem ipsum dolor sit amet consectetur adipisicing elit. Modi neque
        temporibus et cumque eligendi nihil tempora inventore sapiente

      <button class="horizontal__cards-btn" id="dogbtn">Click me</button>
    <!-- footer -->

    <footer class="footer">
      <ol class="footer__list">
        <li class="footer__list-item">Linkedin</li>
        <li class="footer__list-item">Twitter</li>
        <li class="footer__list-item">Github</li>




                @import url("");



                  const dogUrl = "";
      const dogbtn = document.querySelector("#dogbtn");
      const dogimg = document.querySelector("#dogimg");
      const title = document.querySelector(".horizontal__cards-title");
      const subtitle = document.querySelector(".horizontal__cards-subtitle");
      const paragraph = document.querySelector(".horizontal__cards-paragraph");

      async function getdogdata() {
        const animaldata = await fetch(dogUrl);
        const data = await animaldata.json();
        dogimg.src = data.image_link;
        title.innerHTML =;
        subtitle.innerHTML = data.active_time;
        paragraph.innerHTML = `<li> Diet : ${}</li>`;
      dogbtn.addEventListener("click", getdogdata);