问题标签 [xhtml-1.1]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
php - 如何让 WordPress language_attributes 函数返回有效的 XHTML 1.1?
我有一个包含以下元素的 WordPress 模板:
这将返回:
不幸的是,“lang”属性在 XHTML 1.1 中是无效的——并且客户端想要这种级别的验证。
WordPress 的 general-template.php 文件包含以下代码:
$doctype
是传递给它的参数(在本例中为“xhtml”)。应该get_option
返回“text/html”以外的值吗?如果是这样,我应该在 WordPress 中设置什么来实现这一点 - 如果有的话?
我也尝试使用 preg_replace 取出“lang”属性,但这似乎无法匹配文本。如果我手动输入文本,它匹配!可能是 language_attributes 返回的字符串的编码问题?
xhtml - 为什么我的文档没有验证为 XHTML 1.1 STRICT?
虽然 target="_blank" 已被弃用,但为什么 W3C 验证器没有给出关于此的错误?您可以在验证器中粘贴并检查此代码:
编辑:
这是否意味着 XHTML 1.1 支持 target=”_blank” 而 XHTML 1.0 strict 不支持?还是 W3C 验证器中的错误?
xhtml - Should we use a frameset doctype if we use iframes?
Why are iframes declared as a non-standard elements? It is useful.
Is it allowed in XHTML 1.1, or should we use a frameset doctype if we use iframes?
xhtml - 脚本标签的 XHTML 1.1 和 xml:space 属性
在 XHTML 1.0 中,在标签中使用 xml:space 属性是有效的,但在 XHTML 1.1 中它是无效的(使用相同的标记)。
我在文档中找不到它...有人可以确认吗?为什么它被删除了?是不是被别的东西代替了?
验证样本:
internet-explorer - IE8 无法完整显示页面
当我打开我的项目时,只显示背景和未找到图像项,而页面是 100% xhtml 1.1 严格的。开发人员工具显示 IE 在 SVG 徽标后停止渲染... Firefox 正常工作。该死的你!
html - 属性“lang”存在,但不能用于该元素。?W3C 验证错误
我正在使用这个 dtd
错误是因为这个属性?
我应该从 DTD 中删除它吗?
html - XHTML 1.1 比其他文档类型更好吗?
这在此页面上说明http://www.veiled-chameleon.com/xhtml11.html
XHTML 1.1 允许轻松创建不同的显示格式,例如用于打印的页面格式、用于无线设备和 PDA 以及基于电视的浏览器,只需为新文档编写新的 CSS(级联样式表)即可。
更新:
这在http://www.w3schools.com/w3c/w3c_xhtml.asp上有说明
小型设备无法支持所有 XHTML 功能,因此 XHTML 1.1 将规范划分为功能有限的模块。
小型浏览器可以通过仅支持选定的模块来降低其复杂性
谁能向我解释作者在此声明中所说的内容,这不能通过 XHTML 1.0 stric 或 HTML 4.01 Strict 来完成吗?
cross-browser - Why does the XHTML 1.1 doctype trigger quirks mode?
I'm not using the XML declaration <?xml version="1.0" encoding="UTF-8" ?>
I'm only using this DTD as a first thing in a page? which has no problem rendering in strict mode.
It validated as quirks mode with this site http://vesa.piittinen.name/doctype/
(I can't give the link to the site on which I'm working)
In IE 6 it shows almost standards mode, and in FF it shows full standards mode.
Should I change my doctype to get the same rendering in all browser?
xhtml - 为什么不建议将 target="_blank" 与 XHTML 一起使用?
它在 XHTML 1.1和 WCAG 2.0 指南中有效 没有关于它的使用的任何信息?
我知道它在严格的 XHTML 1.0 中是无效的,但是如果很多人使用其他东西,比如 JavaScript、jQuery、rel 属性、PHP 等。
是否有意义?这意味着人们不想遵循验证规则,他们只想跳过验证。
xhtml - 为什么这不会在 W3C 验证器中产生错误?
不生成验证错误,这是否意味着两者都有效?