Printable Version of Topic

Click here to view this topic in its original format

HTMLHelp Forums _ Markup (HTML, XHTML, XML) _ Question about links

Posted by: Lee Batchelor May 10 2020, 08:42 AM

Hi everyone,

I'm new here and would appreciate some help. Thanks for having me smile.gif.

I designed a website for a friend. It's a genealogy, non-profit website. On one of the pages, I have three names of Canadian soldiers who fought in WWI. Users can click a name and be taken to a second page that describes the soldier's actions and history even further. The CSS sheet for the first page controls the link colors in the traditional fashion - navy for unvisited links, purple for visited.

When a user clicks one name and then returns to the first page, all the linked names on that page are shown as visited. This is normal behavior, I assume because the <a> tag points to the second page in all three cases. Is there a way to isolate how the colors change? For example, if a user clicks on the first soldier's name, all three soldiers' names change to purple. Can the links be designed so that only the clicked name turns purple and the remaining two names stay navy, even though the second page has been opened?

Many thanks!

- Lee

Posted by: Christian J May 10 2020, 09:41 AM

Hello and welcome!

You might link to separate sections of the second page (one for each soldier), as show here: https://htmlhelp.com/faq/html/all.html#named-anchor

Posted by: Lee Batchelor May 10 2020, 09:56 AM

Many thanks for the quick reply, Christian. I shall give that a try and report back.

Posted by: Lee Batchelor May 10 2020, 12:29 PM

Christian, it worked!! You're the best. Thank you,

- Lee

Posted by: Christian J May 10 2020, 02:26 PM

You're welcome!

Powered by Invision Power Board (http://www.invisionboard.com)
© Invision Power Services (http://www.invisionpower.com)