Wrox Programmer Forums
|
BOOK: Beginning Web Programming with HTML, XHTML, and CSS This forum is for discussing Jon Duckett's book Beginning Web Programming with HTML, XHTML, and CSS.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning Web Programming with HTML, XHTML, and CSS section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old November 28th, 2007, 02:59 AM
Authorized User
 
Join Date: Mar 2007
Posts: 21
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to kennethjaysone Send a message via Yahoo to kennethjaysone
Default Table woes - <th> inside a <thead>.

I'm currently learning table constructions in XHTML. Currently, i'm at the part where we learn how to split up tables using <thead>, <tbody> and <tfoot>.

The book instructs us to construct a table and split up the sections (page 147).

The example code given is:

<table>
<thead>
<tr>
<td colspan="4">This is the head of the table</td>
</tr>
</thead>

Please note the tag that i have bolded. Why do we use a <td> tag. Since this is the head of the table, why don't we use the <th> tag.

I'm thinking of doing it like this:

<table>
<thead>
<tr>
<th colspan="4">This is the head of the table</th>
</tr>
</thead>

Is there anything wrong with my way or is there a more sinister reason for the book to teach me otherwise?

Thank you in advance for all your thoughts and views.

 
Old April 4th, 2010, 02:48 PM
Registered User
 
Join Date: Apr 2010
Posts: 70
Thanks: 4
Thanked 0 Times in 0 Posts
Default

I believe that either way you will get the same results. The only difference is that with <th>, the text gets bolded automatically in most browsers. The code in the book may have been a typo.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Ch 8: <asp:image> inside <a> & ext.CSS (pg. 274) epc BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 1 July 12th, 2008 04:37 AM
Must there be a <tfoot> if there is a <thead>? kennethjaysone HTML Code Clinic 1 December 8th, 2007 12:14 AM
Regular Expression to remove <table> </table> tags mathalete CSS Cascading Style Sheets 2 January 23rd, 2006 01:59 PM
<style> tags in a <body> vs. <div> bcat BOOK: Beginning CSS: Cascading Style Sheets for Web Design ISBN: 978-0-7645-7642-3 1 March 27th, 2005 08:50 AM
<marquee><b>About CHAT App. in PHP4</b></marquee> Ramkrishna PHP How-To 1 September 11th, 2004 07:01 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.