0

HI all, I was wondering if it is legal to have a span tag inside a legend, something like this <legend>This is my<span>legend</span></legend>
Can't quite work out whether legend is a block element or inline
thanks

3
Contributors
4
Replies
15
Views
4 Years
Discussion Span
Last Post by Violet_82
0

With regard to being "legal" I assume that you mean conforming to the W3C standards? Having a span element within the legend element should not cause the document to not pass validation.

I assume the reason why you want to use the span tag is for applying certain styles that you just cant do alone with the legend element.

inline/block? I'm pretty sure its an inline element.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.