RSS Feed

Selasa, 22 Maret 2011

Resume DesWeb - Pertemuan 4


Content Display dalamHalaman Web

HTML Text Formating
HTML uses tags like <b> and <i> for formatting output, like bold or italic text.Examples :
          This text is bold -><b>This text is bold</b>
          This text is italic   -><i>This text is bold</i>

HTML Styles
Attribut Style
Attribut Style digunakansecaralangsungterhadap tag yang beradadalam BODY untukmelakukanpengaturandenganproperti-properti CSS.
ContohAttributStyle :
<html>
<body style="background-color:Blue;">
<h1>Look ! Styles and colors</h1>
<p style = "font-family: verdana; color: red">
                This text Verdana and red
</p>
<p style= "font-family: times; color: green">
                This text isi Times and green
</p>
<p style= "font-size:30px">
                                                                This text is 30 pixels high
</p>
</body>
</html>



HTML Images
Jenis Gambar
Ekstensi
Keterangan
GIF
.gif
Grapich Interchange Format
JPEG
.jpg / .jpeg
Joint Photographic Experts Group
PNG
.png
Portable Network Graphics

Membuat Gambar Sebagai Background
<html>
                <head>
                                <title>Latarbelakang</title>
                </head>
<body background = “images/tes.png”>
</body
</html>

MenampilkanGambar
<html>
                <head>
                                <title>Latarbelakang</title>
                </head>
<body>
                                <imgsrc=“tes.png”>
</body
</html>

MengaturLetakTeksTerhadapGambar
Nilai
Keterangan
TOP
Teks diletakkan di bagian atas
MIDDLE
Teks diletakkan di tengah-tengah
BOTTOM
Merupakan nilai default. Dalam hal ini, teks diletakkan padabagian bawah
 
Cth: <imgsrc = “tes.png” align=”TOP”>

MengaturUkuranGambar
<html>
                <head>
                                <title>Latarbelakang</title>
                </head>
<body>
                                <imgsrc=“tes.png” height=“20” width=“20”>
</body>
</html>

HTML Tables
ELEMEN TABLE
Untukmembuattabel.Andaharusmemulainyadenganpasangan tag <table>..</table>. Di dalam tag andadapatmenentukanbanyakkolomdanbaris. Perataan, warnadanpengaturanlainnya
<html>
<head>
<title>Untitled Document</title>
</head>
<body>
<table width="200" border="1">
<tr>
<th>Nim</th>
<th>Nama</th>
</tr>
<tr>
<td>08410100140</td>
<td>Joni</td>
</tr>
</table>
</body>
</html>

Atribut Table:
          Border :untukmembuatbatastepi.
          Width :untukmengaturlebar table.
          Align :untukmengaturbentukperataan horizontal data di dalam table. Sepertikiri, tengah, ataukanan
          DLL.

Group Baris
Contoh Group Table
<table>
                <thead>
                                <tr>      
                                                <th>Nama</th>
                                                <th>Hari</th>  
                                </tr>    
                </thead>            
                <tbody>
                                <tr>      
                                                <td>Teguh</td>
                                                <td>Selasa</td>
                                </tr>
                </tbody>            
<tfoot>
                                <tr><td colspan="2">footnote</td></tr>
</tfoot>
</table>

HTML List
Tag
Description
<ol>
Defines an ordered list
<ul>
Defines an unordered list
<li>
Defines a list item
<dl>
Defines a definition list
<dt>
Defines an item in a definition list
<dd>
Defines a description of an item in a definition list





0 komentar:

Posting Komentar