Question:

What is the HTML Script Code to strike out a visited link?

by  |  earlier

0 LIKES UnLike

To Silent: No, I mean when you have visited a website, the link gets striked out so you can tell the difference between the link that you have visited, and the link that you haven't yet.

 Tags:

   Report

2 ANSWERS


  1. I'm assuming you mean you're looking for CSS. Try this:

    a:visited {

    text-decoration: line-through;

    }

    Edit:

    Yeah, sorry, I somehow skipped over the word "visited" in your question the first time. It's been a long day.


  2. CSS is the way to go on this one.  Just make sure the <style> tags are in the header, or in an included CSS file.

    <html>

    <head>

    <title>Have you visited this link yet?</title>

    <style type="text/css">

    A:link {text-decoration: none}

    A:visited {text-decoration: line-through}

    A:active {text-decoration: none}

    A:hover {text-decoration: underline; color: red;}

    </style>

    </head>

    <body>

    <a href="http://www.yahoo.com">Yahoo!</a>

    </body>

    </html>

Question Stats

Latest activity: earlier.
This question has 2 answers.

BECOME A GUIDE

Share your knowledge and help people by answering questions.