Can we have multiple in same ?
前端 未结 8 1746
攒了一身酷
攒了一身酷 2020-11-22 05:57

Can we have multiple

tags in same
? If yes then in what scenarios should we use multiple tags
8条回答
  •  野的像风
    2020-11-22 06:42

    EDIT: The caption tag belongs to table and thus should only exist once. Do not associate a caption with each tbody element like I did:

First Half of Table (British Dinner)
1Fish
2Chips
3Pease
4Gravy
Second Half of Table (Italian Dinner)
5Pizza
6Salad
7Oil
8Bread

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 one caption element per table but that is in fact the case.

提交回复
热议问题