Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Attribute name not allowed on element meta at this point

I am having the error multiple times here

<meta name="description" content="Directus Media specialises in websites for small to medium businesses">​

http://validator.w3.org/check?uri=http%3A%2F%2Fcrimsoninformatics.info%2Fdirectus%2F&charset=%28detect+automatically%29&doctype=Inline&group=0&user-agent=W3C_Validator%2F1.3+http%3A%2F%2Fvalidator.w3.org%2Fservices

Also the link attribute error:

I wrote :-

<link rel="stylesheet"  href="css/lib/essentials.css"/>

And it gives me error that link is missing required property.

Please help as i am new to HTML5.

like image 758
Cool Sporty Avatar asked Jan 30 '14 18:01

Cool Sporty


1 Answers

Between two meta tags, the one with name="description" and the one with name="keywords", the page contains the bytes 0xE2 0x80 0x8B (and some whitespace). The page is being interpreted as UTF-8 encoded, but that sequence of bytes is malformed UTF-8 (does not represent any character). Apparently, the validator still interprets it as a data character. This causes the head element to be prematurely closed, and the rest is… well, not history, but a consequence of this confusion. The second of the meta tags is taken as being in the body part, and there special rules apply, making the tag invalid.

The real problem, anyway, is the presence of the bogus bytes 0xE2 0x80 0x8B. When they are removed, the page validates.

It is impossible to know, from outside, what produces those bytes. But they look suspiciously like a character encoding error, possibly causes by incorrectly performed UTF-8 encoding of some data that was already UTF-8 encoded, or something like that.

This was a tricky issue. I had to use Rex Swain’s HTTP Viewer to check the raw data of the offending page.

like image 115
Jukka K. Korpela Avatar answered Oct 22 '22 03:10

Jukka K. Korpela