Skip to content

Commit dae1723

Browse files
Merge pull request #2972 from enkidevs/Stefan-Stojanovic-update-web-html-table-caption-element
Update caption.md
2 parents 90c5950 + 335727d commit dae1723

File tree

2 files changed

+16
-4
lines changed

2 files changed

+16
-4
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,9 @@ Types of change:
7272

7373
## December 30th 2021
7474

75+
### Fixed
76+
- [HTML - The Caption Element - Add minor info when to use strong, b and font-weight property to avoid confusion](https://github.com/enkidevs/curriculum/pull/2972)
77+
7578
### Changed
7679
- [SQL - Join Role - Change table example](https://github.com/enkidevs/curriculum/pull/2973)
7780

web/html/tables/caption.md

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ links:
99
- >-
1010
[HTML <caption>
1111
Element](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/caption){documentation}
12+
- >-
13+
[HTML <b>
14+
Element](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/b){documentation}
1215
practiceQuestion:
1316
formats:
1417
- fill-in-the-gap
@@ -31,16 +34,16 @@ The HTML `<caption>`, or the **Table Caption** element is used to specify a titl
3134

3235
Adding a clear and concise description of the table's content within the `<caption>` element is useful for helping people decide if they want to read the table or skip over it.
3336

34-
When used, `<caption>` element must to be the **first** element within the `<table>` element to be valid, although using CSS it can be moved accordingly. The property `caption-side` can be set to `bottom` to quickly move the caption to the bottom of the table even with it added to the top of the table.
37+
When used, the `<caption>` element must be the **first** element within the `<table>` element to be valid, although using CSS, it can be moved accordingly. The property `caption-side` can be set to `bottom` to quickly move the caption to the bottom of the table even with it is added to the top of the table.
3538

3639
Example:
3740

3841
```html
3942
<table>
4043
<caption>Employee List</caption>
4144
<tr>
42-
<td><strong>Name</strong></td>
43-
<td><strong>Start Date</strong></td>
45+
<td><b>Name</b></td>
46+
<td><b>Start Date</b></td>
4447
</tr>
4548
<tr>
4649
<td>Jimmy</td>
@@ -52,7 +55,13 @@ Example:
5255
</table>
5356
```
5457

55-
> 💡 In the example above, the `<strong>` element is used to bring importance to the "Name" and "Starting Date" tags. However, it can be replaced with the `style="font-weight:bold;"` CSS property.
58+
In the example above, the `<b>` element is used to bring attention to the "Name" and "Starting Date" tags.
59+
60+
If you'd like to only style the elements bold without bringing attention to them, you can apply the `style="font-weight:bold;"` CSS property:
61+
```html
62+
<td style="font-weight:bold"> Name </td>
63+
<td style="font-weight:bold"> Start Date </td>
64+
```
5665

5766
![table-caption](https://img.enkipro.com/ec2e595bc8ee7beb5d9882c1ae15022e.png)
5867

0 commit comments

Comments
 (0)