Nested Lists
- A nested list means placing one list inside another list item (<li>).
- You can mix ordered, unordered, and even description lists.
Example:
-
Frontend
- HTML
- CSS
- JavaScript
-
Backend
- Node.js
- Java
- Python
code
Table in HTML
Tables are used to organize data in rows and columns.
Basic Table Tags
- <table> → Defines a table.
- <tr> → Defines a table row.
- <td> → Defines a table data cell.
- <th> → Defines a table header cell (bold + centered by default).
- <caption> → Title of the table (appears on top).
Table Attributes
- border → Adds border around table cells.
- cellpadding → Space inside each cell.
- cellspacing → Space between cells.
- colspan → Makes a cell span across multiple columns.
- rowspan → Makes a cell span across multiple rows.
- align → Aligns table or cell content (left, right, center).
Example Table
| Roll No | Name | Marks |
|---|---|---|
| 1 | John | 85 |
| 2 | Alice | 92 |
code
Example: Using rowspan and colspan
| Day | Subjects | |
|---|---|---|
| Monday | Math | English |
| Science | History | |
code