Responsive font size

he text size can be set with a vw unit, which means the “viewport width”.

That way the text size will follow the size of the browser window.

<h1 style=”font-size:8vw;”>Text1</h1>
<p style=”font-size:2vw;”>Resize the browser window to see how the font size scales.</p>

Leave a comment

Your email address will not be published. Required fields are marked *