Log In · Register

 
links to other areas within a webpage
nishikigoi
post Jan 10 2009, 08:00 PM
Post #1


Senior Member
***

Group: Member
Posts: 86
Joined: Jul 2005
Member No: 179,570



I am wondering what the exact codes are for making a link that leads to a particular area of the same webpage. For example, they're often seen on FAQ's or at the bottom of lengthy pages.
 
 
Start new topic
Replies
heyo-captain-jac...
post Jan 10 2009, 10:27 PM
Post #2


/人◕‿‿◕人\
*******

Group: Official Member
Posts: 8,283
Joined: Dec 2007
Member No: 602,927



First one is used more often.
 
mipadi
post Jan 11 2009, 03:01 PM
Post #3


Senior Member
******

Group: Administrator
Posts: 2,648
Joined: Apr 2008
Member No: 639,265



QUOTE(9001 @ Jan 10 2009, 10:27 PM) *
First one is used more often.

It is, however, falling into disuse; the "id" attribute is more common as it can be used with anchors, CSS, and JavaScript, and doesn't require the use of an <a> tag to be thrown into the markup. It's probably better to use the "id" method nowadays.
 
nishikigoi
post Jan 17 2009, 12:40 AM
Post #4


Senior Member
***

Group: Member
Posts: 86
Joined: Jul 2005
Member No: 179,570



QUOTE(mipadi @ Jan 11 2009, 12:01 PM) *
It is, however, falling into disuse; the "id" attribute is more common as it can be used with anchors, CSS, and JavaScript, and doesn't require the use of an <a> tag to be thrown into the markup. It's probably better to use the "id" method nowadays.


I tried to make a link using this format, but it doesn't seem to work. If it helps, I am using the code on a geocities domain. I tried having the link both as a href="#title" and a href="http://domain.com/index.html#title," but neither worked. Click here to see what I mean; click on "artwork" (which I used the first way listed) and then on the "home" link.

edit: The link worked when I added the tag as a < p > attribute instead of for the div. The only thing that I could think of is that it conflicted with either the overflow:hidden attribute or the 'class' tag.
 

Posts in this topic


Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members: