borders and background in html while using css

 <!DOCTYPE html>

<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Height, width, borders and backgrounds</title>
    <style>
        #firstPara {
            background-color: red;
            height100px;
            width455px;
            border4px solid green;
            /* border-width: 4px;
          border-color: green;
          border-style: solid; */
            border-radius11px;
        }

        #secondPara {
            background-color: rgb(2823573);
            height100px;
            width455px;
            border-top2px solid violet;
            border-right2px solid rgb(21915134);
            border-bottom2px solid rgb(110044);
            border-left2px solid rgb(44497);
            border-top-left-radius4px;
            border-top-right-radius14px;
            border-bottom-left-radius8px;
            border-bottom-right-radius24px;
        }

        #thirdPara {
            height200px;
            width455px;
            background-image: url('https://codewithharry.com/static/home/img/photo.png');
            border2px solid red;
            background-repeat: no-repeat;
            background-position: center center;

        }
    </style>
</head>

<body>
    <h3>This is heading</h3>
    <p id="firstPara">This is 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>

Comments

Popular posts from this blog

priority_queue

Alignment in css

Queue data structure in c++