Google 隐私页面 html 无效 [英] Google privacy page html invalid

查看:25
本文介绍了Google 隐私页面 html 无效的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

查看 Google 隐私页面的 html 源代码,标题是:

Viewing the html source for Googles Privacy Page the header is:

<!DOCTYPE html>
<html lang="en">
  <meta charset="utf-8">
  <title>Google Privacy Center</title>
  <link rel="stylesheet" href="//www.google.com/css/privacy.css">
  <h1><a href="/"><img src="//www.google.com/intl/en/images/logo_sm.gif" alt="Google"></a> Privacy Center</h1>

我注意到此处或页脚中没有 body 标签.另外,没有结尾.

I noticed there is no body tag here or in the footer. Also, no ending </html>.

这是有效的标记吗?

推荐答案

HTML5(这就是他们声明该页面的方式)允许您省略很多内容.例如,body 标签的开始和结束标签都是可选的,结束的 html 标签也是如此(ref).

HTML5 (which is what they're declaring that page as) allows you to omit a lot of stuff. For instance, the body tag's start and end tags are both optional, as is the ending html tag (ref).

验证器 说它是有效的,但验证器的 HTML5 支持也仍处于试验阶段.赞一个

The validator says it's valid, but the validator's HTML5 support is also still experimental. YMMV

这篇关于Google 隐私页面 html 无效的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆