XHTML中是否有标记可以放在正文中的任何位置

编程入门 行业动态 更新时间:2024-10-26 02:35:11
XHTML中是否有标记可以放在正文中的任何位置 - 甚至在TABLE元素中?(Is there a tag in XHTML that you can put anywhere in the body - even inside TABLE elements?)

我希望能够在我的文档中的任何位置放置一个空标记作为jQuery可以解决的标记。 但是,重要的是XHTML仍然有效。

为了给你一些关于我正在做什么的背景知识:我已经比较了特定文档的当前版本和以前版本,并且我在html中放置了差异所在的标记。 然后我打算使用jQuery突出显示父块块级元素,当highlightchanges=true在URL的查询字符串中时。

目前我正在使用<span>标签,但我发现这种事情无法验证:

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

那么我可以在任何地方使用标签吗? Meta标签可能吗?

谢谢你的帮助!

伊恩

编辑:根据codeka的建议,我可能会寻找一个更好的差异引擎,我可能找到了一个适合在XHTML中找到差异的引擎: http : //www.rohland.co.za/index.php/2009/10 / 31 / CSHARP-HTML的Diff-算法/

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

Edit: On the advice of codeka, I may look for a better difference engine and I may have found one that is attuned to finding differences in XHTML: http://www.rohland.co.za/index.php/2009/10/31/csharp-html-diff-algorithm/

最满意答案

您可以使用HTML注释和此插件 (或此 插件 )。

You can use HTML comments and this plugin (or this one).

更多推荐

本文发布于:2023-08-04 00:33:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1405199.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:放在   文中   标记   位置   XHTML

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!