Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Html table colspan / rowspan

can someone send me code for this table, I can’t find a solutions

<div class="table">
        <h3>Table</h3>
        <table class="table1" border="5">
            <tr>
                <td colspan="2">1</td>
                <td colspan="2">1 red </td>
                <td rowspan="3">2 red </td>
            </tr>
            <tr>
                <td colspan="2">2</td>
                <td>2 red</td>
                <td>3 red</td>
            </tr>
            <tr>
                <td>Treci red</td>
                <td>Treci red</td>
                <td>Treci red</td>
                <td>Treci red</td>  
            </tr>

Expected result:

Expected result

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

Here is an example of a table that looks like that.

<table style="border-collapse: collapse; width: 100%;" border="1">
  <colgroup>
    <col style="width: 20.0242%;">
    <col style="width: 20.0242%;">
    <col style="width: 20.0242%;">
    <col style="width: 20.0242%;">
    <col style="width: 19.9032%;">
  </colgroup>
  <tbody>
    <tr>
      <td colspan="2" rowspan="3">&nbsp;</td>
      <td colspan="2">&nbsp;</td>
      <td rowspan="4">&nbsp;</td>
    </tr>
    <tr>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
    </tr>
    <tr>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
    </tr>
    <tr>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
    </tr>
  </tbody>
</table>

If you are a beginner, or new to HTML, you could easily use a WYSIWYG editor to create a table like this.
Try https://fiddle.tiny.cloud/ as an example.

I’d suggest learning HTML and understanding how the markup works though.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading