tables and lists
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Tables and lists</title>
</head>
<body>
<!-- LISTS -->
<ul type="square">
<li>This is first item of my unordered list.</li>
<li>This is second item of my unordered list.</li>
<li>
<ul>
<li>Another one</li>
<li>Another two</li>
<li>Another three</li>
</ul>
</li>
<li>This is third item of my unordered list.</li>
</ul>
<hr>
<ol type="1">
<li>This is first item of my ordered list.</li>
<li>This is second item of my ordered list.</li>
<li>
<ol>
<li>Another try</li>
<li>Another try</li>
<li>Another try</li>
</ol>
</li>
<li>This is third item of my ordered list.</li>
</ol>
<!-- there are two types of lists in html. in ordered list, items are arranged acc to 1,2,3,4. in unordered list items are arranged just in bullets. for unordered list we use <ul></ul> and for orders list we use <ol></ol>. we use <li></li> for adding elements to the list.We can also change the type of the parent list by adding the term type="". in ul there are only three types: disc,square and circle.We can also add list into list. -->
<hr>
<!-- TABLES -->
<h3> HTML Table</h3>
<table>
<thead>
<tr>
<th>Name</th>
<th>Employee ID</th>
<th>Employee Role</th>
</tr>
</thead>
<tbody>
<tr>
<td>Shresthy</td>
<td>1234</td>
<td>Web developer</td>
</tr>
<tr>
<td>xyz</td>
<td>2545</td>
<td>programmer</td>
</tr>
</tbody>
</table>
<!-- for creating a table first we insert the tag <table></table> then inside it we add the tags <thead></thead> and <tbody></tbody> for adding rows we use <tr></tr> and if we are adding columns in head then we'll use <th><\th> and in body then <td><\td> . -->
</body>
</html>
Comments
Post a Comment