Project in Computer

How to combine or merge cells in an HTML table?


You can merge two or more table cells together by using the colspan attribute in a <td> HTML tag (table data). For example, in the below code is a table with three rows and three columns.
If we wanted to combine the first two cells into one cell, we could use the colspan="2" attribute in the first <td> tag. The number represents how many cells you want to use for the <td> tag.

Example HTML table

<table>
<tr>
<td colspan="2">&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
</table>
The above code, rendered in a web browser, produces a table similar to the table shown below. As you can see, the first cell spans the width of two columns.
To use all three cells on the top of the table increase the colspan value to 3 since there are three columns. Increasing the value to 3 gives you a table similar to the example shown below.
Note: Make sure that when you expand a <td> column that you remove any remaining <td> tag. In the example above, because we are using all three columns, we have only one <td> in the <tr> (table row).

Merging cells using a WYSIWYG editor

You can also use the WYSIWYG editor to merge cells. Typically this is done by highlighting two or more cells, right-clicking the cells and then choosing the option to merge cells. Below is additional steps on how to do this in Dreamweaver and Expression Web.
Merging cells using Dreamweaver
  1. Highlight two or more cells in your table.
  2. Right-click on the highlighted cells.
  3. Click Table and then Merge Cells.
or
  1. Highlight two or more cells in your table.
  2. Press the keyboard shortcut Alt+Ctrl+M.
Merging cells using Expression Web
  1. Highlight two or more cells in your table.
  2. Right-click on the highlighted cells.
  3. Click Modify and then Merge Cells.
©Computer Hope

This is not mine but I want to share this to everybody that this amazing help from google it taught me well😊 I just want to spread this through this blog. 


Many of us, people who are addicted in games, social media and what-so-ever, but who among you wandered on how to create those games? Well, I guess it starts with a code, creativity of the game and etc.  Codes are important,  one mistake and it will messed up. Learn from the basic codes like the content of this blog and who will know you'll be one of the amazing game creators in the world! 


    "your hand
touching mine.
this is how
galaxies
collide." - Sanober Khan

But for me,

     "my hand 
      touching the 
      keyboard of the
       computer
     This is how 
     I and the compute
collide." -Mariztella Domingo



This is the Galaxy I'm talking about,  galaxy of my Computer Subject😀

Comments

  1. Now I know🤔🤔
    Thankyou for this!😀

    ReplyDelete
  2. Waaa! I am so inlove with Galaxies.

    ReplyDelete
  3. I read it so many times and it's quite useful!

    ReplyDelete
  4. Dunno what to say, but it's amazing😂

    ReplyDelete
  5. It actually caught my attention😊

    ReplyDelete
  6. I should definitely observe, thanks to you!

    ReplyDelete
  7. Observing people you're good at it😊 just sharing😉

    ReplyDelete
  8. thanks for the reference🤗🤗🤗

    ReplyDelete
  9. the wonders of the universe is infinite indeed

    ReplyDelete

Post a Comment