benschwarz / developers.whatwg.org

Used to create the contents of developers.whatwg.org
http://developers.whatwg.org/
198 stars 39 forks source link

Bad Practice for Form Controls #81

Closed srsgores closed 8 years ago

srsgores commented 10 years ago

In the forms section, you are using paragraph <p> tags for sectioning content. It's a bad practice, and it's unsemantic:

<p><label>Full name: <input name=fn> <small>Format: First Last</small></label></p>
<p><label>Age: <input name=age type=number min=0></label></p>
<p><label>Post code: <input name=pc> <small>Format: AB12 3CD</small></label></p>

It's like Wordpress, and it's bad practice. Maybe try this instead?

<form action = "/">
        <fieldset>
            <legend>Shipping Information</legend>
            <label>Full name: <input name = fn>
                <small>Format: First Last</small>
            </label>
            <label>Age: <input name = age type = number min = 0></label>
            <label>Post code: <input name = pc>
                <small>Format: AB12 3CD</small>
            </label>
        </fieldset>
    </form>
benschwarz commented 8 years ago

This is covered by the source material, and not this repo.