W3C home > Mailing lists > Public > www-validator@w3.org > January 2016

Re: W3C Anchor Tag Attribute Issue

From: Jukka K. Korpela <jkorpela@cs.tut.fi>
Date: Tue, 5 Jan 2016 22:51:28 +0200
To: dominick caacbay <ddm.caacbay@gmail.com>
Cc: www-validator@w3.org
Message-ID: <568C2CD0.5090706@cs.tut.fi>
5.1.2016, 13:59, dominick caacbay wrote:

> Attached are the code for the issue.
> Validated by direct input with the following option settings:
> Doctype: HTML5(Experimental)

Thank you for the clarification. The attached code is a fragment, but it 
is sufficient for demonstrating the problem, when the code
<!doctype html>
is prepended.

The problem is that the document contains SVG code, properly enclosed 
between <svg ...> and </svg> tags, but without namespace prefixes needed 
there. Inside an svg element, an a element needs to have the namespace 
declared for its attributes, see

So instead of

<a href="#" title="Page 1">

you need

<a xlink:href="#" xlink:title="Page 1">


P.S. It is a bit of a mystery to me what happens in the validator when 
it first says that the href attribute is not allowed and then says that 
the href attribute is missing. The validator is of mixed nature, and it 
is not that good at namespaces. But what it apparently means is that the 
href and title attributes are not allowed without a namespace prefix and 
then says that the xlink:href attribute is missing, referring to it 
using its name without the prefix.

Received on Tuesday, 5 January 2016 20:51:59 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 1 March 2016 14:18:14 UTC