Font styling HTLM code tag when importing csv into Anki (macbook 10.15)

pooja_gomes's Avatar

pooja_gomes

14 May, 2020 07:18 PM

Hello,
I'm back on Anki web since it helped me pass an important first IT exam that counts towards a certification.
I'm now learning with Anki in preparation for the 2nd exam. I've been writing Google Sheets Q&A / flashcards and importing the csv file into an Anki deck. Every now and then, when an HTML code tag appears ( either inline or as a snippet), Anki renders the code in Times New Roman, while the ordinary text is in Arial.

Can the code snippet be displayed in Courier 15px rather than Times New Roman 20px?
Please note that the code snippet is not a field of the original CSV file and therefore doesn't map to any Anki field.

Please refer if needed to the Cards formatting that I'm attaching to this question. The only Times font is a customisation for the 'page' field and has no impact IMHO on the code snippets.

  1. Support Staff 1 Posted by Damien Elmes on 14 May, 2020 11:59 PM

    Damien Elmes's Avatar

    you can use 'code { ... }' in the styling section if you wish to apply style to code tags.

  2. 2 Posted by pooja_gomes on 16 May, 2020 01:41 PM

    pooja_gomes's Avatar

    Thank YOU!!
    Worked like a charm.
    You never disappoint.

Comments are closed, but you can start a new discussion.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac