Table seems to automatically create a 'thead' around the first 'tr'
Asked by Robert Reiner _smartics_:

When I create a table with the editor with the head elements on the left side, Confluence seems to render a thead element around the first table row.

I think this is a fault since the td elements of the first row do not belong to the head.

Here is an image to show my problem:

table-thead.png

We are using Confluence 5.8.9.

Do I miss something here? Is it semantically legal HTML? Can I suppress the generation of the thead element?  
[](https://community.atlassian.com/t5/Confluence-questions/Table-seems-to-automatically-create-a-thead-around-the-first-tr/qaq-p/433213?attachment-id=3627){#link_1187fcd7cef419}  
[](/tnckb94959/attachments/tnckb94959/confluence-questions/73429/1/table-thead.png){#display_1187fcd7cef419_0}


Answers:
author: Steffen Heller
body: Hi,

interesting question, but, honestly, I really don't think confluence is the kind of tool that you would expect to create clean code. I never bothered to really check for validity but I know that I have had numerous cases where I was struggling with strange kinds of code soup.

Anyways, if you really want to know for real check with the [validator](https://validator.w3.org/#validate_by_input) or read about the [tr specification](http://www.w3.org/TR/html5/tabular-data.html#the-tr-element).

And perhaps you find it interesting that with my 4.3.7 version it is all different and it does **not** add a \<thead\> (but a useless \<br\>). So much about consistency!

2015-09-04 11_31_59-Bearbeiten - The Real Test - Steffen Heller - Lightweb.png

[](https://community.atlassian.com/t5/Confluence-questions/Table-seems-to-automatically-create-a-thead-around-the-first-tr/qaq-p/433213?attachment-id=8470){#link_1187fd15205bd3}  
[](/tnckb94959/attachments/tnckb94959/confluence-questions/73430/1/2015-09-04%2011_31_59-Bearbeiten%20-%20The%20Real%20Test%20-%20Steffen%20Heller%20-%20Lightweb.png){#display_1187fd15205bd3_0}

comments: author: Robert Reiner _smartics_
body: Hi Steffen, thanks for your reply!This is indeed interesting! I checked it with 5.8.1 (which has the 'bug') and 5.5 .7 (which hasn't).I had a look at the spec and it is legal to have tds within the trs of a thead.I'm still hoping to get an answer to the workaround part or a statement if this is a bug that may has to be fixed ...Thank you so far!


author: Steffen Heller
body: Why is it important to you to get rid of the \<thead\>?


author: Robert Reiner _smartics_
body: We use an add-on that applies styles via CSS to the td inside the thead (you can see it in the first screen shot). While I created a workaround in our side-wide quirk-CSS, I realized that the root cause is in the application of the thead tag. So I thought if someone has an idea to get rid of that ... :)


author: Steffen Heller
body: I don't think you will get a chance to get rid of the \<thead\>.If you want to try to solve it with CSS, try something like wiki-content .table-wrap table.confluenceTable thead tr td { ... } But remember:Without really searching for we have already stumbled across a few possible problems (your own doubts about validity, underlying code that can change from time to time and from version to version, useless code fragments that are automatically added...)


author: Robert Reiner _smartics_
body: I assume that there will be no official reply to the table structuring problem. Therefore I close this question.


author: Kelli Hoyt
body: Users of Brikit Theme Press:

Theme Press is indeed applying styling because of the \<thead\>.

We have created a ticket for this in our support system, which you can follow here: <https://brikit.atlassian.net/browse/PRESS-1411>

You can also find details on the ticket for a patch for your theme, until we get that in the product in a next release.

cheers,

Kelli

comments: author: Robert Reiner _smartics_
body: Hi Kelli,thank you for your reply!The URL is protected, but I recognize the ticket my colleague raised ... ;)Nonetheless I suppose that the root cause of the problem is on the side of Confluence: It assumes my first table row to be a header, but in fact it isn't.Once the the 1411-ticket is closed, the problem is at least no longer visible! :)Cheers,Robert