HTML caption Tag
HTML caption Tag
The caption tag defines a table caption. It must be inserted immediately after the table tag. By default, the position of the table caption is center but we can change it by using the text-align property. We can also determine either the caption should be displayed above the table or below the table by using the caption-side property.
Uses of caption tag:-
- It defines the caption for the table
- It provides additional information related to the document
- It helps in improving the overall structure of the table
- It helps in making the UI of the web more attractive
Syntax:-
Its syntax is:- < caption >