CSS Tutorial: Border & Background

 


<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title> Height,Width,border and backgrounds </title>
    <style>
     #firstpara{
         colorwhite;
         background-color:red;
         height100px;
         width455px;
         border-width4px;
         border-colorblack;
         border-stylesolid;
         border-radius10px;
     }

     #secondpara{
         colorblack;
         background-colorchartreuse;
         height100px;
         width455px ;
         border-top2px solid red;
         border-right2px solid  yellow;
         border-bottom2px solid blue;
         border-left2px solid black;
         border-top-left-radius12px;
         border-bottom-right-radius12px;
     }

     #thirdpara{
         height:241px;
         width150px;
         background-imageurl("https://codewithharry.com/static/home/img/photo.png");
         border2px solid red;
         background-repeatno-repeat;/* repeat-x and repeat-y will make it repeat x and y axis*/
         background-positioncenter center ; 
         /* background-position: 192px 32px; */
         /* background-position: center right; */
         /* background-position: top left; */
         /* background-position: top center; */
         /* background-position: bottom center; */
         /* background-position: bottom right; */
     }
    </style>
</head>
<body>
   <h3>This is the heading</h3>
   <p id="firstpara">This is the paragraph</p>

   <h3>This is second heading</h3>
   <p id="secondpara">This is my second paragraph</p>

   <h3>This is third heading</h3>
   <p id="thirdpara">This is my third paragraph</p>
</body>
</html>