You are on page 1of 7

Learning HTML

Lab 2

(Lists , Tables , Forms)

Objective :
1- To know how to create lists ,tables , forms in HTML.

Example 1:

<html>

<body>

<ol type="A">

<li>Aden</li>

<li>lahj</li>

</ol>

<ul type="square">

<li>Aden</li>

<li>lahj</li>

</ul>

<dl>

<dt>HTML</dt>

<dd>hyper text markup language used to create wep pages</dd>

</dl>

</body>

</html>

Eng: Samah Al-atifi E-Commerce “B4IT”


Example 2:

<html>

<body>

<table border=1 align="center" width="300" height="700">

<caption>student</caption>

<tr>

<td >name:</td>

<td>samah</td>

</tr>

<tr>

<td>class:</td>

<td>B4IT</td>

</tr>

</table>

</body>

</html>

Example 3:

<html>

<body>

<table border=1 align="center" >

<tr>

<th>Name:</th>

<th>Reg No:</th>

<th>Class:</th>

</tr>

<td>Ahmed</td>

Eng: Samah Al-atifi E-Commerce “B4IT”


<td>700342</td>

<td>B4IT</td>

</table>

</body>

</html>

Example 4:

<html>

<body>

<table border=1 align="center" >

<tr>

<th>Name:</th>

<th>Reg No:</th>

<th>Class:</th>

</tr>

<td>Ahmed</td>

<td>700342</td>

<td>B4IT</td>

</table>

<table border=1 align="center" >

<tr>

<th>Name:</th>

<td>Ahmed</td>

</tr>

<tr>

<th>Reg No:</th>

<td>700342</td>

Eng: Samah Al-atifi E-Commerce “B4IT”


</tr>

<tr>

<th>Class</th>

<td>B4IT</td>

</tr>

</table>

</body>

</html>

Example 5:

<html>

<body>

<table border="1" align="center" bgcolor="#ff4433">

<tr>

<th>Name:</th>

<td colspan="2" align="center">Telphone</td>

</tr>

<tr>

<td>Ahmed</td>

<td>02250000</td>

<td>700000000</td>

</tr>

</table>

<table border="1" align="center" bgcolor="#ff4433">

<tr>

<th>Name:</th>

<td>Ahmed</td>

Eng: Samah Al-atifi E-Commerce “B4IT”


</tr>

<tr>

<th rowspan="2">Telphone</th>

<td>02250000</td>

</tr>

<tr>

<td>02250000</td>

</tr>

</table>

</body>

</html>

Example 6:

<!DOCTYPE html>

<html>

<body>

<form>

name:<input type="text" name="t1"><br>

Gender:<input type="radio" name="r1" value="Male">Male<br>

<input type="radio" name="r2" value="female">female<br>

choose subject:<input type="checkbox" name="c1" value="math">Math<br>

<input type="checkbox" name="c1" value="english">english<br>

</form>

</body>

</html>

Eng: Samah Al-atifi E-Commerce “B4IT”


Example 7:

<!DOCTYPE html>

<html>

<body>

<form>

<table>

<tr>

<td>Name:</td>

<td><input type="text" name="t1"></td>

</tr>

<tr>

<td>Gender:</td>

<td>

<input type="radio" name="r1" value="Male">Male<br>

<input type="radio" name="r2" value="female">female</td>

</tr>

<tr>

<td>choose subject:</td>

<td>

<input type="checkbox" name="c1" value="math">Math<br>

<input type="checkbox" name="c1" value="english">english

</td></tr>

</table>

</form>

</body>

</html>

Eng: Samah Al-atifi E-Commerce “B4IT”


Eng: Samah Al-atifi E-Commerce “B4IT”

You might also like