Kamis, 21 April 2011

LATIHAN CSS


CSS

Myweb.html

<html>
<head>
<title>Penggunaan CSS</title>
<style type="text/css">
h4.as_internal{
color:#00ff00; font-family:tahoma, verdana, geneva, lucida,
'lucida-grande',arial, helvetica, sans-serif; font-size:14px; font-weight:bold;}
td.as_internal{
background-color:green;
}
</style>
<link rel="stylesheet" type="text/css" href="mystyle.css">
</head>
<body>
<table width="780" border="5" align="center">
<tr>
<td class="as_external" colspan="3" align="center"><h4 class="as_external">Penggunaan Style Sheet Extenal</h4></td>
</tr>
<tr>
<td class="as_internal" colspan="3" align="center"><h4 class="as_external">Penggunaan Style Sheet Internal</h4></td>
</tr>
</tr>
<td style="background-color:lightskyblue;" colspan="3" align="center"><h4 style="color:blue;
font-family:tahoma,verdana,geneva,lucida,'lucida grande',arial,helvetica,san serif; font-size:
14px; font-weight:bold;">Penggunaan Style Sheet Inline</h4></td>
</tr>
<tr>
<td colspan="3"align="center"><h4>Tanpa Penggunaan Style Sheet</h4></td>
</tr>
<tr align="as_internal">
<td class="as_internal" colspan="3" align="center"><a href="album.html"><b>Album</b></a></td>
</tr>
<tr>
<td colspan="3"<hr></td>
<tr>
<td>Nama</td>
<td colspan="2"><input type="text" name="text1" class="inputbox" value="" size="100"></td>
</tr>
<tr>
<td>Alamat</td>
<td colspan="2"><input type="text" name="text2" class="inputbox" value="" size="100"></td>
</tr>
<tr><td colspan="3"><hr></td>
</tr>
<tr>
<td colspan="3">
<input type="submit" class="button" value="submit">&nbsp;
<input type="reset" class="button" value="reset"></td>
</tr>
</table>
</body>
</html>

Mystyle.css

body{
background: white;
margin: 0px;
}
h4.as_external{
color:red;
font-family:tahoma, verdana, geneva, lucida, 'lucida grande', arial, helvetica, san serif:
font-size:14px; font-weigh;bold;
}
a:link,a:visited{
font-size:14px;
color:red;
text-decoration: bold;
font-family: tahoma, verdana, geneva, lucida, 'lucida grande', arial, helvetica, san serif;
}
hr{
background:yellow;
height:15px;
border:1px solid #000000;
}
.button{
font-family:verdana, arial, helvetica, san serif;
font-style:normal;
font-size:12px;
border-style:solid;
padding:1;
height:20px;
border:1px solid #999;
color:black;
cursor:hand;
}
.inputbox{
font-family:tahoma,verdana,, geneva, lucida, 'lucida grande',arial, helvetica, san serif;
font-size:x-small;
color:red;
background:yellow;
border:1px solid;
border:18px;
line-height:13px;
}
td.as_external{
background-color:pink;
}

HASIL LATIHAN CSS


Tidak ada komentar:

Posting Komentar