javascript - W3C validator : Element head is missing a required instance of child element title - Stack Overflow

Hi am validating my HTML code through w3c validator. But it is showing an error Element head is missing

Hi am validating my HTML code through w3c validator. But it is showing an error Element head is missing a required instance of child element title.

URL is /

while title is Present in the head of the html body

<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>      Best all-inclusive resorts for romance- NowU
</title>
<link rel="stylesheet" href="/static/css/styles.css">
<link rel="stylesheet" href="/static/css/video-js.css">
<link rel="stylesheet" href="/static/css/font-awesome.min.css">
<link rel="stylesheet" media="print" href="/static/css/print.css">
  <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
  <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
  <!--[if lt IE 9]>
 <script src=".7.0/html5shiv.js">
 </script>
 <script src=".js/1.4.2/respond.min.js">
 </script>
 <![endif]-->
 <link rel="stylesheet" href="/static/css/socialsharing.css">
 <link rel="canonical" href="/article/travel/best-all-inclusive-resorts-for-romance/3189783/">




  <meta name="description" content="Whether for a honeymoon, anniversary, or private escape, these resorts fit the romantic bill.">
  <meta property="og:description" content="Whether for a honeymoon, anniversary, or private escape, these resorts fit the romantic bill.">


  <meta name="twitter:card" value="Whether for a honeymoon, anniversary, or private escape, these resorts fit the romantic bill.">



  <meta property="og:title" content="Best all-inclusive resorts for romance">


  <meta property="og:type" content="article">


  <meta property="og:url" content="/">


  <meta property="og:image" content=".jpg"></head>

Hi am validating my HTML code through w3c validator. But it is showing an error Element head is missing a required instance of child element title.

URL is http://nitansh.fwd.wf/article/travel/best-all-inclusive-resorts-for-romance/3189783/

while title is Present in the head of the html body

<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>      Best all-inclusive resorts for romance- NowU
</title>
<link rel="stylesheet" href="/static/css/styles.css">
<link rel="stylesheet" href="/static/css/video-js.css">
<link rel="stylesheet" href="/static/css/font-awesome.min.css">
<link rel="stylesheet" media="print" href="/static/css/print.css">
  <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
  <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
  <!--[if lt IE 9]>
 <script src="https://oss.maxcdn./libs/html5shiv/3.7.0/html5shiv.js">
 </script>
 <script src="https://oss.maxcdn./libs/respond.js/1.4.2/respond.min.js">
 </script>
 <![endif]-->
 <link rel="stylesheet" href="/static/css/socialsharing.css">
 <link rel="canonical" href="/article/travel/best-all-inclusive-resorts-for-romance/3189783/">




  <meta name="description" content="Whether for a honeymoon, anniversary, or private escape, these resorts fit the romantic bill.">
  <meta property="og:description" content="Whether for a honeymoon, anniversary, or private escape, these resorts fit the romantic bill.">


  <meta name="twitter:card" value="Whether for a honeymoon, anniversary, or private escape, these resorts fit the romantic bill.">



  <meta property="og:title" content="Best all-inclusive resorts for romance">


  <meta property="og:type" content="article">


  <meta property="og:url" content="http://nitansh.fwd.wf/article/travel/best-all-inclusive-resorts-for-romance/3189783/">


  <meta property="og:image" content="http://www.gannett-cdn./media/USATODAY/USATODAY/2013/06/18/1371593281000-Earlyne-s-luggage-1306181810_3_4.jpg"></head>
Share Improve this question edited Apr 30, 2014 at 12:30 nitansh bareja asked Apr 30, 2014 at 12:21 nitansh barejanitansh bareja 3023 gold badges5 silver badges17 bronze badges 7
  • 1 "while title is Present in the head" Are you sure? – BoltClock Commented Apr 30, 2014 at 12:22
  • yes you can check by inspecting element. – nitansh bareja Commented Apr 30, 2014 at 12:23
  • Post the head section of your code – haxtbh Commented Apr 30, 2014 at 12:23
  • There is, definitely, a title element in the head of the document. – David Thomas Commented Apr 30, 2014 at 12:24
  • 1 @David Thomas: No - apparently a redirect is occurring. I'm guessing the OP is trying to validate the source of the redirect, where the title element is most definitely missing. – BoltClock Commented Apr 30, 2014 at 12:25
 |  Show 2 more ments

2 Answers 2

Reset to default 2

Just for your information this is what the validator is seeing in your code

<head>
<script src="//cdn.optimizely./js/687271175.js"></script>
<script src="http://code.jquery./jquery-1.11.0.min.js"></script>
<meta charset="UTF-8">
</head>

You can see this by turning on the show source option in the validator. Maybe it's time to look into progressive enhancement?

Same solution as in your other question:

You are injecting the title element with JavaScript, but the W3C validator does not execute JavaScript.

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745327825a4622740.html

相关推荐

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信