Page 1 of 1

Problem with hash tags

PostPosted: Sun Feb 26, 2012 7:57 pm
by blanchec

Hi,

I'm a new member who has recently - after a number of problems with IE - decided to use Google Chrome as default browser. I'm delighted with the results! :-)

But - there's always a but! - I'm a family historian and I write my web pages in simple html code. Now that I have finally (!) figured out how to view the source in notepad, I'm finding that the hash tags don't work. (I hope I'm using the correct term: I'm talking about the <a name="#tag"> etc code). They don't work when linking on the same page, or on a link to another page.

Is there a simple solution - please?

Blanche Charles (New Zealand)

Re: Problem with hash tags

PostPosted: Mon Mar 05, 2012 5:13 pm
by Andrew
Hi Blanche,

The name attribute is obsolete. Consider putting an id attribute on the nearest container instead.

You can change your HTML code as below:
Code: Select all
<div id="tag"></div>
<p id="tag"></p>
...


For example, you can visit this page: http://md5calculator.chromefans.org/#dt_area

It will locate to the Download section. Then you can check the html source:
Code: Select all
<div id="dt_area">
<div id="wt_head">Download Free MD5 Hash Calculator</div>
....

Re: Problem with hash tags

PostPosted: Mon Mar 05, 2012 5:21 pm
by Andrew
More information, click here:
http://www.w3.org/wiki/HTML/Elements/a