Hacker Timesnew | past | comments | ask | show | jobs | submitlogin

By default the form builder gives you HTML like this:

    <form class="form-container">
    <div class="form-title"><h2>Sign up</h2></div>
    <div class="form-title">Name</div>
    <input class="form-field" type="text" name="firstname" /><br />
    <div class="form-title">Email</div>
    <input class="form-field" type="text" name="email" /><br />
    <div class="submit-container">
    <input class="submit-button" type="submit" value="Submit" />
    </div>
    </form>
Why wrap the h2 in div? Why labels are divs? Why the button is wrapped in div? Br elements?


At the very, very least I would expect a generated form to be accessible, and this is not.


No doubt for styling purposes.


I'd be curious what styling purposes require an h2 to be wrapped with a div or to use a div as a label instead of a label.




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: