1

How can I set the font size in the following table? Nothing I do seems to work.

TIA

<table style="width: 480px;">
    <tbody>
        <tr>
            <td style="width: 7px;background:#036ED1;"></td>
            <td style="text-align:center";"width: 93px;"><strong>Activity</strong></td>
            <td style="width: 380px;">When finished, click <b>Next</b>.</td>
        </tr>
    </tbody>
</table>
EricSchaefer
  • 25,272
  • 21
  • 67
  • 103
Jim R
  • 11
  • 1
  • 2
  • 2
    Where have you applied the `font-size` property? – BenM Apr 12 '21 at 20:21
  • 1
    It doesn't seem you have any markup in this snippet that would modify the font size. (Tangential, but unless you have a very good reason for doing so, you should probably try to avoid inline styles and instead opt for proper stylesheets. [Further reading](https://stackoverflow.com/questions/2612483/whats-so-bad-about-in-line-css)) – esqew Apr 12 '21 at 20:21

3 Answers3

1

Use font-size

 <table style="width: 480px;">
    <tbody style="font-size: 28px";>
    <tr>
    <td style="width: 7px;background:#036ED1;"></td>
    <td style="text-align:center";"width: 93px;"><strong>Activity</strong></td>
    <td style="width: 380px;">When finished, click <b>Next</b>.</td>
    </tr>
    </tbody>
    </table>

may work for you.

Gucal
  • 842
  • 1
  • 11
  • 19
0
here you go ... by the way avoid using inline styling it is harder to maintain it will create mess in your html code. 

<table style="width: 480px;">
<tbody>
<tr>
<td style="width: 7px;background:#036ED1;"></td>
<td style="text-align:center;width: 93px;font-size:25px"><strong>Activity</strong></td>
<td style="width: 380px;">When finished, click <b>Next</b>.</td>
</tr>
</tbody>
</table>
Ammad Amir
  • 433
  • 3
  • 7
0

Add class to table and define class in style. may be table tag is taking font size from bootstrap or any of your other css file.

you can try like

<table class="mytable" style="width: 480px;">

and then style through css

.mytable {
    font-size : 14px! important; // font size you want
}

also check for error after text-align:center in your second td.

 <td style="text-align:center; width: 93px;"><strong>Activity</strong></td>