Re: validity of <a name>

Leif Halvard Silli, Fri, 18 Mar 2011 19:05:41 +0100:
> Henri Sivonen, Fri, 18 Mar 2011 18:52:33 +0200:
>> On Fri, 2011-03-18 at 16:47 +0100, Daniel Glazman wrote:
> 
>>> 4. <a name> is now invalid in html5, making it impossible to copy
>>>     the trivial <p>foo<a name="a"></a>bar</p> from html4 to html5
>>>     without raising a validity issue ; turning that <a name> into
>>>     a <span id> is not doable without prompting the user, something
>>>     that should not happen on a copy/paste action ; furthermore, that
>>>     could break stylesheets.
>> 
>> What do you do when <font> is copied from HTML 4 into HTML5 in
>> BlueGriffon?
> 
> Daniel: why don't you convert <a name=*> to <a id=*> ? It should work 
> the same.

The only advantage @name has over @id is that in HTMl4, then @name can 
- validly - take non-ASCII values.

In XHTML 1.0 documents, the @id is defined to be of XML ID type, which 
means that it can take everything that XML permits for attributes of 
that kind - which means that it can take almost the same as @name in 
HTML4 and @id in HTML5 can take.
-- 
leif halvard silli

Received on Friday, 18 March 2011 18:35:19 UTC