Total members 11895 |It is currently Tue Dec 03, 2024 5:53 pm Login / Join Codemiles

Java

C/C++

PHP

C#

HTML

CSS

ASP

Javascript

JQuery

AJAX

XSD

Python

Matlab

R Scripts

Weka





add caption to the table in html using the caption tag within the table tag itself. You can set the style of the caption and also its value.

Code:

    
<html>
<
head>
<
title>caption element example</title>
</
head>
<
body>
   <center>
       <table 
              width
="300" 
              border
="2" 
              cellspacing
="2" 
              cellpadding
="2" 
              align
="center">
          <caption  valign="bottom" style="color:blue">
             Table 1-1. Test results for midterm examples
          
</caption>
          <tr>
          <th>Subject 1</th>
          <th>Subject 2</th>
          </tr>
          
          
<tr>
              <td>32</td>
              <td>31</td>
          </tr>
          <tr>
              <td>54</td>
              <td>52</td>
          </tr>
       </table>
   </center>
</
body>
</
html>
 




_________________
M. S. Rakha, Ph.D.
Queen's University
Canada


Author:
Mastermind
User avatar Posts: 2715
Have thanks: 74 time
Post new topic Reply to topic  [ 1 post ] 

  Related Posts  to : adding caption to table in html
 put caption at the bottom of table     -  
 adding abbreviations to your html     -  
 DDL Statements-Adding Constraints-CREATE-ALTER-TABLE     -  
 HTML Scrollable table     -  
 Sort HTML table from JQuery     -  
 Use for loop to output HTML table     -  
 HTML Table Of Contents Generator     -  
 Adding a New Node to contact.xml     -  
 Need automatic adding to catalogs     -  
 adding padding to your text     -  



Topic Tags

HTML Table






Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
All copyrights reserved to codemiles.com 2007-2011
mileX v1.0 designed by codemiles team
Codemiles.com is a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to Amazon.com