Is it wrong to use paragraph tags for html for inputs?

html

Solution

Semantically, no, it is not correct. Your form inputs are not paragraphs in any sense of the word.

If you're a CSS expert, try using `<ol>` and `<li>` tags and restyling them to look how you like, since your form fields are an ordered list of items. See A List Apart's article on Prettier Accessible Forms for an example of the HTML and CSS necessary for this format.

Problem

So far I mostly put labels and inputs inside a dedicated paragraph tag : ``` <p> <label for="myInput">Blah</label> <input type="text" ... /> </p> ``` But this tag is made for text paragraph. Is is semantically right to use it this way ? Should a div be used ?

Original source