CSS - Measurement Units



Example -Demo rem unit

<!DOCTYPE html>
<html>
<head>
  <style>
    .text-2rem {
      font-size: 2rem;
    }
    
    .text-4rem {
      font-size: 4rem;
    }
    
    .text-6rem {
      font-size: 6rem;
    }
  </style>
</head>
<body>
  <h1 class="text-2rem">This is a 2rem font</h1>
  <h1 class="text-4rem">This is a 4rem font</h1>
  <h1 class="text-6rem">This is a 6rem font</h1>
</body>
</html>
Advertisements