Solved

how many times can i use the tbody tag

Posted on 2004-10-26
547 Views
Last Modified: 2008-03-06
Hello,
I was wondering as to how many times I can use the tbody tags on one page. also I would like to know that  by having the tbody on my pages will curtain areas load faster. asthey have been cached.


regards

Kenny
0
Question by:thatelvis
    6 Comments
     
    LVL 2

    Expert Comment

    by:seloh
    You can use the TBODY-tag as many times as you want, even in a table! You can use it to group rows and give them the same style.
    It will always have to look like this:
      <TBODY>
      <TR>
      ...
      </TR>
      <TBODY>

    But you can use use it several times within a table.
    If you don't use it for style-purposes leave it out because it doesn't do anything else really. It will certainly not make your pages load faster.
    0
     
    LVL 1

    Accepted Solution

    by:
    you can use N number of times this can be used as grouping of data following example can illustrate its utility



    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <html>
    <head>
    <title>Test- Table TH/TBODY</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    </head>

    <body>
    <TABLE CELLPADDING=6 RULES=GROUPS  FRAME=BOX border=1>




    <THEAD>
    <TR> <TH>Weekday</TH> <TH>Date</TH> <TH>Manager</TH> <TH>Qty</TH> </TR>
    </THEAD>

    <TBODY>
    <TR> <TD>Mon</TD> <TD>09/11</TD> <TD>Kelsey</TD>  <TD>639</TD>  </TR>
    <TR> <TD>Tue</TD> <TD>09/12</TD> <TD>Lindsey</TD> <TD>596</TD>  </TR>
    <TR> <TD>Wed</TD> <TD>09/13</TD> <TD>Randy</TD>   <TD>1135</TD> </TR>
    <TR> <TD>Thu</TD> <TD>09/14</TD> <TD>Susan</TD>   <TD>1002</TD> </TR>
    <TR> <TD>Fri</TD> <TD>09/15</TD> <TD>Randy</TD>   <TD>908</TD>  </TR>
    <TR> <TD>Sat</TD> <TD>09/16</TD> <TD>Lindsey</TD> <TD>371</TD>  </TR>
    <TR> <TD>Sun</TD> <TD>09/17</TD> <TD>Susan</TD>   <TD>272</TD>  </TR>
    </TBODY>

    -------
    <THEAD>
    <TR> <TH>Weekday</TH> <TH>Date</TH> <TH>Manager</TH> <TH>Qty</TH> </TR>
    </THEAD>
    <TBODY>
    <TR> <TD>Fri</TD> <TD>09/15</TD> <TD>Randy</TD>   <TD>908</TD>  </TR>
    <TR> <TD>Sat</TD> <TD>09/16</TD> <TD>Lindsey</TD> <TD>250</TD>  </TR>
    <TR> <TD>Sun</TD> <TD>09/17</TD> <TD>Susan</TD>   <TD>192</TD>  </TR>
    </TBODY>
    <TFOOT>
    <TR> <TH ALIGN=LEFT COLSPAN=3>Grand Total</TH> <TH>6273</TH> </TR>
    </TFOOT>
    <TFOOT>
    <TR> <TH ALIGN=LEFT COLSPAN=3>Total for first group</TH> <TH>4923</TH> </TR>
    </TFOOT>
    <TFOOT>
    <TR> <TH ALIGN=LEFT COLSPAN=3>Total for second group</TH> <TH>1350</TH> </TR>
    </TFOOT>


    </TABLE>

    </body>
    </html>
    0
     
    LVL 1

    Author Comment

    by:thatelvis
    thanks for the replys, if it does nothing lol I was wondering as to its value, I was told that by having it say in the headder of a page, and printing that page will produce 2 a4 pages, that both the pages will show the headder.

    not too sure is that true though

    regards

    Kenny
    0
     
    LVL 1

    Expert Comment

    by:krishnaashu
    no it will not print the header at two different page at the time of printing


    regards

    Ashu Krishna
    0
     
    LVL 1

    Author Comment

    by:thatelvis
    what purpose does it have then.


    Just out of interest.

    regards

    Kenny
    0
     
    LVL 1

    Expert Comment

    by:krishnaashu
    no you can group data of same type just copy my example and save it in some xyz.html and check you will be able to understand the purpose. even you change the place of thead/tfoot/tbody.
    just do a little bit R & D you will get the answer

    regards

    Ashu Krishna
    0

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Shellfire Box VPN + Lifetime Subscription

    The Shellfire Box easily connects all of your devices, even those that don't offer the possibility to establish a safe vpn connection. Access blocked content and surf safely, no matter where in the world you are located.

    Introduction HTML checkboxes provide the perfect way for a web developer to receive client input when the client's options might be none, one or many.  But the PHP code for processing the checkboxes can be confusing at first.  What if a checkbox is…
    Showing your events from Google Calendar in Google Maps Why? I travel all week and I thought it would be ideal if staff in office knew where I was based on my calendar. (OK real reason: my son wanted to see where I would be working, and I thoug…
    In this tutorial viewers will learn how to define a gradient in CSS. Create a new HTML document with an internal stylesheet.: Create a div in CSS and name it Gradient. Define the background as "linear-gradient(to right, #ee3668, black)". Ensure you …
    The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

    857 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    13 Experts available now in Live!

    Get 1:1 Help Now