Formatting hyperlink

Version ⁨2.1.54 (b6a7760c)⁩ Python 3.9.7 Qt 6.3.1 PyQt 6.3.1
Copying an hyperlink from a webbrowser and pasting it into a card, results into blue underlined text which cannot be changed into e.g. red colored text for better visibility on my android smartphone. In the previous version 2.1.53 that worked well.
In the latest version 2.1.54 I’m not able to change the “hyperlink” color, even not when changing the RGB values in Anki HTML editor or in Ankidroid on the smartphone.
Thanks for looking into this matter. I’m using Anki for 8 years now on daily basis and it’s an awesome product.

Maybe this can help? You can edit raw HTML in the HTML editor.

1 Like

Dear Blackbeans,

Thanks for your suggestion. I’m not familiar with HTML editing but I inserted a line of code from your suggestions and it works!

I appreciate you prompt reaction


Actually, that’s not HTML but CSS. You can think of it this way: HTML takes care of the structure of a document, whereas CSS takes care of its style (or its formatting, as you prefer). Thus, the instructions I sent you were CSS. You can embed them in HTML with the style attribute:

<a style="color: red; text-decoration: none;" href="...">my link</a>

Or you can put them on their own. In particular, card templates contain a Styling section where you can put CSS rules, such as

a {
    text-decoration: none;
    color: red;

Which is the same as adding the style attribute to every a tag.

CSS is very powerful, and has a lot of features. Wikipedia’s page can give you a quick insight into these.

1 Like

Thanks a lot for your effort. I greatly appreciate your input. I found a solution that is valuable to me!