<div id="c"></div> <script type="text/javascript"> var obj = {a: 'a', b: 'b', c: 'c'} qqq = 8; for (var i in obj) { qqq += 3; document.getElementById('c').innerHTML += '<span style="font-size: ' + qqq + 'pt">' +obj[i] + '</span>'; } </script>