jtimz
jtimz

Reputation: 330

Wierd th addition in html table element

I'd like to ask something as I am really baffled why this happens and browser debug methods cannot tell me why this strange addition of a th element occurs.

<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
     <title>Stuff Page</title>
</head>
<body>
    <center>
        <div>
            <br/><br/>
            <form method="POST">
                Find Pattern
                <input type="text" name="pattern" value="" /><input type="submit" value="Find" />
                <input type="reset" value="Clear" />
            </form>
        </div>
    </center>
    <center>
    <div>
        <table>
            <caption>Table Rendering of Found Data</caption>
            <thead>
            <tr>
                <th scope="col" class="column1">Name<th>
                <th scope="col">Type</th>
                <th scope="col">Size</th>
            </tr>
            </thead>
            <tfoot>
            <tr>
                <td></td>
                <td></td>
                <td></td>
            </tr>
            </tfoot>
            <tbody>
            </tbody>
        </table>
    </div>
    </center>
</body>
</html>

If you take that segment of html code and run it in a browser (I tested it with latest chrome and ff) it adds one more th element in the table (the final page has 4 columns instead of 3) and I have absolutely no clue why this happens! If someone can tell me the reason behind it I'd be glad!

Upvotes: 1

Views: 102

Answers (2)

Gerifield
Gerifield

Reputation: 403

Check this line again:

<th scope="col" class="column1">Name<th>

Upvotes: 2

RugerSR9
RugerSR9

Reputation: 458

You didn't close your tag.

"<th scope="col" class="column1">Name<th>" The last <th> should be </th>

Upvotes: 4

Related Questions