Sorry guys, I'd like to just confirm this, is it correct to have a p tag inside a form tag? Something like

<form action="demo_form.asp">
<p>This is a test.</p>
First name: <input type="text" name="FirstName" value="Mickey"><br>
Last name: <input type="text" name="LastName" value="Mouse"><br>
<input type="submit" value="Submit">
</form>

thanks

Recommended Answers

All 4 Replies

Absolutely nothing wrong with this, the form tag shall only look for 'inputs' and shall ignore everything else.

Shouldn't be a problem. You can always use an online validated when you are unsure if you are using elements and attributes correctly.

http://validator.w3.org/

Hi,

Absolutely no wrong in this. U can darely use P tag inside form :-)

thanks guys

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.