Two Women Working On Laptop, Stock Footage Video (100 ...


HTML Ordered Lists



An ordered list starts with the <ol> tag, and each list item is defined by the <li> tag.
Here is an example of an ordered list
CODE:-
<html>
 <head>
 <title>first page</title>
 </head>
 <body>
 <ol>
    <li>Red</li>
    <li>Blue</li>
    <li>Green</li>
 </ol>  
</body>
</html>
 
OUTPUT:-
 1. Red
2. Blue
3. Green

HTML Unordered List



An unordered list starts with the <ul> tag.

CODE:-
<html>
 <head>
 <title>first page</title>
 </head>
 <body>
 <ul>
    <li>Red</li>
    <li>Blue</li>
    <li>Green</li>
 </ul>  
</body>
</html>

OUTPUT:-
  • Red
  • Blue
  • Green

Creating a Table



Tables are defined by using the <table> tag.
Tables are divided into table rows with the <tr> tag.
Table rows are divided into table columns (table data) with the <td> tag

CODE:-
<table>
  <tr>
      <td></td>
      <td></td>
      <td></td>
  </tr>
</table>

The border and colspan Attributes



A border can be added using the border attribute:
CODE:-
<table border="2">
   <tr>
     <td>Red</td>
     <td>Blue</td>
     <td>Green</td>
   </tr>
   <tr>
      <td><br /></td>
      <td colspan="2"><br /></td>
   </tr>
</table>


Colspan Color



The example below demonstrates the colspan attribute in action
CODE:-
<table border="2">
   <tr>
      <td>Red</td>
      <td>Blue</td>
      <td>Green</td>
   </tr>
   <tr>
     <td>Yellow</td>
     <td colspan="2">Orange</td>
   </tr>
</table>


The align and bgcolor Attributes
<table border="2">
   <tr>
      <td bgcolor="red">Red</td>
      <td>Blue</td>
      <td>Green</td>
   </tr>
   <tr>
     <td>Yellow</td>
     <td colspan="2">Orange</td>
   </tr>
</table>