我在 VS 2012 Express 中输入了一些 HTML 脚本并观察到以下内容: 一条错误消息(行)显示:Validation(XHTML5): element 'li' cannot be nested inside element 'form'
- 是否可以直接从 VS 2012 Express 设计窗口在浏览器上运行 HTML 脚本?
这是我的代码:
<form class="contact_form" action="" method="post" name="contact_form">
<ul>
<li>
<h2>Contact Us</h2>
<span class="required_notification">* Denotes Required Field</span>
</li>
<li>
<label for="name">Name:</label>
<input type="text" name="name" />
</li>
</ul>
<li>
<label for="email">Email:</label>
<input type="text" name="email" />
<span class="form_hint">Proper format "name@something.com"</span>
</li>
<li>
<label for="website">Website:</label>
<input type="text" name="website" />
<span class="form_hint">Proper format "http://someaddress.com"</span>
</li>
<li>
<label for="message">Message:</label>
<textarea name="message" cols="40" rows="6" >
</li>
<li>
<button class="submit" type="submit">Submit Form</button>
</li>