Labels

Powered by Blogger.

Social Icons

Social Icons

Featured Posts


Text Widget

Saturday, February 8, 2014

PERTEMUAN VIII

disini saya akan mencoba bagaimana membuat pohon terang dari html. Mana tau nanti di tahun berikutnya pohon terangnya bisa kita rubah warnanya. (hehehe )


<html>
<head>
<title>Untitled Document</title>
<style>
h1{
background-color:‪#‎0000FF‬;
color:‪#‎FFFF00‬;
font-size:24px;
font-family:Arial, Helvetica, sans-serif;
text-align:center;
}
</style>
</head>

<body>
<h1>POHON NATAL </h1>
<table align="center" bgcolor="green">

<script>
var dx,i,j;
dx=1;for (i=1;i<=15;i++)
{
document.write("<tr><td align=center>");
for (j=1;j<=dx;j++)
{
if (j % 2 == 0)
document.write("<blink><font color=red>*</font></blink>");
else
document.write("<font color=yellow>*</font>");
}
dx=dx+2;
document.write("</td></tr>");
}
for (i=1;i<=5;i++)
{
document.write("<tr><td align=center>");
for (j=1;j<=3;j++)
{
document.write("<font color=white>*</font>");
}
document.write("</td></tr>");
}
</script>
</table>
</body>

</html>


hasil :

0 comments:

Post a Comment