Re: target is invalid attribute for a

On 23 Jan 2018, at 16:40, Ed Brandon wrote:

> From what I can tell, the target="_blank" is always valid.  It need 
> not be specific to either HTML 4 or 5, nor to the variants strict, 
> transitional or frameset.  It’s been around a while, and never 
> changed.

It is not.

It is valid in HTML 5.x, HTML 4.x Transitional, and HTML 4.x Frameset.

It is not valid in HTML 4.x Strict, HTML 3.2, or earlier versions of 
HTML.

> I tend to test snippets – equivalent to the contents of a page – 
> because I’m using the Drupal CMS that was set up by a third party.  
> It generates lots of correctly-identified errors.  I live with that 
> simply because I know it won’t be fixed.  But I like to ensure that 
> my contributions are OK.
>
> So I add snippets directly.  The default options show as:

… detecting the Doctype automatically.

So what snippet are you putting in there? What Doctype does it have? 
What does the validator report it is checking the document as? (E.g. 
“Errors found while checking this document as HTML 4.01 
Transitional!”).

> I leave this alone.  I do believe it should not give me an error 
> message.

It is *highly* unlikely that you’ve found a bug here. You don’t 
appear to be triggering the new HTML 5 parser, and the target attribute 
is common enough that I’d expect any false positives to have been 
noticed before.

Received on Tuesday, 23 January 2018 16:47:13 UTC