Tuesday, 8 May 2012

Looping through HTML headings


Looping through HTML headings
Loop through the six different HTML headings.


<html>
<body>

<script type="text/javascript">
for (i = 1; i <= 6; i++)
{
document.write("<h" + i + ">This is heading " + i);
document.write("</h" + i + ">");
}
</script>

</body>
</html>


No comments:

Post a Comment