Iframe usage within anki cards

I came across this post yesterday and it blew my mind.
Specifically, this part: "You can put this deck on steroids by inserting the following snippet at the bottom of the answer HTML for each template (“Cards…” in editor or browser). Your answers will show the corresponding Wikipedia article for each answer. This really helped me find connections and learn faster.

– replace {{Country}} with {{Capital}} for Country -> Capital card type
– if your deck is in another language, swap the “en” in the wikipedia link for your language (e.g. “de” for german)"

It works like a charm and I felt like it opened up a whole world of possibilities coz now, I can make a deck directly with keywords, linking them up to suitable webpages so that I don’t have to make notes myself. However, it does not seem to be working with any other website. I am not great at HTML, so I might be missing something here.

Can someone please tell me how I can make this work for any website?


the websites should have a specific pattern for their pages for this method to work
on wikipedia for example:

all of them have the same template.
so if you have a field that holds the country name, you can put https://en.wikipedia.org/wiki/{{FIELD NAME}} in your card template and the country name at the end of the link will change based on the name that is stored in FIELD NAME

so if you wanna do the same thing with other websites, you should check if the pages on the website have some sort of pattern or not.

compare http://website.example/{{Country}} and http://website.example/{{Country}}/{{Info}} in front template with the text that it generates on preview.

Hey mate! Thanks for the reply.
Yes, these addresses follow a pattern, but shouldn’t it open any web page since it is a browser window?
Like, if I place a web address in the a field and use curly brackets should it not open that web page?

I occasionally don’t find wiki articles on the topics which I am interested in. Would be nice to be able to add a specific website when needed.


you want to add a link to a field and you want it to be clickable?
if that’s what you want there are 2 ways of doing it

  1. you can dedicate fields to links. each field can be used for one link
  2. you can learn using html editor and add hypertext tags there. in this way you can add multiple links to a field.

here’s how you do them:

  1. create an extra field on your note type -> press “Fields…” on add card dialog and press “Add” and choose a name for your field
  2. go to card template editor -> press “Cards…” on add card dialog
  3. add this to your card template -> Annotation 2020-06-19 083908
    this makes the link in Field name clickable

the other way to make them clickable is to open html editor (press “Ctrl+Shift+X” on add card dialog) and manually add hypertext tags to your cards

1 Like

Thanks again for the prompt reply!
I am aware about adding links actually. I wanted there to be a window within anki which displays the webpage directly.
Here’s an example.

I know it might seem like it is not a big deal, that clicking the link has the same effect, and so I should just use it, and I agree, I might end up doing that if I cannot figure this out, but knowing that it works makes me want to use this way. It is much better, that’s why.


1 Like

i misunderstood you. thought you just wanted the links to be clickable so you could open them.
Here’s what you’re looking for tho