HTML5 > Structures

Caption in HTML5

How to create the captions for the table in HTML5?

In HTML5 the <caption> tag is used for creating the table captions/title. It represents the title of the table, the <caption> tag should be used once at a time immediately after the <table> tag.

        <caption>This is the caption of the table.</caption>
            <td>2  fdsa f asd f af a df ads  fasd f sad f </td>

In the above snippet code we can notice that the <caption> tag is used once at a time immediately after the <table> tag.


Notice that the text inside the <caption> tag is appearing like a caption of the table in the webpage.

 Views: 4508 | Post Order: 68

Write for us

Hosting Recommendations