Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Web Programming > HTML > HTML Code Clinic
|
HTML Code Clinic Do you have some HTML code you'd like to share and get suggestions from others for tweaking or improving it? This discussion is the place.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the HTML Code Clinic 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 December 3rd, 2007, 04:17 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 Must there be a <tfoot> if there is a <thead>?

If i wanted to construct a simple table, a table that is so simple that it does not have a footer. Can i split the table in <thead> and <tbody> and not put in the <tfoot>. Is this wrong? I want to follow the best and current practices.

We could always construct a simple table by using the <th> <td> tags. Why do we split up tables in the first place?

I guess it is for accesibility issues but. Can we create highly accesible tables without splitting it up (very simple tables).

Thank you in advance for all your thought and views.

Kenneth Jaysone Francis

[email protected]

 
Old December 8th, 2007, 12:14 AM
Friend of Wrox
 
Join Date: Jun 2007
Posts: 477
Thanks: 10
Thanked 19 Times in 18 Posts
Default

In the first place, if you don't have content for a section, you certainly don't need to use it. That's not a problem. If you have a heading/title for a table but nothing else, then by all means, you a <thead> without a <tfoot>. Use what you need and otherwise eliminate extra markup.

In the second, you're raising the larger issues of structure and best practices. I like to structure my page via their headings, that's about the most user friendly way since accessibility tools and web browsers usually allow you some feature to move through the document via the headings. Links are the other key feature to use strategically and thoughtfully on the webpage since links and form elements are the standard tab points in the document.

Last but not least, one of the big thorns in the side of the Web Standards movement is table based design. So unless you're using tables strictly for tabular data, use the more flexible method of divs and CSS to control the structure of your page. There's a reason MS went to great pains to include CSS support in VS 2008. It's much more powerful than controlling your appearance inline. And divs give you the logical control that tables do without imposing that structure visually. You can control the visual representation any way you want including rendering the divs in a table like layout. It's much more flexible.

-------------------------

Whatever you can do or dream you can, begin it. Boldness has genius, power and magic in it. Begin it now.
-Johann von Goethe

When Two Hearts Race... Both Win.
-Dove Chocolate Wrapper

Chroniclemaster1, Founder of www.EarthChronicle.com
A Growing History of our Planet, by our Planet, for our Planet.





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
<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
<STRONG> vs <B> and <EM> vs <I> anshul HTML Code Clinic 12 September 1st, 2004 05:22 PM





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