How do I make the text in the header of my table not bold?
Asked Answered
S

3

22

I need to use a rowspan for my table, therefore I (believe) I must use a table header. However, using a table header makes my font bold, which is unwanted. For this HTML, how would I make sure the font in my table header isn't bold? Or, if it's possible, how can I use rowspan without using a table header?

<table border="1">
  <tr>
    <th rowspan="2">Telephone:</th>
<td>555 77 854</td>
  </tr>
  <tr>
    <td>555 77 855</td>
  </tr>
</table>
Sib answered 19/3, 2015 at 0:48 Comment(0)
C
34

Simply overhide the font-weight of the th element in CSS :

th{
    font-weight: normal;
}

JSBin : http://jsbin.com/lizakatuwe/1/

Choreograph answered 19/3, 2015 at 1:6 Comment(0)
P
3

You don't need table header at all, you can use rowspan with td too. To make it not bold, override the font-weight in css to normal.

Polysepalous answered 10/1, 2017 at 8:32 Comment(0)
C
2
<table border="1">
  <tr>
    <tr rowspan="2"><p style="font-weight:bold">Telephone:</p></tr>
<td>555 77 854</td>
  </tr>
  <tr>
    <td>555 77 855</td>
  </tr>
</table>

I am using internal CSS for you, directly insert the font style inside your table. Copy and pasta this code into your project, it will do the job.

Chirrup answered 19/3, 2015 at 1:17 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.