Javascript examples for DOM HTML Element:Span
Changing or setting font size of <span> field
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <script type="text/javascript"> window.onload=function(){//ww w . j a va 2s . com var secondsPerMinute = 60; var minsPerHour = 60; var hoursPerDay = 24; var daysPerWeek = 7; var weeksPerYear = 52; var secondsPerDay = secondsPerMinute*minsPerHour*hoursPerDay; document.write('<span style="font-size: 10px">' + secondsPerDay + '</span>'); } </script> </head> <body> </body> </html>