Welcome visitor
* Login
* Register
It is currently July 23rd, 2019, 7:20 am
All times are UTC [ DST ]
* Search
View unanswered posts - View active topics

FORUMS » Client Side » HTML



Post new topic Reply to topic  [ 2 posts ] 
Author Message
  thead tbody tfoot tag
PostPosted: November 13th, 2009, 8:05 am 

Posts: 21
Hi, i was on a site that had a good layout so i took a look at their code and found these tags. what is the thead, tbody and tfoot tags for and what's the difference in using it or not?


Top
 Profile  
 
  Re: thead tbody tfoot tag
PostPosted: November 13th, 2009, 8:56 am 
User avatar

Posts: 70
Those tags helps you to keep organized the content of your table according to the rows. You're supposed to put the <thead> around the first row (<tr>) of your table. Then you should type the last row of the table with the <tfoot> tag around. If you put the <tbody> before the <tfoot> it wont work. So at last all the content' rows of your table should be inside the <tbody> tags.

These are additional tags, so the difference if you dont use them is the order in which you write your table :lol:

Using the thead, tfoot and tbody:
<table>
  <thead><tr><td>title1</td><td>title2</td><td>title3</td></tr></thead>
  <tfoot><tr><td>last1</td><td>last2</td><td>last3</td></tr></tfoot>
  <tbody>
    <tr><td>row1</td><td>row1</td><td>row1</td></tr>
    <tr><td>row2</td><td>row2</td><td>row2</td></tr>
    <tr><td>row3</td><td>row3</td><td>row3</td></tr>
    <tr><td>row4</td><td>row4</td><td>row4</td></tr>
  </tbody>
</table>



Not using them:
<table>
  <tr><td>title1</td><td>title2</td><td>title3</td></tr>
  <tr><td>row1</td><td>row1</td><td>row1</td></tr>
  <tr><td>row2</td><td>row2</td><td>row2</td></tr>
  <tr><td>row3</td><td>row3</td><td>row3</td></tr>
  <tr><td>row4</td><td>row4</td><td>row4</td></tr>
  <tr><td>last1</td><td>last2</td><td>last3</td></tr>
</table>


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

FORUMS » Client Side » HTML


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron