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

              
                <h1>The News</h1>
    <fieldset>
       <div>
           <div class="img1"><img src="https://cdn.cnn.com/cnnnext/dam/assets/220923000916-03-russians-flee-putin-partial-mobilization-intl-hnk-large-tease.jpg" alt="img1"></div>
            <div class="text1"><h3>Terrorist attacks have been increased by 10 percent than pervious 10 years.</h3></div>
        </div>
    </fieldset>
    <br>
    <fieldset>
        <div>
            <div class="img2"><img src="https://cdn.cnn.com/cnnnext/dam/assets/220923104032-01-iran-protest-teele-medium-tease.jpg" alt="img2"></div>
             <div class="text2"><h3>Iranians are risking it all to protest. Their families say some of them aren't coming home.</h3></div>
         </div>
     </fieldset>
     <br>
     <fieldset>
        <div>
            <div class="img3"><img src="https://cdn.cnn.com/cnnnext/dam/assets/220921145046-02-chris-wallace-and-stephen-breyer-medium-tease.jpg" alt="img3"></div>
             <div class="text3"><h3>Retired US Supreme Court Justice Stephen Breyer has a warning for his colleagues.</h3></div>
         </div>
     </fieldset>
     <br>
     <fieldset>
        <div>
            <div class="img4"><img src="https://cdn.cnn.com/cnnnext/dam/assets/220922175350-macron-tapper-interview-vpx-medium-tease.jpg" alt="img4"></div>
             <div class="text4"><h3>Hear Macron's reaction to being linked to Trump's Mar-a-Lago documents.</h3></div>
         </div>
     </fieldset>
     <br><br><br>

     <footer><h4>&copy;The News</h4></footer>
              
            
!

CSS

              
                body{
    padding-left: 20%;
    padding-right: 20%;
    align-self: center;
    background-color: rgb(245, 161, 175);
}
h1{
    text-align: center;
}
fieldset{
    border-radius: 20px;
    border-style: double;
    border-color: blue;
    background-color: rgb(226, 43, 202);
    border-width: 10px;
}



fieldset div div.img1 img{
    height: 120px;
    float: right;
    padding-left: 15px;
    border-radius: 20px;
   
}
fieldset div div.text1 h3{
    color: white;
    padding: 1cm;
    
}
fieldset div div.text1 h3:hover{
    color: red;
    cursor: pointer;
}




fieldset div div.img2 img{
    height: 120px;
    float: left;
    padding-right: 15px;
    border-radius: 20px;
}
fieldset div div.text2 h3{
    color: white;
    
    
}
fieldset div div.text2 h3:hover{
    color: red;
    cursor: pointer;
}



fieldset div div.img3 img{
    height: 120px;
    float: right;
    padding-left: 15px;
    border-radius: 20px;
}
fieldset div div.text3 h3{
    color: white;
    
    
}
fieldset div div.text3 h3:hover{
    color: red;
    cursor: pointer;
}



fieldset div div.img4 img{
    height: 120px;
    float: left;
    padding-right: 15px;
    border-radius: 20px;
}
fieldset div div.text4 h3{
    color: white;
    padding: 1cm;
    
}
fieldset div div.text4 h3:hover{
    color: red;
    cursor: pointer;
}
footer{
    
    text-align: center;
}
              
            
!

JS

              
                
              
            
!
999px

Console