prk7

advertisement
NAMA : M. KHARIS RIDHO A.
NIM : 105410214
PRAKTIKUM PENGENALAN WEB
File css
body{background-color:yellow}
h1{font-size:36pt}
h2{color:blue}
p{margin-left:50px}
File Html
<html>
<head>
<link rel="stylesheet" type="text/css" href="ex1.css"/>
</head>
<body>
<h1>Tulisan ini berukuran 36</h1>
<h2>Tulisan ini berwarna biru</h2>
<p>Ini paragraf vdengan left margin 50 pixels</p>
</body>
</html>
Hasil :
Dsisimpan dengan nama doc.html
<html>
Hasil :
<head>
<style type="text/css">
h1{background-color:#FF0000;}
p{background-color:#e0ffff;}
div{background-color:#b0c4de;}
</style>
</head>
<body>
<h1>Contoh bacground css</h1>
<div>
Ini text yang menggunakan tag div
<p>Ini pargraf yang mempunyai background</p>
Ini masih di tag div
</div>
</body>
</html>
Disimpan dengan nama doc1.html
<html>
<head>
<style type="text/css">
p.normal{font-style:normal}
p.italic {font-style:italic}
</style>
</head>
<body>
Hasil :
NAMA : M. KHARIS RIDHO A.
NIM : 105410214
PRAKTIKUM PENGENALAN WEB
<p class="normal">Ini paragraf, dengan font normal.</p>
<p class="italic">Ini paragraf, dengan font italic </p>
</body>
</html>
Disimpan dengan nama doc2.html
<html>
<head>
<style>
h1 {font-size:40pt; color:blue;}
h2 {font-size:30pt; color:red;}
p {font-size:14pt; color:yellow;}
body {background-color:grey}
</style>
</head>
<body>
<h1>Ini heading ukuran 40</h1>
<h2>Ini heading ukuran 30</h2>
<p>Ini paragraf ukuran 14</p>
</body>
</html>
Hasil :
Latihan
<html>
<head>
<style>
h1
{font-size:40px;text-align:center;color:blue;}
p.right
{text-align:right;}
p.tengah
{text-align:justify;}
</style>
</head>
<body>
<h1>Contoh Text Align Dengan CSS
</h1>
<p class="right"> May, 2012</p>
<p class="tangah"> About CentOS :<br>
The Community ENTerprise Operating System (CentOS) is an Enterprise-class
Linux Distribution derived from sources freely provided to the public
by a prominent North American Enterprise Linux vendor.
CentOS conforms fully with the upstream vendors redistribution policy and aims
to be 100% binary compatible. (CentOS mainly changes packages to remove upstream
vendor branding and artwork.) The CentOS Project is the organization that
builds CentOS.
<br>
<br>
NAMA : M. KHARIS RIDHO A.
NIM : 105410214
PRAKTIKUM PENGENALAN WEB
<p>
Note:
CentOS is an Operating System and it is used to power this website; however,
the webserver is owned by the domain owner and not the CentOS Project. If you have
issues with the content of this site, contact the owner of the domain, not the
CentOS project.
</body>
</html>
Hasil :
Download