0

ユーザーの住所などの特定の領域にヘッダーを付けて、垂直のテーブルを作成しようとしています。私はこのようなものを作成したい:

        General Information

Name                John Smith
Date of Birth       April 1, 1984
Gender              Male

        Account Information

       Correspondence Address
Address 1           1234 MLK Blvd
Address 2           502
City                Kansas City
State               Missouri
Country             USA
Zip Code            55748

     Residential Address
Address 1           143 St Michael's Way
Address 2
City                Independence
State               Missouri
Country             USA
Zip Code            55760

現在、ヘッダーのないテーブルにこのコードを使用しています:

<table>
    <tr id='Name'>
        <th>Name</th>
    </tr>
    <tr id='PersonEmail'>
        <th>Email</th>
    </tr>
    <tr id='Gender'>
        <th>Gender</th>
        <td></td>
    </tr>
    <tr id='Date_of_Birth'>
        <th>Date of Birth</th>
        <td></td>
    </tr>
</table>

テーブルの上部にヘッダーを追加するにはどうすればよいですか?

4

5 に答える 5

0

デモはこちら、コードはこちら:

<table border="1">
  <tr>
    <th colspan="2">Header</th>
  </tr>
  <tr>
    <td>January</td>
    <td>$100</td>
  </tr>
  <tr>
    <td>February</td>
    <td>$100</td>
  </tr>
  <tr>
    <th colspan="2">Header2</th>
  </tr>
</table>
于 2013-08-21T19:18:49.157 に答える