dcsimg
www.webdeveloper.com
Results 1 to 2 of 2

Thread: Forms and Tables

  1. #1
    Join Date
    Dec 2011
    Posts
    55

    Forms and Tables

    I read a lot that styling your web page via tables, to have everything lined up how you want is considered bad practice. I don't do it myself but I've certainly seen that around a lot. So I honestly have two questions which I'm sure will be simple to answer.

    1) Why is it such bad practice? If it gets the website looking how it's supposed to, what's wrong with it?

    2) Despite what is said above, is it still acceptable to use tables with web forms in order to keep it looking nice? So that text boxes and such are lined up nicely and not varied on position on the page?

  2. #2
    Join Date
    Mar 2005
    Location
    Behind you...
    Posts
    1,031
    From what I've learned, it's mainly the use of the <table> tag itself that is becoming something web developers should avoid. With CSS allowing for table display types it's always a better idea to use CSS tables vs the <table> tag.

    A few reasons you would probably want to avoid tables is the fact that not all browsers display them the same. It's possible to get all of the major rendering engines to display things pretty much the same, but now with the growing mobile market of phones and tablets you do need to start considering displays for these devices as well (for which tables tend to be less friendly). Fluid and responsive CSS designs are what seem to be filling the void here. You can create grid designs without using tables, giving you the same organized look but much more suitable across all platforms, devices and browsers.

    As far as being acceptable goes, I'm not actually entirely sure what the W3C standard is for tables at the moment. It may still be valid (at least for HTML 4 validation) but in any case it's not such a bad practice that it would ruin anything on a site. It's obviously one of the simplest ways of aligning and organizing your page but it's something that any web developer should be trying to get away from and avoid for the modern age of web development.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles