TH TH

SPACEEEEEEEEEEEEEEEEEEEEEEEE

index


SPAcE

Day 1

SPACEE

|

SPAcECEE

Day 2

SPACEEEE

|

SPAcE

Day 3

SPACEEE

|

SPAcECE

Day 4

SPACEEE

|

SPAcE

Day 5

SPACEEE

|

SPAcE

Day 6

SPA

|


đź’» Nested Lists & Tables


What are Nested Lists?


A nested list means putting one list inside another list.

It helps show sub-items under a main item.

Nested Lists are pretty much straight forward ur just using list tags inside list tags so we will go thorugh examples to understand them

Example 1

nested vd

THe above example shows underordered lists inside unordered list



Example 2

nested vd

THe above example shows Unordered list --> Unordered list --> Ordered list

in HTML you can place headings (h1–h6) inside list items (li).

This is useful when you want to highlight a category or title inside a list.
Since list items can contain any HTML element (text, images, links, headings, etc.), headings fit naturally inside them.



Introduction To Tables đź“‘




A table in HTML is used to arrange data in rows and columns (just like in MS Excel or a school timetable).

The <"table"> tag defines the table.

Inside it, we use:

<"tr"> → Table Row

<"td"> → Table Data (cell)

→ Table Header (bold + centered by default)


Table tag


The container for the entire table.

Everything related to the table (rows, columns, headers, cells) must go inside



Table Row


Defines a row in the table.

Inside a <"tr">, you place either <"td"> (data cells) or <"th"> (header cells).

Each <"tr"> = one horizontal row of the table.



Table Data


Defines a cell in a row.

Contains the actual data (text, images, links, etc.).

By default, content in <"td"> is left-aligned and normal-weight.


Table Header


Defines a header cell (like column headings).

Content inside is bold and centered by default.

Usually placed in the first row or the first column.

tabel

Below are examples for representing tables in HTML


Example 1

Item Quantity Price
Apple 10 $1.00
Orange 5 $1.50
Total 15 $2.50

The above example shows a baisc table with the table head tag and the other things



Rowspan & Colspan


rcspan

Rowspan, on the other hand, is when a single cell covers multiple rows. Imagine in the same timetable, you write "Monday" only once,

but it applies to three rows (Math, Science, English). Rather than repeating “Monday” in each row, you merge those rows into one tall cell.

That merging vertically is done with rowspan.




Colspan means "this cell should cover multiple columns.

" Imagine a school timetable — you might have one heading called “Morning Session” that is meant to sit above several periods.

Instead of writing “Morning Session” in every column, you merge those columns into one wider cell.

That merging horizontally is done with colspan.

    
Column1 Column2 Column3
Row1 Cell1 Row1 Cell2 Row1 Cell3
Row2 Cell2 Row2 Cell3
Row 3 Cell 1

The above example shows the combination of row and colspan in one table

The below example shows a bit more complex table structre but we are just using row and colspan

If u still have doubts u can watch this video

Congrats!! u just completed day 3!!

Next

Back