[Interview] Form validation

by magicaj

HTML

<div id="message-list" class="message-list">
    <h1>Comments</h1>
    <article>
         <h2>This my body</h2>
        <p>this is my subject</p>
    </article>
    <article>
         <h2>This my body</h2>
        <p>this is my subject</p>
    </article>
</div>
<form id="myform">
    <fieldset>
        <legend>Post a Comment</legend>
        <label for="subject">Subject</label>
        <input type="text" name="subject" id="subject" />
        <label for="body">Body</label>
        <textarea name="body" id="body"></textarea>
        <input id="submit" type="submit" name="submit" value="Click Me" />
    </fieldset>
</form>

CSS

body {
    padding: 10px;
}

label {
    display: block;
}
.message-list {
    border: 1px solid #ccc;
}