Can we have multiple <tbody>
tags in same <table>
? If yes then in what scenarios should we use multiple <tbody>
tags?
Can we have multiple in same ?
2018-12-31 09:06发布
相关问题
-
Views base64 encoded blob in HTML with PHP
-
Is there a way to play audio on a mobile browser w
-
HTML form is not sending $_POST values
-
implementing html5 drag and drop photos with knock
-
Why does the box-shadow property not apply to a
查看全部
2018-12-31 09:06发布
相关问题
- Views base64 encoded blob in HTML with PHP
- Is there a way to play audio on a mobile browser w
- HTML form is not sending $_POST values
- implementing html5 drag and drop photos with knock
-
Why does the box-shadow property not apply to a
Yes. I use them for dynamically hiding/revealing the relevant part of a table, e.g. a course. Viz.
A button can be provided to toggle between everything or just the current day by manipulating tbodies without processing many rows individually.
Yes you can use them, for example I use them to more easily style groups of data, like this:
Then you can style them easily, like this:
You can view an example here, it'll only work in newer browsers...but that's what I'm supporting in my current application, you can use the grouping for JavaScript etc. The main thing is it's a convenient way to visually group the rows to make the data much more readable. There are other uses of course, but as far as applicable examples, this one is the most common one for me.
According to this example it can be done: w3-struct-tables.
Yes. From the DTD
So it expects one or more. It then goes on to say
I have created a JSFiddle where I have two nested ng-repeats with tables, and the parent ng-repeat on tbody. If you inspect any row in the table, you will see there are six tbody elements, i.e. the parent level.
HTML
( Side note: This fills up the DOM if you have a lot of data on both levels, so I am therefore working on a directive to fetch data and replace, i.e. adding into DOM when clicking parent and removing when another is clicked or same parent again. To get the kind of behavior you find on Prisjakt.nu, if you scroll down to the computers listed and click on the row (not the links). If you do that and inspect elements you will see that a tr is added and then removed if parent is clicked again or another. )
EDIT: The
caption
tag belongs to table and thus should only exist once. Do not associate acaption
with eachtbody
element like I did:BAD EXAMPLE ABOVE: DO NOT COPY
The above example does not render as you would expect because writing like this indicates a misunderstanding of the
caption
tag. You would need lots of CSS hacks to make it render correctly because you would be going against standards.I searched for W3Cs standards on the
caption
tag but could not find an explicit rule that states there must be only onecaption
element per table but that is in fact the case.