<!DOCTYPE HTML>
<html>
<head></head>
<body>
<input id="text-size" min="12" max="50" type="range" value="12">
<div id="text">Text</div>
<script type="text/javascript">
(function(d) {
var s = d.getElementById('text').style;
d.getElementById('text-size').onchange = function() {
s.fontSize = this.value + 'pt';
};
})(document);
</script>
</body>
</html>