<!DOCTYPE html>
<html style="font-size: 16px">
<head>
<meta name="viewport" content="width=800">
<style>
body {
width: 800px;
margin: 0;
overflow-y: hidden;
}
</style>
</head>
<body>
<section contenteditable="true" style="font-size: 2.5rem">
The text inside this textarea should be autosized to 40px computed font-size (16 * 800/320).
</section>
</body>
</html>