# Why isn't it bold?

**URL:** <https://forum.codewithmosh.com/t/why-isnt-it-bold/2854>\
**Category:** HTML/CSS\
**Created:** [February 20, 2021, 7:31am UTC](https://forum.codewithmosh.com/t/why-isnt-it-bold/2854 "2021-02-20T07:31:31Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Megha](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.codewithmosh.com/megha/32/1136_2.png) [@Megha](https://forum.codewithmosh.com/u/Megha)\
**Post date:** [February 20, 2021, 7:31am UTC](https://forum.codewithmosh.com/t/why-isnt-it-bold/2854/1 "2021-02-20T07:31:31Z")

</div>

```auto
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Tables</title>
    <style>
        table, td, th{
            border: 1px solid blue;
            border-collapse: collapse;
            padding: 5px;
        }
    
    tfoot{
            text-align: left;
        }
    </style>
</head>
<body>
    <table>
        <thead>
            <tr>
                <th colspan="2">Report Card</th>
            </tr>
            <tr>
                <th>Subject</th>
                <th>Marks</th>
            </tr>
            <tbody>
                <tr>

                    <td>Math</td>
                    <td>47</td>
                </tr>
                <tr>
                    <td>English</td>
                    <td>45</td>
                </tr>
            </tbody>
            <tfoot>
                <tr>
                    <td>Total</td>
                    <td>92</td>
                </tr>
            </tfoot>
        </thead>
    </table>
</body>
</html>

```

 ![2021-02-20 (3)](https://us1.discourse-cdn.com/flex020/uploads/codewithmosh/original/1X/7f155ba7e259bbfe16fc48efa9b0222867a4e924.png)

My table

![2021-02-20 (2)](https://us1.discourse-cdn.com/flex020/uploads/codewithmosh/original/1X/5c82c4f1fb7ed23523ff6ddc7f077a81244f520a.png)  
Mosh’s table

* * *

I don’t understand why the “Total” and “92” are not in **bold** for me  
Can someone please help me out?!

---

<div class="post-metadata">

**Author:** ![SAM](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.codewithmosh.com/sam/32/167_2.png) [@SAM](https://forum.codewithmosh.com/u/SAM)\
**Post date:** [February 20, 2021, 10:28am UTC](https://forum.codewithmosh.com/t/why-isnt-it-bold/2854/2 "2021-02-20T10:28:45Z")

</div>

First of all: You have defined your whole table content inside a `thead` element?

> [@Megha](#):
>
> why the “Total” and “92” are not in **bold** for me

If you inspect the header cells to see why _they_ are bold you will see that the bold `font-weight` comes from a rule in the user agent stylesheet for the `th` element. So by default `thead` and `tfoot` have nothing to do with the font weight.

If you compare your markup in the `tfoot` element with Mosh’s you will see that he uses `th` elements while you are using `td `elements. That’s why your table looks different.

BTW: In my opinion wrapping a _data_ value with a `th` is not correct sematically. I would write

```auto
<tfoot>
   <tr>
      <th>Total</th>
      <td>92</td>
   </tr>
</tfoot>

```

which is more correct semantically and we don’t have the alignment issue Mosh has at the end of the video.

---

<div class="post-metadata">

**Author:** ![Megha](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.codewithmosh.com/megha/32/1136_2.png) [@Megha](https://forum.codewithmosh.com/u/Megha)\
**Post date:** [February 20, 2021, 1:03pm UTC](https://forum.codewithmosh.com/t/why-isnt-it-bold/2854/3 "2021-02-20T13:03:16Z")

</div>

> [@SAM](#):
>
> First of all: You have defined your whole table content inside a `thead` element?

Oops!!🤦‍♀️

> [@SAM](#):
>
> If you compare your markup in the `tfoot` element with Mosh’s you will see that he uses `th` elements while you are using `td ` elements. That’s why your table looks different.

My bad I didn’t notice it…

Thanks for the help @SAM

---

<div class="post-metadata">

**Author:** ![JerryC](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.codewithmosh.com/jerryc/32/859_2.png) [@JerryC](https://forum.codewithmosh.com/u/JerryC)\
**Post date:** [February 25, 2021, 12:17am UTC](https://forum.codewithmosh.com/t/why-isnt-it-bold/2854/4 "2021-02-25T00:17:16Z")

</div>

> [@Megha](#):
>
> ```auto
> <!DOCTYPE html>
> <html lang="en">
> <head>
> <meta charset="UTF-8">
> <meta http-equiv="X-UA-Compatible" content="IE=edge">
> <meta name="viewport" content="width=device-width, initial-scale=1.0">
> <title>Tables</title>
> <style>
> table, td, th{
> border: 1px solid blue;
> border-collapse: collapse;
> padding: 5px;
> }
>     
> tfoot{
> text-align: left;
> }
> </style>
> </head>
> <body>
> <table>
> <thead>
> <tr>
> <th colspan="2">Report Card</th>
> </tr>
> <tr>
> <th>Subject</th>
> <th>Marks</th>
> </tr>
> <tbody>
> <tr>
> 
> <td>Math</td>
> <td>47</td>
> </tr>
> <tr>
> <td>English</td>
> <td>45</td>
> </tr>
> </tbody>
> <tfoot>
> <tr>
> <td>Total</td>
> <td>92</td>
> </tr>
> </tfoot>
> </thead>
> </table>
> </body>
> </html>
> 
> ```

```auto
SAM's previous answer is correct.
I made th*s reply and could not remove it.
Sorry.

```
