Print table name inside caption tag?
-
Hi Tobias,
Is there a way to filter the caption text so that the name or description of the table can be printed inside that <caption> tag (and also inside an <h2> element)? I’m trying the ‘tablepress_print_caption_text’ filter but it doesn’t seem to have the $table attributes available.
Background: for layout and semantic HTML reasons, I’d prefer to print the table name (what usually appears in the <h2> tags) in the table <caption> element. I also would prefer to print this _above_ the table itself.
This is partly because i have a margin offset for the entire <table> element and i’d prefer to keep the CSS simple, but it also seems from the spec of the <caption> element that the title of a table should go inside that element.
The topic ‘Print table name inside caption tag?’ is closed to new replies.