Discussion and Coding with Anik - Part-2 - CSS Div Tags with Images

In this video,I explained the CSS Div Tags With Images. Feel free to comment. For more, please subscribe and press the BELL icon. Please visit my CSS Playlist. The code is as follows -

HTML File - 
<html>
   <head>  <title> Exercises 7 </title>
           <link rel="stylesheet" href="exercises7.css">
   </head>
 
   <body>
      <div class="d1">
    <img src="html.png" alt="HTML Image">
  </div>
 
  <div class="d2">
    <img src="css.png" alt="CSS Image">
  </div>
 
  <div class="d3">
    <img src="banner.png" alt="Banner Image">
  </div>
 
   </body>
</html>

CSS File - 
div{
padding: 1%;
width: 30%;
height: 50%;
border: 1px solid green;
float: left;
}

img{
height:150px;
width: 150px;
padding: 15px;
margin: 15px;
border: 1px solid red;
}

.d1 {
background-color: lightblue;
}

.d2 {
background-color: lightpink;
}

.d3 {
background-color: pink;
}


Comments

Popular posts from this blog

Alert Dialog Box in JS || JavaScript Dialog Box

HTML - Frameset Tag in html

Indian Flag || Indian Flag using HTML CSS