php – 在此上下文中元素p不允许作为元素dl的子元素. (抑制此子
在使用W3C进行验证时,我遇到了以下错误.
“错误:在此上下文中,元素p不允许作为元素dl的子元素.(从此子树中抑制更多错误.)”. 有谁知道如何解决这个问题? <dl> <dt>Comments</dt> <dd class="auto"> <textarea name="cus-other-info" cols="45" rows="5" id="cus-other-info-id"></textarea> </dd> <p class="cap">ReCAPTCHA entry is for testing whether you are a human visitor and to prevent automated spam submissions.</p> <dd class="auto recaptcha"> <div class="recaptcha-item"> <script type="text/javascript" src="http://www.google.com/recaptcha/api/challenge?k=6LfaXscSAAAAAMcN5Mfvza9CyYfV7K5__BbQiPBN"></script> <noscript> <iframe src="http://www.google.com/recaptcha/api/noscript?k=6LfaXscSAAAAAMcN5Mfvza9CyYfV7K5__BbQiPBN" height="300" width="500" frameborder="0"></iframe><br/> <textarea name="recaptcha_challenge_field" rows="3" cols="40"></textarea> <input type="hidden" name="recaptcha_response_field" value="manual_challenge"/> </noscript> </div> </dd> <p><sup class="required">*</sup> = Required Fields</p> <dd class="auto recaptcha"> <div class="submit-item"> <input type="button" class="reset-but" value="Reset" onclick="clearContForm();" /> <input type="button" class="submit-but" value="Submit" onclick="formSubmit();" /> </div> </dd> </dl> 解决方法
从各自的
MDN docu:
你的< p>标签未包含< dl>或者< dt>标签.如果您更改此设置,您的代码将会验证. 此外,我建议使用标签,以满足他们的需求.再次引用MDN:
从上面的代码中,我假设您只是将其用于布局和/或样式目的. (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |