CSS Dimension Example




CSS Dimension Example

<!DOCTYPE html>
<html>
   <head>
      <style type="text/css">
         div {
            height: 200px;
            width: 50%;
            background-color: blue;
         }
      </style>
   </head>
   <body>
      <h2>Set the height and width of an element</h2>
      <p>This div element has a height of 200px and a width of 50%:</p>
   </body>
</html>

Output