Internal Links: Anchors Away
Posted on 2007-12-11 (Updated on 2019-02-16)
I discovered that my original technique of using anchor tags is far out of date. Modern technology has given us a much simpler, much slimmer, much snazzier way to link to your content, and it's seen cross-browser support for years.
Recently, I was re-visiting an older page that used the old <a name="myName"></a>
syntax, and decided to update it. However, the internal link was nested inside an H3 tag, so I tried this:
<h3 id="myName">Header Text</h3>
It worked like a charm. I quickly loaded up the oldest browsers I could find, and found that this syntax has been supported in IE since version 5.0 at least, and the only browser I had installed that didn't support linking directly without an anchor was Netscape 4.8.
So, if you're worried about your burgeoning Netscape 4.8 user base, I suggest you stick to the old anchor method. Otherwise, a good ID will do ya.
Tags: html