Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8655071
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T14:56:26+00:00 2026-06-12T14:56:26+00:00

Edit: The selected answer contains a link to the working fiddle I was able

  • 0

Edit: The selected answer contains a link to the working fiddle I was able to compose without the use of a nested table.

I want to semantically code a table in HTML with a layout like the picture below. Unfortunately I haven’t been able to find anything quite like it here on the network.

enter image description here

I have been able to force the look by manually setting cell widths, but I want to make sure the code I’m producing makes sense, and I don’t think that’s the case, because without manually setting the widths, standard rendering looks more like the following picture.

enter image description here

So far, the problematic code I have come up with looks like this:

<table>
  <thead>
    <tr>
      <th scope="col">Type of Loss Dollar</th>
      <th scope="col">Reserve Amount</th>
      <th scope="col">Paid Amount</th>
      <th scope="col">Total This Loss</th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td colspan="3">
        <table>
          <tbody>
            <tr>
              <th scope="row">Medical</th>
              <td><input type="text" /></td>
              <td><input type="text" /></td>
            </tr><tr>
              <th scope="row">Indemnity</th>
              <td><input type="text" /></td>
              <td><input type="text" /></td>
            </tr><tr>
              <th scope="row">Expense</th>
              <td><input type="text" /></td>
              <td><input type="text" /></td>
            </tr>
          </tbody>
        </table>
      </td><td>
        TOTAL
      </td>
    </tr>
  </tbody>
</table>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T14:56:27+00:00Added an answer on June 12, 2026 at 2:56 pm

    Without the images it’s a bit hard to say, but I think a better solution than nested tables would be to simply use the colspan and rowspan attributes.

    Edit: Seeing the images I’d say you can most definitely achieve that using rowspan (and colspan the way you’re using it already).

    Also, you don’t need to set the scope attribute if it’s “col”. It defaults to “col”.

    Edit: As Marat Tanalin points out the scope attribute’s default value is actually auto which “makes the header cell apply to a set of cells selected based on context”. And which in my experience acts exactly the same as setting it to “col” (for screenreaders).

    Edit: Here are two great articles on marking up advanced tables: http://www.456bereastreet.com/archive/200910/use_the_th_element_to_specify_row_and_column_headers_in_data_tables/ & http://www.456bereastreet.com/archive/200410/bring_on_the_tables/

    Edit: Here is the fiddle exhibiting desired behavior (visually at least) and the source code of that fiddle follows:

    <table border="1">
      <thead>
        <tr>
          <th>Status</th>
          <th>Type of Loss Dollar</th>
          <th>Reserve Amount</th>
          <th>Paid Amount</th>
          <th>Total This Loss</th>
        </tr>
      </thead>
    
      <tbody>
        <tr>
          <td rowspan="3">Open</td>
          <td>Medical</td>
          <td><input type="text" /></td>
          <td><input type="text" /></td>
          <td rowspan="3">TOTAL</td>
        </tr><tr>
          <td>Indemnity</td>
          <td><input type="text" /></td>
          <td><input type="text" /></td>
        </tr><tr>
          <td>Expense</td>
          <td><input type="text" /></td>
          <td><input type="text" /></td>
        </tr>
      </tbody>
    </table>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

EDIT: I selected ridgerunner's answer as it contained the information needed to solve the
((Answer selected - see Edit 5 below.)) I need to write a simple pink-noise
EDIT: Read answer number 1 from Tim Schmelter and then use this question for
Can we change the default action of the edit selected row button? Here is
EDIT 07/14 As Bill Burgess mentionned in a comment of his answer, this question
EDIT: See my answer below--> I am wanting to have a view that when
Edit : Note that, as Daniel and latkin noted in an answer and a
EDIT: Simple version of the question: I want to create server variables in the
I have a Answer table which has pk_answerid, answertext , fk_questionid, chosenoptions stored as
EDIT: looking for this: http://diminishing.org/extending-formtastic-with-a-sprinkle-of-jquery (If this works I'll answer my own question) I've

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.