Problem with hash tags

Google Chrome technology news, views and conversation

Problem with hash tags

Postby blanchec on Sun Feb 26, 2012 7:57 pm

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)
blanchec
 
Posts: 1
Joined: Sun Feb 26, 2012 5:10 pm

Re: Problem with hash tags

Postby Andrew on Mon Mar 05, 2012 5:13 pm

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>
....
User avatar
Andrew
Site Admin
 
Posts: 224
Joined: Sat Sep 13, 2008 7:20 pm

Re: Problem with hash tags

Postby Andrew on Mon Mar 05, 2012 5:21 pm

More information, click here:
http://www.w3.org/wiki/HTML/Elements/a
User avatar
Andrew
Site Admin
 
Posts: 224
Joined: Sat Sep 13, 2008 7:20 pm


Return to Google Chrome News & Talk

Who is online

Users browsing this forum: No registered users and 1 guest

cron