gpt4 book ai didi

facebook - 是否可以验证 xmlns :fb (Facebook) attribute?

转载 作者:技术小花猫 更新时间:2023-10-29 11:54:00 26 4
gpt4 key购买 nike

我的网站上有一个 Facebook Like 按钮,因此也有 xmlns:fb <html> 上的属性标签:

<!DOCTYPE html>
<html lang="en" xmlns:fb="http://www.facebook.com/2008/fbml">

但是,当我通过 W3C 验证程序运行我的网站时,我遇到了这些错误:

Line 2, Column 61: Attribute xmlns:fb not allowed here.

Line 2, Column 61: Attribute with the local name xmlns:fb is not serializable as XML 1.0.

Line 222, Column 72: Attribute fb:like:layout is not serializable as XML 1.0.

Line 222, Column 72: Attribute fb:like:layout not allowed on element a at this point.

据我了解,使用 xmlns:fb属性添加 fb到文档命名空间,以便使用任何 <fb:元素有效。不是这样吗?是 HTML5 问题吗?

我的 Twitter 按钮也有类似的验证错误,是否也可以修复这些错误?

Line 223, Column 53: Attribute tw:via is not serializable as XML 1.0.

Line 223, Column 53: Attribute tw:via not allowed on element a at this point.

最佳答案

或者您现在可以使用 prefix mappings .

<!DOCTYPE html>
<html lang="en" prefix="fb: http://www.facebook.com/2008/fbml">

关于facebook - 是否可以验证 xmlns :fb (Facebook) attribute?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8696026/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com