HTML Tables
An HTML table is defined with the <table> tag.Each table row is defined with the <tr> tag. A table header is defined with the <th> tag. By default, table headings are bold and centered. A table data/cell is defined with the <td> tag.
Example
<body>
<table style="width:100%">
<tr>
<th>Firstname</th>
<th>Lastname</th>
<th>Age</th>
</tr>
<tr>
<td>Jill</td>
<td>Smith</td>
<td>50</td>
</tr>
<tr>
<td>Eve</td>
<td>Jackson</td>
<td>94</td>
</tr>
</table>
</body> HTML Table - Adding a Border
Example
table, th, td
{
border: 1px solid black;
}
Example
<!doctype html>
<html>
<head>
<title>This is our web design class</title>
<meta charset="UTF-8">
<meta name="description"
content="Free Web tutorials">
<meta name="keywords"
content="HTML,CSS,XML,JavaScript">
<link rel="stylesheet"
type="text/css" href="style.css">
</head>
<body>
<table border="1px"width="100%"bgcolor="pink">
<tr>
<td>Name</td>
<td>Father's Name</td>
<td>Mobile No</td>
<td>Image</td>
</tr>
<tr>
<td>Tania</td>
<td>Abdul Rouf</td>
<td>123456</td>
<td><img src="img/3.png"width="400px"height="200px"></td>
</tr>
</table>
<pre>This is Paragraph Tag</pre>
<pre>This is Paragraph Tag</pre>
<pre>This is Paragraph Tag</pre>
<p> This is our paragraph</P><hr/>
<ol type="A">
<li> Karim</li>
<li> Karim</li>
<li> Karim</li>
<li> Karim</li>
</ol>
<ol type="a">
<li> Karim</li>
<li> Karim</li>
<li> Karim</li>
<li> Karim</li>
</ol>
<ol type="1">
<li> Karim</li>
<li> Karim</li>
<li> Karim</li>
<li> Karim</li>
</ol>
<ol type="i">
<li> Karim</li>
<li> Karim</li>
<li> Karim</li>
<li> Karim</li>
</ol>
<ol type="I">
<li> Karim</li>
<li> Karim</li>
<li> Karim</li>
<li> Karim</li>
</ol>
<ul type="square">
<li> Karim</li>
<li> Karim</li>
<li> Karim</li>
<li> Karim</li>
</ul>
<ul type="circle">
<li> Karim</li>
<li> Karim</li>
<li> Karim</li>
<li> Karim</li>
</ul>
<ul type="disc">
<li> Karim</li>
<li> Karim</li>
<li> Karim</li>
<li> Karim</li>
</ul>
</body>
</html>
0 comments:
Post a Comment