CSS - Measurement Units



Example -Demo [%]percentage unit

<!DOCTYPE html>
<html>
<head>
    <style>
        .forty-percent {
            font-size: 40%;
        }
        
        .sixty-percent {
            font-size: 60%;
        }
        
        .eighty-percent {
            font-size: 80%;
        }
    </style>
</head>
<body>
    <p class="forty-percent">This text has a font size of 40%.</p>
    <p class="sixty-percent">This text has a font size of 60%.</p>
    <p class="eighty-percent">This text has a font size of 80%.</p>
</body>
</html>
Advertisements