What attribute can you use with the caption element
Captions and summaries provide information that can help users find, navigate, and understand tables. While they are not required in every case to meet WCAG, captions and summaries are fairly straightforward ways to provide such information that is often needed.
A caption functions like a heading for a table. Most screen readers announce the content of captions. A summary conveys information about the organization of the data in a table and helps users navigate it. For example, if a table has an unusual structure as in the examples below , information about what content can be found in which row or column can be provided to the user.
A summary is usually only needed for complex tables. If both caption and summary are provided for one table, the summary should not duplicate information present in the caption. See WCAG technique H Using caption elements to associate data table captions with data tables for more advice on captions.
The caption should be a short heading for the table content. From all the above details regarding the caption, the tag explains terms; this is used to give title for the table. It works on different attributes like align attributes, global attributes, as well as some event, attributes to trigger the event on the caption tag.
Here we also discuss their introduction, list of caption tag and working. You may also have a look at the following articles to learn more—. Submit Next Question. By signing up, you agree to our Terms of Use and Privacy Policy. Forgot Password? A caption element is usually displayed, by default, on top of the associated table and with center-aligned text.
This presentation can be altered using style sheets. The caption element can only be declared at the begining of the table , before any other element inside it. When table is the only content of a figure element , caption should be omitted in favor of the figcaption element. The following example shows a common use of the caption element. As expected, it describes briefly the contents of the table.
0コメント