I've a need of span within a form... but it doesn't validate, so I need a better substitute.

So, I've:

[1 text field] [some text] [2 text field] [submit btn]

When I use span for [some text], all is good as it's an inline object everything aligns perfectly. But when I try to use div with display:inline alignment goes crazy.

I don't want to mess with floats. Is there a simple substitute for span inside form?

link|improve this question
Why do you need to replace the span element in the first place? And can you setup a jsfiddle.net of your issue? – RepWhoringPeeHaa Jan 29 at 13:57
span is invalid xhtml. – Sandro Dzneladze Jan 29 at 15:38
feedback

closed as off topic by danlefree Jan 29 at 18:00

Questions on Pro Webmasters - Stack Exchange are expected to generally relate to webmastering, within the scope defined in the faq.

1 Answer

up vote 1 down vote accepted
<label>

is the right tag to put in in a form, if you want to describe what the user should write in the field. It's an inline html element.

link|improve this answer
Nice! thanks... I forgot about it, I was trying to use <legend>, I didin't code long time and I'm forgetting it. – Sandro Dzneladze Jan 29 at 15:40
feedback

Not the answer you're looking for? Browse other questions tagged or ask your own question.