top of page

How to add Border to table?

  • Add border attribute:

  • <table border =”10”>

  • The border is in 10 pixels

Screenshot 2025-12-03 at 8.43.37 AM.png

How to create the text space and cell space?

Cell padding:

It controls the text space in the cell

Example: <table border=”10” cellpadding=”10”>

Screenshot 2025-12-03 at 8.56.57 AM.png

Cell spacing:

Cell space between cell to cell

Example: <table border="10" cellpadding="10" cellspacing="10">

Screenshot 2025-12-03 at 9.11.03 AM.png

If I  change the cellspacing=”0” their will have no space between the cell

Screenshot 2025-12-03 at 9.20.44 AM.png

How to add a cell inside a cell?

Add the attribute: Cell span or Column span

Add one more subject : 

Example: Math  and Math 2

Add colspan=:2" means span tow columns

Example: 

<th colspan="2" >Tuesday </th>

Screenshot 2025-12-03 at 10.12.41 AM.png

How to add column?

  • Row span attribute: the row span attribute to make the cell span multiple rows

  • First: Add one more column in the code ( I just copy and paste the 2 column)

  • Example: English 1

  • English 2

  • English 3

  • Add one more row beside the subject:

  • Example:

  • <td rowspan="3">Subject</td>h

  • The table cells can contain any kind of MTML like images, links, text…

Screenshot 2025-12-03 at 10.48.54 AM.png

Remember to save the file every time you change any thing in your website and reload the browser, otherwise you cannot review what you change!!!

bottom of page