-1

I find that the text turns purple with an underline after the link is clicked. Even when I refresh it a few times, it still remains purple with an underline. How can I keep the text from changing?

            <a
              href="https://www.youtube.com/watch?v=n2RNcPRtAiY"
              target="_blank"
            >
              <p class="video-title">
                Talking Tech and AI with Google CEO Sundar Pichai!
              </p>
            </a>
            <p class="video-author">Marques Brownlee</p>
            <p class="video-stats">3.4M views &#183; 6 months ago</p>
          </div>
Lixin Li
  • 45
  • 7
  • Already answered in https://stackoverflow.com/questions/2204634/how-to-disable-automatic-links-coloring-without-selecting-a-color. Your change is due to browser defaults or `user agent stylesheet` – WebDevPassion Jul 19 '22 at 10:12

2 Answers2

1

That is the standard way that browsers indicate that a link is a visited link (e.g. the URL it points to appears in the user's browser history).

Apply CSS to change it. You will probably want to use the :visited pseudo-class.

MDN has an introduction to CSS if you need it.

Quentin
  • 914,110
  • 126
  • 1,211
  • 1,335
0

The easiest way would be to remove the default styles for the "a" tag itself. This will solve your issue