Following the improvements to our comments form a few days ago, I noticed that although it was better than it had been before, it still did not validate with the W3C.
I then made a few alterations to the comments.html page and it now passes the W3C validator. Our doctype, by the way, is xHTML 1.0 Strict.
Here’s the code that is now used on our comments.html file. Thanks to Blogsome forum for yielding info on how to make the Blogsome captcha validate.
<div id="comms">
<h2 id="comments">{commentsnumber zero="Comments" one="1 Comment" more="% Comments"}
{if $post->commentstatus == 'open'}
<a href="#postcomment" title="Leave a comment" tabindex="1">»</a>
{/if}
</h2>
{if $comments != ''}
<ol id="commentlist">
{foreach from=$comments key=key item=comment}
{globalvar var='comment' value=$comment}
<li id="comment-{commentID}">
<cite>{commenttype} {e text="on"} {commentdate} @ <a href="#comment-{commentID}">{commenttime}</a> {editcommentlink link='Edit This' before=' |'}<br />{e text="by"} {commentauthorlink},<br />
</cite>
{commenttext}
</li>
{/foreach}
</ol>
{else} <!– this is displayed if there are no comments so far –>
<p>{e text="No comments yet."}</p>
{/if}
<h2 id="postcomment">{e text="Leave a comment"}</h2>
{if 'open' == $post->commentstatus}
<p>{e text="Line and paragraph breaks automatic, e-mail address never displayed, <acronym title='Hypertext Markup Language'>HTML</acronym> allowed:"} <code>{allowedtags}</code></p>
<p><b>Note:</b>Your comment will be moderated and will appear as soon as possible. Please do not repost. Thank you for visiting It's All Beta.</p>
<form action="{$siteurl}/wp-comments-post.php" method="post" id="commentform">
<p>
<input type="text" class="text" name="author" id="author" value="{insert name=var var=commentauthor}" size="28" tabindex="2" />
<label for="author">{e text="Name"}</label> {if $req != ''} {e text='(required)'} {/if}
<input type="hidden" name="commentpostID" value="{$post->ID}" />
<input type="hidden" name="redirectto" value="{$redirectto}" />
</p>
<p>
<input type="text" class="text" name="email" id="email" value="{insert name=var var=commentauthoremail}" size="28" tabindex="3" />
<label for="email">{e text="E-mail"}</label> {if $req != ''} {e text='(required)'}{/if}
</p>
<p>
<input type="text" class="text" name="url" id="url" value="{insert name=var var=commentauthorurl}" size="28" tabindex="4" />
<label for="url">{e text="<acronym title='Uniform Resource Identifier'>URI</acronym>"}</label>
</p>
<p>
<label for="comment">{e text="Your Comment"}</label>
<br />
<textarea name="comment" id="comment" class="text" cols="60" rows="4" tabindex="5"></textarea>
</p>
{if $captchaimageURL != "" && $bloguserlevel == -1}
<p><input type="hidden" name="captchasecret"
value="{$captcha.secret|escape}"/>
<input type="hidden" name="captchacreationtime"
value="{$captcha.creationtime|escape}"/>
<input type="hidden" name="captchaexpirytime"
value="{$captcha.expirytime|escape}"/>
<input type="hidden" name="captchagenerator"
value="{$captcha.generator|escape}"/>
<input type="hidden" name="site" value="{$captcha.site|escape}"/>
</p>
{/if}
<p>
<input name="submit" type="submit" tabindex="7" value="{e text="Say It!"}" />
</p>
</form>
{else} <!– comments are closed –>
<p>{e text="Sorry, the comment form is closed at this time."}</p>
{/if}
</div>