Creating lists in HTML documets is simple. There are two types
of lists Ordered Lists and Unordered Lists. Ordered Lists are created
using <ol> tag and <li> sub tag. See the example:
<ol>
<li>List Item 1</li>
<li>List Item 2</li>
<li>List Item 3</li>
<li>List Item 4</li>
</ol>
Output
- List Item 1
- List Item 2
- List Item 3
- List Item 4
|
The syntax of Unordered lists is the same, just replace <ol>
with <ul> and </ol> with </u>. See the example:
<ul>
<li>List Item 1</li>
<li>List Item 2</li>
<li>List Item 3</li>
<li>List Item 4</li>
</ul>
Output
- List Item 1
- List Item 2
- List Item 3
- List Item 4
|
Creating Tables:
Creating tables in HTML can be little difficult. Creating tables
requi the knowledge of these tags:
<table></table> A single tables rows and cells
are defined within these tags.
<tr></tr> This specifies a row of a table. It
contains table cells. A table must at least contain one row.
<td></td> These enclose table cells within a
row
Lets create a table with 2 rows and 2 columns:
<table border=1>
<tr>
<td>row1 col1</td>
<td>row1 col2</td>
</tr>
<tr>
<td>row2 col1</td>
<td>row2 col2</td>
</tr>
</table>
Output
row1 col1 |
row1 col2 |
row2 col1 |
row2 col2 |
. |
|