Is there a tag in XHTML that you can put anywhere in the body - even inside TABLE elements?

Posted by Iain Fraser on Stack Overflow See other posts from Stack Overflow or by Iain Fraser
Published on 2010-05-13T01:04:24Z Indexed on 2010/05/13 1:14 UTC
Read the original article Hit count: 351

Filed under:
|
|
|
|

I would like to be able to place an empty tag anywhere in my document as a marker that can be addressed by jQuery. However, it is important that the XHTML still validates.

To give you a bit of background as to what I'm doing: I've compared the current and previous versions of a particular document and I'm placing markers in the html where the differences are. I'm then intending to use jQuery to highlight the parent block-level elements when highlightchanges=true is in the URL's query string.

At the moment I'm using <span> tags but it occurred to me that this sort of thing wouldn't validate:

<table>
    <tr>
        <td>Old row</td>
    </tr>
    <span class="diff"></span><tr>
        <td>Just added</td>
    </tr>
</table>

So is there a tag I can use anywhere? Meta tag maybe?

Thanks for your help!

Iain

© Stack Overflow or respective owner

Related posts about html

Related posts about XHTML