When writing in HTML, thetag is a block element used to add a title to a table. The following sections contain information about thetag, including an example of it in use, and related attributes and browser compatibility.

Example ofcode

I'm a Table Caption
MonthSavings
March$200
April$300
May$250

Example result

As you can see in the previous example, there is a title above the table; it was put there using thetag. We have also used CSS to added classes to the table and its rows to make them look nicer.

If you are using thetag inside of a

tag that is the only element in a
, use
instead.

  • Example of
code
  • Example result
  • Deprecated attributes
  • Compatibility
  • Related information
  • Deprecated attributes

    Within an HTML tag, an attribute dictates certain aspects of an HTML element. Attributes are made up of a name and value pair; all tags support standard attributes. The

    tag only has one unique attribute that became deprecated and the obsolete within HTML5. The following table shows that attribute, and a description of what it did.

    Compatibility

    Browser, Compatibility, Container tag, Parent and child, Title, Web design terms

    • HTML and web design help and support.