Question: One part of web development (from a front-end perspective) is laying out forms. There is never a standard set, and I've seen people continuing to use `<tables>` to keep styling consistent. Say you were to lay out this form:

![enter image description here](https://i.stack.imgur.com/2L4Es.png)

At first glance it seems that a table would make laying out this form easy. Another options is to use `<fieldset>`'s, with perhaps a list inside them. Float the fieldsets to the left, give them equal widths. 

My question is **what is the most standard way of laying out forms?** There seem to be several techniques, but many of them don't work cross browser.

How would **you** do it? And why?

Answer: 
The practice of using tables as layout made sense prior to CSS, but tables are actually intended to present data and nothing else. The simplest way to layout a form is label above field in a single column, but it is possible to create the same grid-like layout that tables provide using the `<div>` element and some CSS.

For that, the CSS might look like this: 

```
.layout-grid{
    display: table;
}

.layout-row{
    display: table-row;
}

.layout-cell{
    display: table-cell;
}

```

and the HTML might look like this:

```
<form action="foo.php" method="post">
    <div class="layout-grid">
        <div class="layout-row">
            <div class="layout-cell">
                <label for="foo">Foo:</label>
            </div>
            <div class="layout-cell">
                <input id="foo" name="foo" />
            </div>
        </div>
        <div class="layout-row">
            <div class="layout-cell">
                <label for="foo">Foo:</label>
            </div>
            <div class="layout-cell">
                <input id="foo" name="foo" />
            </div>
        </div>
        <div class="layout-row">
            <div class="layout-cell">
            </div>
            <div class="layout-cell">
                <button type="submit">Go!</button>
            </div>
        </div>
    </div>
</form>

```
Personally? A table. At work? CSS. I go with whatever is required. There's the whole debate about the fact that a form is not in and of itself tabular data (like that of a form), which is true, and there is CSS that can create a cell-like structure.

If you're short on time and comfortable with only tables? Tables. Next up is the CSS/cell structure, but most will (probably rightly) say CSS all the way. It's not too difficult, and if you want to mix and match the whole thing, say adding an extra, fourth question at the bottom at the first three, it will make the change just a tad quicker. Not much, but a tad.