Welcome to My HTML5 Example Website
Table and List Example
Table Example
Header 1 | Header 2 | Header 3 |
---|
Row 1, Cell 1 | Row 1, Cell 2 | Row 1, Cell 3 |
Row 2, Cell 1 | Row 2, Cell 2 | Row 2, Cell 3 |
List Example
Ordered List
- First item
- Second item
- Third item
Unordered List
- First item
- Second item
- Third item
Explanation
Table (<table>)
- The <table> tag is used to create a table.
- <thead> defines the header section of the table, containing header rows.
- <tbody> defines the body of the table, containing all the rows with data.
- <tr> is used to define a row within the table.
- <th> is used within <thead> to define a header cell, usually bold and centered.
- <td> is used within <tbody> to define a standard data cell.
List (Ordered <ol> and Unordered <ul>)
- <ol> creates an ordered list where each item is numbered.
- <ul> creates an unordered list where each item is bulleted.
- <li> defines a list item within either an ordered or unordered list.