Html Table Colspan / Rowspan - Stack Overflow

    1. Home
    2. Questions
    3. Tags
    4. Users
    5. Companies
    6. Labs
    7. Jobs
    8. Discussions
    9. Collectives
    10. Communities for your favorite technologies. Explore all Collectives

  1. Teams

    Ask questions, find answers and collaborate at work with Stack Overflow for Teams.

    Try Teams for free Explore Teams
  2. Teams
  3. Ask questions, find answers and collaborate at work with Stack Overflow for Teams. Explore Teams

Collectives™ on Stack Overflow

Find centralized, trusted content and collaborate around the technologies you use most.

Learn more about Collectives

Teams

Q&A for work

Connect and share knowledge within a single location that is structured and easy to search.

Learn more about Teams

Get early access and see previews of new features.

Learn more about Labs Html table colspan / rowspan Ask Question Asked 2 years, 8 months ago Modified 2 years, 8 months ago Viewed 346 times -3

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

Share Improve this question Follow edited Apr 26, 2022 at 7:34 Filburt's user avatar Filburt 18.1k12 gold badges80 silver badges136 bronze badges asked Apr 26, 2022 at 7:23 Đorđe's user avatar ĐorđeĐorđe 172 bronze badges 3
  • 5 Nobody will code for you... i'll suggest to try to code and then ask here providing a minimal reproducible example. Remember don't use table for layout purpose. – law_81 Commented Apr 26, 2022 at 7:28
  • Did you check the MDN documentation? – Filburt Commented Apr 26, 2022 at 7:32
  • You cant use colspand and rowspan and still have more td's, when you add colspan/rowspan, you have to delete corresponding.user16234808 Commented Apr 26, 2022 at 7:39
Add a comment |

1 Answer 1

Sorted by: Reset to default Highest score (default) Trending (recent votes count more) Date modified (newest first) Date created (oldest first) 0

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.

Share Improve this answer Follow answered Apr 26, 2022 at 7:39 treckstar's user avatar treckstartreckstar 2,1126 gold badges22 silver badges31 bronze badges 1
  • Here is another example that matches more accurately to your request: codepen.io/treckstar_/pen/zYpVwZN – treckstar Commented Apr 26, 2022 at 7:41
Add a comment |

Your Answer

Reminder: Answers generated by artificial intelligence tools are not allowed on Stack Overflow. Learn more

Thanks for contributing an answer to Stack Overflow!

  • Please be sure to answer the question. Provide details and share your research!

But avoid …

  • Asking for help, clarification, or responding to other answers.
  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.

Draft saved Draft discarded

Sign up or log in

Sign up using Google Sign up using Email and Password Submit

Post as a guest

Name Email

Required, but never shown

Post Your Answer Discard

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.

  • The Overflow Blog
  • How developers (really) used AI coding tools in 2024
  • Generative AI is not going to build your engineering team for you
  • Featured on Meta
  • The December 2024 Community Asks Sprint has been moved to March 2025 (and...
  • Stack Overflow Jobs is expanding to more countries
0 Complicated table using rowspan and colspan 1 Table colspan & rowspan 0 CSS Tables Colspan 0 HTML Table colspan rowspan 3 css tables for rowspan and colspan 1 Rowspan + colspan for whole row 0 Table layout colspan rowspan 2 html table using rowspan colspan 2 colspan in CSS? 2 Tables, rowspan and colspan

Hot Network Questions

  • Sub Panel/EMT Grounding Questions
  • How to use std::array.size() as a template parameter when a class has a non-constexpr std::array
  • I over salted my prime rib! Now what?
  • Would Canadians like to be a part of the United States as Trump wants?
  • Pronunciation of N in "envy"? The name of my personal pronunciation, an approximant?
  • How hard is the classification of finitely presented or generated simple groups?
  • How do you argue against animal cruelty if animals aren't moral agents?
  • How can I add mix arbitrary text in the output of the Linux date command?
  • Why did the "Western World" shift right in post Covid elections?
  • Los Angeles Airport Domestic to International Transfer in 90mins
  • Efficient way to reconstruct matrix from list of iterated dot products
  • How to wrap a table created with tabularray
  • Is there a simpler proof for this simple geometrical result? (An equilateral triangle contains three congruent circles, prove two lengths are equal.)
  • Can I put multiple stranded wires into a single WAGO terminal?
  • Help Locate Bathroom Vent Leak
  • Does Noether's first theorem strictly require topological groups or Lie groups?
  • Old French map, mystery coordinate system in South America
  • Why the unitary dual of a locally compact group is a set?
  • Is the term "AUROC curve" actually correct or meaningful?
  • Obtaining the absolute minimal, original TeX engine
  • Is the danger of space radiation overstated?
  • How to design split keyboard with USB-C serial interconnect
  • Does Charles III have any political power in Australia, as head of state of this country?
  • Do Saturn rings behave like a small scale model of protoplanetary disk?
more hot questions Question feed Subscribe to RSS Question feed

To subscribe to this RSS feed, copy and paste this URL into your RSS reader.

lang-html

Từ khóa » Html Colspan Rowspan Css