Msg#: 4214105 posted 4:33 am on Oct 9, 2010 (gmt 0)
If I use named anchors to jump around the single page, and I have few of them on the top like:
how would you use the named anchor code?
<a name="general"></a> <h3>General</h3>
The first one is bit confusing for me as it renders like a link while it does nothing when you click on it. I think that could confuse the user. On other side I see it used in HTML examples and wonder about right usage.
Msg#: 4214105 posted 11:10 am on Oct 9, 2010 (gmt 0)
Hi smallcompany, Is there a reason you can't use: <h3 name="general">General</h3> Or better, as name has been deprecated in favour of id: <h3 id="general">General</h3> If you must support name, then a lot of coders use: <h3 name="general" id="general">General</h3>
That said, if you have no reason to support name, I'm with encyclo on just using an id on your header - it's valid and works.
However, that still leaves the usability problem with user agents that will not change focus. Rather than loading up the code with dummy links as in the examples you've referred to (and the ones at sitepoint), I'd suggest using tabindex - it is designed to address this exact issue.
@encyclo Thanks for causing me re-think my initial post
Msg#: 4214105 posted 7:37 pm on Oct 12, 2010 (gmt 0)
I wonder why Dreamweaver CS3 does not recognize the ecyclo's suggested way. I see a sole ID right in H tag (or any tag) works fine when I test it in FF or IE8. Yet, not seeing it in design view while developing may pose a problem if the site is more then simple and with lot of pages.
tabindex unfortunately does not work with the mouse.