Bad start tag in img in head error

MMR picture MMR · Jul 25, 2016 · Viewed 8.8k times · Source

I am trying to validate my markup,following is my html code.When i validate it,says the error

Error: Bad start tag in img in head.

These are the tags where i use to get errors

<noscript>
  <img height="1" width="1" class="displaynone" src="https://www.facebook.com/tr?id=1007528252627508&ev=PageView&noscript=1">
</noscript>

I think the error is tag should not contain any tag except , , and elements but i am not sure can anyone find what the exact issue?

Answer

Pirate picture Pirate · Jul 25, 2016

The <head> element is a container for metadata and is placed between the <html> tag and the <body> tag like what style you will add to your html page what script will be running. You can't add <img> tag in head. Doesn't matter it is <noscript>. Remove your <img> tag from <head> and add it to body tag.

<body>
<img height="1" width="1" class="displaynone" src="https://www.facebook.com/tr?id=1007528252627508&ev=PageView&noscript=1">
</body>

Hope it will help.