Easy question, is it permissible to have overlapping gaps in html?
Example:
<span id="1">This is <span id="2"> some text </span> some other text </span> ^ ^ End1 End2
Edit:
Now I see that the closing closing tag will be ambiguous, about which it closes, and that the first </span> will close span id = 2, not 1, as I expected.
My problem is that I have a block of text that I am trying to select based on what the mouse is over. This block of text consists of sections, some of which "overlap" with each other. I am trying to use some jQuery and HTML to represent this document, so when I hover over sections, the corresponding one will be highlighted.
So, in my example above, the first interval should end with the first range close tag, and the second range should end with the second range close tag. This is due to the semantics of my document, these are two overlapping segments.
I want it to be when I was pointing to the left, it will stand out only until span id = 1 and the first close, if I am between two "overlapping" spans, it will highlight both of them, and if I'm on the right, it will highlight from span id = 2 until the last close.
However, I am starting to think that this is impossible. Is there a way to highlight text segments in HTML that allow overlapping? Thus, my jQuery script, which stands out when you hover over different intervals, will highlight the correct portions.
Should I alternate div and span? Does it eliminate what I'm closing and let me make the correct selection using jQuery hover script? I'm curious that now more than two segments overlap. Sigh, I'm sorry I can't just explain what I'm closing.
html
Siracuse
source share