Help - Search - Members - Calendar
Full Version: Anchors work only in IE?
HTMLHelp Forums > Web Authoring > Markup (HTML, XHTML, XML)
Vio
Hello everyone.

I haven't made a webpage in a decade. I'm using HTML-kit now, but that's irrelevant...

Here is an example of what I mean. The links on top of the page are supposed to jump to other section within the page, but I noticed it only works in Internet Explorer. Help. Thank you!
Darin McGrew
You use <a href="#1"> (which is fine) and <a name="#1"> (which should be <a name="1">).

While you're at it, the online validator reports quite a few HTML errors.
Effovex
Actually, 1 isn't a valid name

QUOTE(the specs)
ID and NAME tokens must begin with a letter ([A-Za-z]) and may be followed by any number of letters, digits ([0-9]), hyphens ("-"), underscores ("_"), colons (":"), and periods (".").

http://www.w3.org/TR/html401/types.html#type-cdata
Vio
Thank you, it worked. I also used HTML-tidy in Html-kit, which fixed those errors you mentioned Darin.
pandy
QUOTE(Effovex @ May 10 2007, 01:21 AM) *

Actually, 1 isn't a valid name


Yeah, I have actually seen situations when a name or id starting with a number didn't work as an anchor. Peculiarly enough I think the browser that refused to use it was IE.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2010 Invision Power Services, Inc.