How to add CSS box around paragraph?

Add CSS Box Around Paragraph: The CSS box model is essentially a box that wraps around every HTML element. It consists of: margins, borders, padding, and the actual content.

CSS Code:

    .provj {
      background-color: #EEEE;
      width: 300px;
      border: 10px solid Blue;
      padding: 30px;
      margin: 20px;
    }

Example with HTML:

    <!DOCTYPE html>
    <html>
    <head>
    <style>
    .provj {
      background-color: #EEEE;
      width: 300px;
      border: 10px solid Blue;
      padding: 30px;
      margin: 20px;
    }
    </style>
    </head>
    <body>
    <div class="provj">Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged.</div>
    </body>
    </html>

Result:


Previous Post Next Post