<link href='https://fonts.googleapis.com/css?family=Roboto:400,700' rel='stylesheet' type='text/css'>
    <h2 class="responsive-text">Responsive text</h2>
    <h4 class="responsive-text">Try resizing your browser</h4>
*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html{
    font: normal 20px 'Roboto', sans-serif;
    text-align: center;
}



h2.responsive-text{
    font-size: 6vw;
}

h4.responsive-text{
    font-size: 3vw;
}

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.