Tables a thing of the past?

Posted on 2007-07-30
Last Modified: 2010-04-09
so I have been reading that tables are no longer encouraged in html.  Why is this and what should be used instead?
Question by:flashactions
    LVL 5

    Accepted Solution

    table is still a very important and useful element. it's perfect for tabular data.

    i think what you've read is just not recommend use that for layout. that is because table will keep the table layout even when the stylesheet is disabled or not attached. you can try use stylesheet to layout your page. but you still can use table because it is so easy and it also able to produce some clean layout markup.
    LVL 1

    Author Comment

    how are style sheets used exactly to take the place of tables?  the code centers and stuff like that?  ist it somethine an individual font setting for eash style sheet?  im not sure.
    LVL 5

    Expert Comment

    there are many things you can do with css stylesheet. have a look on that is a good source of information for web dev. there are many tutorials on css as well as on other web standards.

    this is a very simple page layout you can do with css. sure there could be mant tweaks you can do on this page:

    <title>Simple Layout Test</title>
    <style type="text/css">
    body {margin:0; padding:0; font-family:arial; font-size:12px;}
    #mainWrapper {text-align:center;}
    #innerWrapper {text-align:left; margin-left: auto; margin-right: auto; width:90%;}
    #headerContainer {background-color:#206ba4; color:#000;}
    #footerContainer {background-color:#e7e4d3; color:#000;}
       width:20%; background-color:#bedf5d; color:#000;
       float:left; margin-left:0;

       float:left; margin-left:0;
       clear:both; content:'&nbsp'; display:block; height:0; visibility:hidden;
       display: inline-block;

    <div id="mainWrapper">
    <div id="innerWrapper">
       <div id="headerContainer">header</div>
       <div id="contentContainer">
          <div id="layoutBlock_01">
          <div id="layoutBlock_02">
             Main Content
       <div id="footerContainer">

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Course: HTML5 Specialist

    HTML5 development skills are critical to all developers. HTML5 is the foundation to almost any development process. That's why business, design studios, development shops and other organizations need HTML5 developers. Get your foot in the door as a HTML5 specialist.

    Suggested Solutions

    "I want to put my photos online, but I don't want them stolen.  What settings should I use?" When You Put Photos Online First and foremost, any digital file published on the WWW can be copied, stored, modified, retransmitted, etc.  Remember Naps…
    This is a PowerShell web interface I use to manage some task as a network administrator. Clicking an action button on the left frame will display a form in the middle frame to input some data in textboxes, process this data in PowerShell and display…
    In this tutorial viewers will learn how to position items using CSS's three positioning types Create a new HTML document with an internal stylesheet.: Create another div in CSS and name it Absolute : Type "position:absolute;" and "top:10px; left:50p…
    In this tutorial viewers will learn how to position overlapping items using z-index in CSS. They will also learn the restrictions on the z-index property.  Create a new HTML document with an internal stylesheet.: Create a div in CSS and name it Red.…

    760 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    8 Experts available now in Live!

    Get 1:1 Help Now