contoh pertama
<html>
<head>
<title>mencoba</title>
<!-- Eksternal -->
<link rel="stylesheet" type="text/css" href="style.css">
<!-- Internal -->
<style>
H2{
color:blue;
}
</style>
</head>
<body>
<!-- inline -->
<h1 style="color:red">inline</h1>
<!-- Internal -->
<H2>INTERNAL CSS</H2>
<!-- Ekternal -->
<H3>EKTERNAL CSS</H3>
</body>
</html>
inline
INTERNAL CSS
EKTERNAL CSS
<html>
<head>
<title>mencoba</title>
<style>
afandi {
color: green;
}
.afandi
{
color:blue;
}
#erda {
color: red;
}
</style>
</head>
<body>
<afandi>oke oke oke</afandi>
<h1 class="afandi">oke oke oke</h1>
<h1 id="afandi2">oke oke oke</h1>
</body>
</html>
Contoh kedua
oke oke oke
oke oke oke
Selector {
preperty : value;
}
selector
berisi : tag hhtm
class
id
property
berisi : aturan/rule
perintah
Value
berisi : b.ing(red,top,center)
hexadecimal(#fff)
rgb
persen
pixel
0 komentar:
Posting Komentar