Displaying tags as text

I’m working on the Cheat Sheet excesise where you have to create a table with HTLM / CSS elements in it with a description. I’ve got the tables working, and the styling looking how I want it, but when it comes to actually putting a tag in the boxes to be displayed, the browser thinks I want to add that tag there.

Below is an example of what I mean, in the first in the , instead of showing the text ‘’, it tries to add another table. Where am I going wrong?

<div class="Table">
            <table>
                <thead>
                    <tr>
                        <td class="c1">Tag</td>
                        <td class="c2">Name</td>
                        <td class="c3">Description</td>
                    </tr>
                </thead>
                <tbody>
                    <tr>
                        <td class="c1"><table></td>
                        <td class="c2">data2</td>
                        <td class="c3">data3</td>
                    </tr>
                    <tr>
                        <td class="c1">data1</td>
                        <td class="c2">data2</td>
                        <td class="c3">data3</td>
                    </tr>
                    <tr>
                        <td class="c1">data1</td>
                        <td class="c2">data2</td>
                        <td class="c3">data3</td>
                    </tr>
                </tbody>
            </table>
        </div>
</div>
// You wrote:
<td class="c1"><table></td>

// You want to write text <table> not create a table.
// You can use escape codes:
<td class="c1">&lt;table&gt;</td>

// It will show up as the word <table>

Some links for escape characters:
https://www.htmlandcssbook.com/extras/html-escape-codes/
https://www.w3schools.com/html/html_entities.asp
https://www.freeformatter.com/html-entities.html

1 Like

That’s great, thank you. :slight_smile:

1 Like