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

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.

cool, thanks for that. Yes it is to apply some style

fab thanks

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.