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

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

Jump to Post

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 1.20 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.