Please Fill Out This Form

Forms are not sexy but they don’t have to be ugly.  Here’s the example we worked out in class on Thursday, where a little effort can make a form a lot more readable:

    <title>layout for forms</title>
    <style type="text/css">
      span.label {
      	float: left;
      	text-align: right;
      	width: 100px;
      	padding-right: 5px;
      div.row {
        padding-bottom: 10px;
    <h1>please fill out this form</h1>


      <div class="row">
        <span class="label">name:</span>
        <input type="text" size="15" />

      <div class="row">
        <span class="label">password: </span>
        <input type="password" size="15" />

      <div class="row">
        <span class="label">comment:</span>
        <textarea rows="5" cols="40"></textarea>

      <div class="row">
        <span class="label">&nbsp;</span>
        <input type="submit" value="Send the form" />


speak up

Add your comment below, or trackback from your own site.

Subscribe to these comments.

Be nice. Keep it clean. Stay on topic. No spam.

You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

*Required Fields