html - XHTML Strict 1.0 - 目标 ="_blank"无效?

标签 html validation target w3c xhtml-1.0-strict

我刚刚使用 w3c 验证程序服务验证了我的实际 XHTML Strict 1.0 文档。它说,

<ul id="socialnetwork">
            <li><a href="http://www.twitter.com" target="_blank"></a></li>
            <li><a href="http://www.flickr.com" target="_blank"></a></li>
            <li><a href="http://www.xing.com" target="_blank"></a></li>
            <li><a href="http://www.rss.com" target="_blank"></a></li>
</ul>

target="_blank"无效..但我需要目标为空,以便在浏览器中打开一个新选项卡,这样用户就不会离开主页。

我能做什么?为什么这无效?

最佳答案

您可能想查看 W3 常见问题解答:http://www.w3.org/MarkUp/2004/xhtml-faq#target

Why was the target attribute removed from XHTML 1.1?

It wasn't. XHTML 1.0 comes in three versions: strict, transitional, and frameset. All three of these were deliberately kept as close as possible to HTML 4.01 as XML would allow. XHTML 1.1 is an updated version of XHTML 1.0 strict, and no version of HTML strict has ever included the target attribute. The other two versions, transitional and frameset, were not updated, because there was nothing to update. If you want to use the target attribute, use XHTML 1.0 transitional.

关于html - XHTML Strict 1.0 - 目标 ="_blank"无效?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4666523/

相关文章:

html - CSS 溢出滚动条裁剪背景颜色

JavaScript onload() 函数

css - 通过 css 定位背景

c++ - 扩展 Visual Studio C++ 构建过程

javascript - 修复了带有动态变化的菜单按钮的垂直导航菜单

css - 垂直居中跨度( Bootstrap 标签)与其他元素一起

android - 密码验证应接受特殊字符、数字、字符,但不接受空格

c# - 如何验证分类广告?

javascript - 多个文件上传验证 - 限制选择同一文件两次

c - GNU 使 : different dependencies of several binaries in the same target?