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 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

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

              
                <!DOCTYPE html>
<html>
    <head>
        <title>hello world </title>

        
        <link rel = "stylesheet"
            type = "text/css"
            href = "style.css" />
        
    </head>

<body>
<header>

<div>
    <img src="logo.png" alt="logo" >
  <ul>
      <li>Home</li>
      <li>Contact</li>
      <li>Picture</li>
  </ul></div>
</header>
<section>

    <div id="main_title"><h2>Title</h2></div>
    
    <article>
        <div id="title">Article 1</div>
                <img src="https://images.pexels.com/photos/373912/pexels-photo-373912.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=650&w=940" alt="Solar" >
                <div id="content"><h3>Content</h3></div>
    </article>
    <article>
        <div id="title">Article 1</div>
        <img src="https://images.pexels.com/photos/302769/pexels-photo-302769.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=650&w=940" alt="Solar" >
        <div id="content"><h3>Content</h3></div>
    </article>
    <article>
            <div id="title">Article 1</div>
            <img src="https://images.pexels.com/photos/162539/architecture-building-amsterdam-blue-sky-162539.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=650&w=940" alt="Solar" >
            
            <div id="content"><h3>Content</h3>
            <p>This is some text that need to be tested</p>
            </div>
    </article>
</section>
<footer>
end of web
</footer>

</body>
</html>
              
            
!

CSS

              
                body{
    margin: 0;
    padding: 0;
    font-family: sans-serif
   
}
header{
    border: 1px solid black;
    margin: 0;
    padding: 0;
    background-color: rgba(65, 64, 64, 0.842);
    text-align: right;
  
    
}

header div{
    width: 1200px;

    margin: 0 auto;
}
header div img{
   float: left;
  background-color: red;
    width: 100px;
    height: 100px;
    
   

}

header div ul{
    
    margin: 0;
    padding: 0;
    font-family: cursive;
    display: inline-block;
    vertical-align:middle;
    
    
}
header ul li{
    list-style-type: none;
    display: inline;
    margin-right: 20px;
    padding: 20px;
    font-size: 20px;
    color: white;
    line-height: 100px; /* this is important to align the text on center of the web */
}
header ul li:hover{
    background-color: rgb(0, 0, 0);
    margin-right: 20px;
    padding: 20px;
    border-radius: 15%;
    

}



section{
   border: 1px solid black; 
    margin: 5px 70px;
    display: flex;
    padding: 0;
    flex-wrap: wrap;
    justify-content: space-around;
}
section  div h2{
    text-align: center;

}
section #main_title{
    border: 1px solid black;
    width: 101%;
    margin: 0;
    padding: 0;
    background-color: blue;

}
section article {
   justify-content: space-around;   
   
   text-align: center;
    width: 30%;
    margin: 5px ;
    padding: 0;
    transition: 2s;
    
}
section article:hover{

    width: 35%;
    box-shadow: 3px 3px rgb(59, 59, 59);
    transition: 2s;
}
section article img{
    background-color: red;
    height: 200px;;
    width: 200px;
    margin: 0;
   transition: .2s;
}
section article img:hover{
    height: 210px;
    width: 210px;
    transition:  .5s;
}

section article #content{
    margin-top: 10px;
    text-align: left;
    
}
section article #content h3{
    padding: 0;
    margin: 0 10px;  
}
section article #content p{

    padding: 0 ;
    margin: 0 30px;
    font-style: oblique;
}
footer{
    border: 1px solid black;
     bottom: 0;
    width: 100%;
    position: fixed;
}



              
            
!

JS

              
                
              
            
!
999px

Console