I want a headline to appear in the content

Asked 2 years ago, Updated 2 years ago, 84 views

I am a beginner at xhtml·css.Please lend me your wisdom.
I would like to display it as follows, but how should I write it?

I put th in td, but it was invalid and ignored.

th Headline 1/th
td wording 1
th Headline 2/th
td wording 2/td
th Headline 3/th
td wording 3/td
/td
I'm sorry I'm not good at drawing.
I hope you can imagine it somehow.

If you have any other questions, I will supplement them.Enter a description of the image here

html

2022-09-30 21:41

1 Answers

I think it will probably be HTML like the following

  • Requires <tr>~</tr> to define the line.Include <th> and <td>.
  • Add colspan=", rspan=", rspan "" to join cells and th>.

<html>
<body>
<table border=1>
<tr>
  <td rspan="3">Headline 1</td>
  <td colspan="2"> wording 1</td>
</tr>
<tr>
  <th>Headline 2</th>
  <th>Headline 3</th>
</tr>
<tr>
  <td> wording 2</td>
  <td> wording 3</td>
</tr>
</table>
</body>
</html>

Note:
Create Table-TAG index
Bind cells -TAG index


2022-09-30 21:41

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.