Press "Enter" to skip to content

Margin Examples in CSS

Last updated on October 5, 2019

Definition :

Which is meant for to create an external space for the webpage.

Program :

<html>

     <style type=”text/css”>

                    #First

                                {

                                  color: red;

                                  width: 100px;

                                  height: 100px;

                                  background-color: green;

                                  border-radius: 10px;

                                  text-align: center;

                                  font-size: 20px;

                                  margin-left: 100px;

                                  margin-top: 100px;

                                  margin-bottom: 100px;

                                  margin-right: 100px;

                                }

                </style>

                <body>

                     <p id=”First”> HI </p>

                                 <p> A </p>

                </body>

</html>

Be First to Comment

    Leave a Reply

    Your email address will not be published. Required fields are marked *