Monday, October 3, 2011

17 - Tables VS. CSS( or DIV)



Lesson -17: What is difference between table and Div?


Many people try to use table elements and its descendants for page layout, for two reasons. The first is historical: tables have been around longer than CSS. Second, tables offer a quick way to create a grid-based page layout. However, divs are more flexible for the same reason – they do not restrict the layout to tabular format. Instead, a div is like a “floating box” that can be positioned anywhere you want.

Tables have many problems, including being more difficult for those with disabilities to read, as well as making it more difficult for search engines to find relevant information.

div/css based sites tend to get better page ranks in google and other crawlers because the site is “semantically” relevant. That is, you’ve tagged parts of your page with bits of information that defines its importance, such as using h1/h2/h3 tags, etc…




Advantages CSS can have over tables: 

  • CSS or Div works great for page layouts
  • smaller page size, quicker to load
  • future flexibility
  • search-engine-friendly
  • CSS helps sites work across many different mediums such as PDAs, Web browsers, and mobile phones.
  • div supports to position anywhere but table not support for this.
  • For nested design we put lot of table but in Div we use simple structure.
  • div is flexible for nested designs and short coding




Advantages of tables over CSS:


For tabular type data:  It always easy to use table to display such data structure.

ID
Name
Date
ICQ no.
0123
Ram
19/12/2002
11223344
2365
Rahim
01/12/2002
23453534
5486
Ramesh
12/11/2002
78642656
7894
Suresh
01/02/2001
12347784


This is the intended use of tables. 

In Below image shows where DIV and tables is supposed to be use effectively. 





powered by multimediagyan ©


No comments:

Post a Comment