Home | Contact Us

C-Sharp | Java | Python | Swift | GO | WPF | Ruby | Scala | F# | JavaScript | SQL | PHP | Angular | HTML

HTML caption Tag

HTML caption Tag with html tutorial, tags, anchor, img, div, entity, textarea, marquee, p tag, heading tag, h1, h2, table, formatting, attribute, elements, ol, ul, Input Types, block element tag, inline element tag, html tags, phrase tag, head, body, form, lists, symbols etc.

<< Back to HTML

HTML <caption> tag

HTML <caption> tag is used to add a caption or title of an HTML table. It should be used inside the <table> element and just after the <table> start tag. A table may contain only one <caption> element.


<caption>Table title...</caption>

Following are some specifications about the <caption> tag

Display Inline
Start tag/End tag Both start and End tag
Usage textual

Example 1

<!DOCTYPE html>
	<title>Caption Tag</title>
		table, td, th {
        border: 3px solid gray;
        border-collapse: collapse;}
    <h2>Example of Caption tag</h2>
   <table width="800">
	  <caption>Employee Details</caption>
     		<th>Sr. No.</th>
    		<td>Ankit Pandey</td>
    		<td>Ashvini Kumar</td>
    		<td>Swati Sharma</td>
Test it Now


HTML caption tag


Tag-specific Attributes

Attribute Value Description
  • top
  • bottom
  • left
  • right
It aligns the caption with respect to table

Global Attributes

The <caption> tag supports the Global attributes

Event Attributes

The <caption> tag supports the event attributes.

Supporting Browsers

Elementchrome browser Chromeie browser IEfirefox browser Firefoxopera browser Operasafari browser Safari
Next TopicHTML Center Tag

Related Links:

Related Links

Adjectives Ado Ai Android Angular Antonyms Apache Articles Asp Autocad Automata Aws Azure Basic Binary Bitcoin Blockchain C Cassandra Change Coa Computer Control Cpp Create Creating C-Sharp Cyber Daa Data Dbms Deletion Devops Difference Discrete Es6 Ethical Examples Features Firebase Flutter Fs Git Go Hbase History Hive Hiveql How Html Idioms Insertion Installing Ios Java Joomla Js Kafka Kali Laravel Logical Machine Matlab Matrix Mongodb Mysql One Opencv Oracle Ordering Os Pandas Php Pig Pl Postgresql Powershell Prepositions Program Python React Ruby Scala Selecting Selenium Sentence Seo Sharepoint Software Spellings Spotting Spring Sql Sqlite Sqoop Svn Swift Synonyms Talend Testng Types Uml Unity Vbnet Verbal Webdriver What Wpf