I entered some HTML scripts into VS 2012 Express and observed the following: An error message(line) that says: Validation(XHTML5): element 'li' cannot be nested inside element 'form'
Here is my code:
<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>
I have fixed it:
1.The textarea tag was not closed:
<textarea name="message" cols="40" rows="6" >
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.