JavaScript GridView: TD VS DIV

Recently i've created very basic GridView implementation. There were a few problems, but non of them is unsolvable.

But one thing make me curious - which implementation is better: with TD elements or with DIV ?

HTML table is a very basic element and it was invented to create some sort of grid views - tables. But on other hand - div element - highly customisable and lightweight element.

P.S. I'm targeting mobile devices and result layout must contain as less elements as it possible.

UPD It's a bit confusing, but my GridView will be placed as a row in the list :)

Answers


If the data has a tabular structure (i.e. each item has something in common with every item in the same row (but doesn't have that in common with items in other ros) and ditto for columns), then a table is the right tool. Otherwise, a table isn't.

Use the element that best describes the semantics of the data (with div being the last resort (and elements with incorrect semantics not being an option)).


Need Your Help

Bada scaling question

fonts size pixel bada pt

I'm developing a reader application for Bada and have a silly question.

Should optional Foreign Key be NULL or should it point to an empty string

django database django-models

When the related value in foreign table is missing for an optional Foreign Key, I can either:

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.