Contoh Tag HTML dan kegunaannya:
1. set background page color
<body bgcolor="#E6E6FA">
* boleh juga masukkan imej gif pada background
<body background="drkrainbow.gif">
2. Masukkan imej / gambar
<img src="img_girl.jpg" alt="Girl in a jacket" width="500" height="600">
** gambar boleh tukar ke format gif jugak, utk gambar animasi bergerak
3.senarai tidak bernombor(unordered list)
<ul>
<li>Coffee</li>
<li>Tea</li>
<li>Milk</li>
</ul>
4. senarai bernombor (ordered list)
<ol>
<li>Coffee</li>
<li>Tea</li>
<li>Milk</li>
</ol>
5. tulisan saiz, warna, jenis tulisan
<font size="3" color="red">This is some text!</font>
<font face="verdana" color="green">This is some text!</font>
6. Membuat link / pautan ke laman lain
Click <a href="http://www.yahoo.com">Yahoo Homepage</a> to go to yahoo.
7. Membina jadual.
<table>
<tr> <td>This is row one, left side.</td> <td>This is row one, right side.</td> </tr>
<tr> <td>This is row two, left side.</td> <td>This is row two, right side.</td> </tr>
</table>
8. Membina frame
Ini contoh frame 2 lajur:
<frameset cols="120,*" >
<frame src="menu.htm" name="menu" >
<frame src="frontf.htm" name="main" >
</frameset>
Ini contoh frame 3 section : TOP (untuk banner/tajuk), LEFT(untuk menu), RIGHT(untuk papar kandungan):
<html>
<head><title>ASK T1 : BELAJAR HTML MUDAH</title>
</head>
<frameset rows="30%,70%">
<frame src="frametop.html">
<frameset cols="25%,75%">
<frame src="framemenu.html" name="menu">
<frame src="framecontent.html" name="content">
</frameset>
</frameset>
<body>
</body>
</html>
9. Pulldown Menu
<p> Pilih makanan kegemaran anda:</p>
<select>
<option value="burger">BURGER</option>
<option value="capati">CAPATI</option>
<option value="rojak">ROJAK</option>
<option value="dimsum">DIM SUM</option>
</select>
10. Form / Borang untuk memasukkan nama
<form action="/action_page.php">
First name : <input type="text" name="firstname" value=" "><br><p>
Last name : <input type="text" name="lastname" value=" "><br>
<br> <input type="submit" value="HANTAR">
</form>
0 comments:
Post a Comment