E-mail List Archives
Thread: How Do I Display The Word Visited On A Link
Number of posts in this thread: 8 (In chronological order)
From: marvin hunkin
Date: Wed, Apr 12 2006 12:00AM
Subject: How Do I Display The Word Visited On A Link
No previous message | Next message →
Hi.
what is the html code to show the word visited on the link, say for example
i want the link home to say visited.
how do i do this in html?
cheers Marvin.
From: Tim Beadle
Date: Wed, Apr 12 2006 1:30AM
Subject: Re: How Do I Display The Word Visited On A Link
← Previous message | Next message →
On 12/04/06, marvin hunkin < = EMAIL ADDRESS REMOVED = > wrote:
> what is the html code to show the word visited on the link, say for example
> i want the link home to say visited.
> how do i do this in html?
If you're suggesting what I think you're suggesting (explicitly
labelling visited links as "visited"), then you need the following
CSS, which won't work in IE6 and below (not sure about IE7 - I still
haven't seen a definitive answer about Seven's support for generated
content.
Anyway:
a:visited:after {
content: " (visited)";
color: #090;
}
Change (or remove) color as required.
HTH,
Tim
From: Kynn Bartlett
Date: Wed, Apr 12 2006 1:40AM
Subject: Re: How Do I Display The Word Visited On A Link
← Previous message | Next message →
On 4/12/06, Tim Beadle < = EMAIL ADDRESS REMOVED = > wrote:
> On 12/04/06, marvin hunkin < = EMAIL ADDRESS REMOVED = > wrote:
> > what is the html code to show the word visited on the link, say for example
> > i want the link home to say visited.
> > how do i do this in html?
>
> If you're suggesting what I think you're suggesting (explicitly
> labelling visited links as "visited"), then you need the following
> CSS [content generation]
Alternately, something like this:
<a href="url">link text<span class="vnote">visited</span></a>
And these CSS rules:
a:link .vnote { display: none; }
a:visited .vnote { display: inline; }
This should work with most assistive technologies and all modern
browsers that support CSS. It won't work for lynx, though.
--Kynn
--
Kynn Bartlett < = EMAIL ADDRESS REMOVED = >
Writer, Web Developer, Photographer, Game Designer
Tucson, Arizona
http://kynn.com
From: Tim Beadle
Date: Wed, Apr 12 2006 1:50AM
Subject: Re: How Do I Display The Word Visited On A Link
← Previous message | Next message →
On 12/04/06, Kynn Bartlett < = EMAIL ADDRESS REMOVED = > wrote:
> Alternately, something like this:
>
> <a href="url">link text<span class="vnote">visited</span></a>
>
> And these CSS rules:
>
> a:link .vnote { display: none; }
> a:visited .vnote { display: inline; }
>
> This should work with most assistive technologies and all modern
> browsers that support CSS. It won't work for lynx, though.
D'oh! Why didn't I think of that...? That's a nice bit of lateral
thinking, Kynn. Sometime's one can get too bogged down in the specs to
see the more-widely-supported solution...
Regards,
Tim
From: Christian Heilmann
Date: Wed, Apr 12 2006 2:30AM
Subject: Re: How Do I Display The Word Visited On A Link
← Previous message | Next message →
> Alternately, something like this:
> >
> > <a href="url">link text<span class="vnote">visited</span></a>
> >
> > And these CSS rules:
> >
> > a:link .vnote { display: none; }
> > a:visited .vnote { display: inline; }
> >
> > This should work with most assistive technologies and all modern
> > browsers that support CSS. It won't work for lynx, though.
>
> D'oh! Why didn't I think of that...? That's a nice bit of lateral
> thinking, Kynn. Sometime's one can get too bogged down in the specs to
> see the more-widely-supported solution...
I don't know. The CSS solution only _generates_ the text when the link
_really_ is visited, this version applies it to any link and then
relies on the screen reader not to read out elements with
display:none. While the CSS version is not supported by older browsers
it _is_ the more appropriate solution, and the other one is a hack
mixing structure and content with presentation. Furthermore, the
latter version requires maintenance both in every page and in the CSS,
the former only means you need the style sheet.
--
Chris Heilmann
Blog: http://www.wait-till-i.com
Writing: http://icant.co.uk/
Binaries: http://www.onlinetools.org/
From: Andrew Kirkpatrick
Date: Wed, Apr 12 2006 6:00AM
Subject: RE: How Do I Display The Word Visited On A Link
← Previous message | Next message →
Marvin,
Are you asking about how to get screen readers to voice "visited" on
visited links? If so, you don't need to do anything - this
functionality is provided by the assistive technology. I'd suggest
against adding "visited" to the anchor (in a span or via CSS) unless you
can be sure that screen readers will not voice it. It wouldn't be a
significant barrier to have to hear "home visited visited link", but it
would get old fast.
AWK
>
From: smithj7
Date: Wed, Apr 12 2006 5:40PM
Subject: RE: How Do I Display The Word Visited On A Link
← Previous message | Next message →
Kool! I'm still learning the power of CSS.
From: Peter Weil
Date: Wed, Apr 12 2006 7:30PM
Subject: Re: How Do I Display The Word Visited On A Link
← Previous message | No next message
MS has announced that the latest beta build of IE7 is "rendering-
behavior complete". Whatever CSS support it has now is what the
release version will have -- and that does not include generated
content. :-(
On the bright side, it does include lots of bug fixes and support for
plenty of other important CSS stuff that other browsers have
supported for quite some time now.
Peter
On Apr 12, 2006, at 2:25 AM, Tim Beadle wrote:
> If you're suggesting what I think you're suggesting (explicitly
> labelling visited links as "visited"), then you need the following
> CSS, which won't work in IE6 and below (not sure about IE7 - I still
> haven't seen a definitive answer about Seven's support for generated
> content.