.class { font-size: 12px; }
<body> <h1 style="color:red;font-size:40px;">Heading</h1> <p style="color:blue;font-size:18px;">This is demo text</p> </body>
p { font-size: 150% /*px, cm, in, etc.*/; }
font-size: 2em;
#selector{ font-size:20px; }
.class { text-align: center; }
div { height: 200px; width: 50%; background-color: powderblue; }
// to scale font size in relation to its parent element style="font-size: 2vw;"