Coder Perfect

Is it possible to have a span> within a span>?


Here’s how it goes: To add a Flash object to my page, I’m using SWFObject. My attention span is being devoured by the embedding. As a result, I’ve lost all of my CSS for it. I was considering shifting all of the CSS to the parent so that I don’t lose my CSS styles when the Flash player loads.

I have tried using a span within a span, but I don’t think it’s working. Is there a reason for this? I don’t understand why you could have div within a div but not a span within a span.

Does it have anything to do with the fact that the spans are parallel?

Asked by Roozbeh15

Solution #1

According to the HTML4 specification,

Because span is an inline element, putting span inside span is OK. A similar topic is whether span> tags can contain any type of tag. This clarifies the situation completely.

Although the HTML5 specification (including the most recent draft of HTML 5.3 dated November 16, 2017) changes terminology, putting a span inside another span is still fully legal.

Answered by PaweĊ‚ Bulwan

Solution #2

Yes. A span within a span is possible. Something else is causing your issue.

Answered by bookcasey

Post is based on