Discussion and Coding with Anik - CSS - DIV vs SPAN Tags

In this video,I explained the DIV and SPAN tags in CSS. Feel free to comment. For more, please subscribe and press the BELL icon. Please visit my CSS Playlist. Please link, comment, share and subscribe. The code is as follows -

HTML File - 
<html>
  <head>
     <title> Div vs Span </title>
   <link rel="stylesheet" href="div_span.css">
  </head>

  <body>
  <!-- div for large amount of data's effect -->
  <!-- span for specific effect or for specific data  -->
    <div id="old_div">
   <h2> My name is <span> Anik Acharjee </span> </h2>
   <h2> My age is 28 </h2>
   <h2> My email id is - webgurujianik@gmail.com </h2>
   <h2> My Contact No - <span id="m1"> 999999999 </span> </h2>
</div>
 
   <div id="d1">
    <p> Hi everyone </p>
   </div>
 
   <div>
     <img src="banner.png" alt="Banner Img">
   </div>
 


  </body>
</html>

CSS File - 
#old_div{
color: lightblue;
text-align: center;
font-size: 18px;
}

span {
color:red;
}

#m1 {
color:green;
}

#d1 {
color:green;
background-color: lightpink;
font-size:20px;
}

img {
height:300px;
width:300px;
border: 1px solid green;
padding: 10px;
}


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