"div" or "tables"

by 66 replies
75
What is better to use? "div" or "tables"???????
#website design #div #tables
  • "divs" every time!
    Although tables are easy to build websites with, they are not recognised as web standard and divs are the way forward (see Web Content Accessibility Guidelines 1.0). Tables are fine to use within a website to show data but if you're only just starting out building websites, it worth the time and effort to learn how to use divs. Tables are also hard for screen readers to read information.
  • "div" for sure
    • [1] reply
    • Use tables for tables of data.

      use divs for your layout
  • Everyone says divs. I agree that divs are the way to go if you can do them, they can get tricky the more complex the design. But from my experience there really isn't much of a difference on the users side. If there is a load time issue, it is soooo small that it really does not matter unless you are anal.

    Now, from the coders side, I think that someone somewhere, at sometime started pushing divs hard, probably some coding nerd. And now its the new up and coming standard.

    As for tables not being recognized as a valid website. That makes no sense. Because w3C validates a website as 100% even if its designed in tables........ You will however need to use css though.
    • [1] reply
    • Thanks for your comments Steve. I started off being throughly impressed by everyone saying that, and that was the way I went. But especially when a site is being adapted for IE 6, tables seem to work better than css. Hopefully they'll bury the browser soon and it won't be a problem any more.

      But I have seen a few sites put up by people I think are really intelligent, using tables for layout. I guess it still does have its uses.
  • Nobody said tables cannot be valid. The issue is: tables are for tabular data not for layout design. It's that simple.

    At the beginning of the time... it was tables and inline styles.
    Have you ever tried to change the design of a site with 100 pages all done with tables and inline styles...?

    Compare the scenario above with web pages designed with divs and one single CSS file. (Yes, to tell the truth you can have 100 pages designed in tables and one single CSS file, too... it's just that tables were invented for something else.)
    • [2] replies
    • This is what I took as not being valid.....

      Yep, I know tables were invented for tabular data, but they still work, and from a users point of view, as long as it works and looks great they do not really care. Yep, you can have tables and one css file......

      I just mentioned this and made my comment because so many people are talking about divs as if tables cannot be used. Which they can be and they produce on the users side a great looking site they can only be differenciated if looking at the code.

      I use divs and I have used tables, they both load super fast, unless you are image heavy, which is normal for most stupid IM sales pages. Not all though.

      I think that most people, users, have no clue what they hell either way, as long as it works properly. They pay just the same also. Now, I will endeavor to do divs, but sometimes a quick table site is just what works, at least for me....
      • [2] replies
    • Hahahaa.. that's painful, even hearing it.
  • Divs. But using tables for layout probably isn't going to kill you.
  • div baby
  • div x 100,000

    Using tables with CSS, jQuery, AJAX and all the other cool stuff available now is going to cause untold grief for you.

    Tables = betamax
    div = VHS :-)
  • I use div tags for the basic layout. Therefor I only use tables to display data (like in a excel sheet).

    Most people start with tables, so did I. But if you are used to css, div tags are way easier and cleaner!
  • Deprecated
    Tables will likely NOT ever become "obsolete".

    So, whatever works for you (and the MAJORITY of your targeted visitors), is what's recommended...

    Be Well!
    ECS Dave
  • It will make sence for you to use tables for displaying something like spreadsheet data, however id mainly use divs for everything else.
  • The google Standard Is Css So You Better to Use Div base Css
  • DIV IDs for foundation elements, DIV classes for fonts, buttons, boxes (where mulitple instances of are present on the same page).

    No one's going to kill you for using tables, but they load slower and are overall jankier than well written CSS.

  • DIV -- almost every time.

    Tables are great for representing data in a tabular format, but are typically used incorrectly by most web designers.

    In general, I prefer DIV.
  • Banned
    [DELETED]
  • Hi,
    My suggestion is use div because the table is fixed.That means you cant move the table,It divides the webpage.But div is not fixed, You can move the div anywhere in your webpage.
    • [1] reply
  • Div is best Do not think for tables
  • I always use div as it is easy to use and lot of features .
  • Those who say div's for layout and tables for tabular data are correct. Pragmatism aside, div's work best for layout for two big reasons:

    1. Easier on screen readers
    2. SEO

    Div's are essentially meaningless to most browsers whereas tables are meaningful and are meant to mark up data. If you look at a site built using tables for layout and data with a screenreader, it's going to be messy.

    Similarly, if a search engine robot comes to your site and has to dig through nested tables, it's going to be messy.

    So it boils down to what you are displaying and why. If you don't care about SEO or semantically correct HTML, then use whatever you like.

    If you care about writing the correct markup, then use not just div's but take a look into POSH (Plain Old Semantic HTML).
  • When I want to do something fast i use tables....
    I spent a little more time using divs!
    • [1] reply

    • That's exactly what I used to do but that's only because I'v always done it all in dreamweaver but the more I played around and practiced with DIVS in the html and then CSS as a seperate file the more easier it became. Personally I prefer the idea of setting up the html and css files seperately now and then only having to edit the CSS file for any changes. I also prefer the flexibility of being pixel perfect with CSS & DIVS.
  • I prefer divs too. Basic tabular data I might use tables but I love divs and have created some great effects using divs for tabular data too.

    I find tables for design to be bloated, heavy, causing more potential problems (from a design POV).

    To tackle IE6,7,8, you can add a simple IE specific stylesheet VERY easily and fix most "bugs"
    • [1] reply
    • Div is the best way..coz it will be load fast so its good for doing SEO too..
  • Divs, always Div's, not matter what you do Divs
  • Always using div except tabular data(table)
  • defently DIVS! Today it is to easy to use div's EVEN if it is data ! HTML5 rules! and maybe you should use CSS3, even if some browser doesnt support is propperly yet, it will save you time and headache later ;-)
  • i prefer div to make layouts and data for tables
  • It is really good to use div. Tables were used in the early 2000's. Tables are not that customizable. With "div" CSS can do a lot more.
  • div is used to separate section of html into an object. and besides allow CSS tags and other html codes to act upon the entire div section. it is important to give a name to your div.
  • div for the win!
  • "div" the best option
  • "table" will be the best option according to your requirement.
  • if you want to use table, you will also have to use CSS to modify styles
  • I prefer divs over table always as they are good with css and compatible with most browsers.
  • I think Table is better. Table makes your site loading faster than Div make, my boss said that.
  • What drove me to learning divs and css layouts?
    Trying to modify some complex tabled laid out, messy unreadable....site.

    Tables are for eating your dinner off of ( with a plate in between the table and your dinner...) and sticking numbers etc into.

    Divs can do the lot!

    So although I went through a phase were I took great pride in making everything without tables - they do have their place, even on websites.
  • Yeh defo Divs tables are not really made for the layout of a page. Plus they are a super pain to main and can cause cross-browser problems. But tables still have there use with tabular data. Can be done also with divs and css but it can get abit of a pain as a lot of work is needed.
  • DIV tags the best..
  • Banned
    [DELETED]
  • I use div for layot
  • Div is the best option to use. Most of the developer and designers prefer to "div" due to its lots of benefits.
  • I was very keen to know the difference between the table and div as most of the webmaster's preferred DIVs than Tables. Why SEO says that using div is better than table. After reading on various blogs and forums I have analyzed some good reasons for preferring DIVs than Tables. Below are the data which I have collected, I hope this will help you in knowing the benefits of div over tables.

    1. Div Loads faster than Tables
    2. Tables can be inflexible
    3. Accessibility issues are easier with DIV
    4. Tables don't print as well
    5. Div is great for SEO - powerful to do content positioning. So basically you can place the bulk of your rich content closer to the top of your HTML code, but it will still render on the browser in the same place
    6. DIVs can reduce the size of page - Use of DIVs and CSS can allow you to reduce the size of your HTML significantly, depending on how nested your tables are. TABLE tags require, TR, TD, and some cases include, TH, THEAD, TBODY, TFOOT. This adds quite a few tags that can all be condensed into a few DIVs.
  • It is my understanding that Google can only "try" to index your site with table based designs due to all the extra code necessary to make it function. Divs and CSS are definitely the way to go.

    JasonGarland
    • [1] reply
    • huh? how did they survive in late 1990's then?
  • i prefer div over tab. as seo's point of view, with the use of div there is a decrease in the ratio of code to content, the web crawlers would be able to find your site’s content pretty easily.
  • HTML5 semantic block level elements?
    Yeah, too soon.
  • DIV for me!
    • [1] reply
    • If you're doing simple landers, then use tables if you're not already familiar with CSS layouts. CSS can be a blatant violation of the KISS principle. All of these turd-polishing, sugar-coating closeted masochistic nerds evangelizing CSS can shut it.
  • [DELETED]
  • Definitely DIVS's.

    Though there are cases that table are the best choice, take example for tabular data.
  • divs for the website development and for any data/form we use tables.
  • it depends on the use..

    for layout purposes you should use DIVs it's more flexible than creating a layout using a table.

    if your presenting a tabular data such as stats it's better to use a TABLE rather than creating a table by using a div.
  • Use divs for everything, unless it's tabulated data.

    For example, if you have a restaurant website, the menu could be put in a table with 3 columns.

    One column is for item names, the next is for "Small" and the next for "large" size dishes/ drinks, containing prices.

    The advantage of using the table is that it makes it easier to align everything.

    Example: http://www.cafe235.com.au/coffee-menu
  • Banned
    [DELETED]
  • Tables can be used, but DIV's are seen more on higher end sites, kinda personal preference if you know what your trying to achieve!
  • WordPress could not exist without tables!
    • [1] reply
    • I think, it depends on the complex of layout.
      For simple layout, use div and css.
      For complex layout, use table.
  • Banned
    [DELETED]
  • [DELETED]
  • [DELETED]
  • [DELETED]
  • [DELETED]
  • [DELETED]

Next Topics on Trending Feed