Since: DataTables 2.0

Set a caption for the table.


HTML tables have the ability to show a caption which gives brief summary of what the contents of the table are to the end user. This is done through the optional element called caption.

If your table has a caption tag, it will be used automatically. Setting a value using this property will cause the caption's existing value to be overwritten. If there is no caption in the table and a value is given to this property, the caption will be created.

Please note that the position of the caption is controlled by the CSS caption-side property - it can be shown above or below the table.


This option can be given in the following type(s):


null - do not show a caption, unless there is one in the original HTML table.


Set a caption for the table:

	caption: 'Table 1: Pupil averages'


The following options are directly related and may also be useful in your application development.