# Including HTML in note fields that is rendered on card

**URL:** <https://forums.ankiweb.net/t/including-html-in-note-fields-that-is-rendered-on-card/30590>\
**Category:** Card Design\
**Created:** [May 25, 2023, 1:09am UTC](https://forums.ankiweb.net/t/including-html-in-note-fields-that-is-rendered-on-card/30590 "2023-05-25T01:09:09Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![jake\_h](https://avatars.discourse-cdn.com/v4/letter/j/df788c/32.png) [@jake\_h](https://forums.ankiweb.net/u/jake_h)\
**Post date:** [May 25, 2023, 1:09am UTC](https://forums.ankiweb.net/t/including-html-in-note-fields-that-is-rendered-on-card/30590/1 "2023-05-25T01:09:09Z")

</div>

Does Anki escape HTML included in note fields?

To me, it seems the answer is yes: e.g., if i create a card field `<b>昨天</b>`, the HTML I see via cmd+shift+X in the fields editing window is `&lt;b&gt;昨天&lt;/b&gt;` .

However, I found a 2019 forum post on sololearn which asks “I am adding what i learn here to anki as I go, but when i put in a code example it displays it as actual code as in   
 displays as a space on the card not the text I want to commit to memory.” This seems to imply the answer is no.

Thanks!

---

<div class="post-metadata">

**Author:** ![dae](https://sea2.discourse-cdn.com/flex002/user_avatar/forums.ankiweb.net/dae/32/65_2.png) [@dae](https://forums.ankiweb.net/u/dae)\
**Post date:** [May 25, 2023, 2:14am UTC](https://forums.ankiweb.net/t/including-html-in-note-fields-that-is-rendered-on-card/30590/2 "2023-05-25T02:14:48Z")

</div>

It’s hard to comment on some random forum post someone made. HTML is escaped, but can be interpreted as-is if an option is set while importing text files.

---

<div class="post-metadata">

**Author:** ![jake\_h](https://avatars.discourse-cdn.com/v4/letter/j/df788c/32.png) [@jake\_h](https://forums.ankiweb.net/u/jake_h)\
**Post date:** [May 25, 2023, 5:26am UTC](https://forums.ankiweb.net/t/including-html-in-note-fields-that-is-rendered-on-card/30590/3 "2023-05-25T05:26:37Z")

</div>

Yes, sorry, I am not allowed to link to the post in question according to forum guidelines.

My use case entails automating note creation via AnkiConnect and I would like to create a bullet list within a certain field via this medium— is there a specific way this is generally done? It seems like all the raw formatting I try to apply (newlines and the like) gets stripped away by `addNote()`, and that HTML formatting will be escaped by Anki.

---

<div class="post-metadata">

**Author:** ![dae](https://sea2.discourse-cdn.com/flex002/user_avatar/forums.ankiweb.net/dae/32/65_2.png) [@dae](https://forums.ankiweb.net/u/dae)\
**Post date:** [May 26, 2023, 8:12am UTC](https://forums.ankiweb.net/t/including-html-in-note-fields-that-is-rendered-on-card/30590/4 "2023-05-26T08:12:08Z")

</div>

Sorry, I don’t have experience with AnkiConnect. If it only happens when using that add-on, please contact the add-on author for assistance.

---

<div class="post-metadata">

**Author:** ![dae](https://sea2.discourse-cdn.com/flex002/user_avatar/forums.ankiweb.net/dae/32/65_2.png) [@dae](https://forums.ankiweb.net/u/dae)\
**Post date:** [May 29, 2023, 6:39am UTC](https://forums.ankiweb.net/t/including-html-in-note-fields-that-is-rendered-on-card/30590/5 "2023-05-29T06:39:28Z")

</div>

2 posts were merged into an existing topic: [Anki info distorted in AIs](https://forums.ankiweb.net/t/anki-info-distorted-in-ais/30688/3)

---

<div class="post-metadata">

**Author:** ![krstoevan](https://avatars.discourse-cdn.com/v4/letter/k/3ec8ea/32.png) [@krstoevan](https://forums.ankiweb.net/u/krstoevan)\
**Post date:** [May 29, 2023, 7:25am UTC](https://forums.ankiweb.net/t/including-html-in-note-fields-that-is-rendered-on-card/30590/6 "2023-05-29T07:25:30Z")

</div>

hi,  
i made a mindmanager to ankiconnect macro for mindmanager.  
case 1: mindmanager vba → python → ankiconnect.  
i failed,  
some characters like empty space, , etc make this a no go.  
case 2: completely use VBA, gpt4 helped to make space into %20, \ into \.  
then it worked.

depending on your text, you may need to try/test out any characters that cant fit into this.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex002/uploads/anki2/original/1X/8f1279ababc5879d54e4838989f606cfe55af8c7.jpeg) [@system](https://forums.ankiweb.net/u/system)\
**Post date:** [June 28, 2023, 7:26am UTC](https://forums.ankiweb.net/t/including-html-in-note-fields-that-is-rendered-on-card/30590/7 "2023-06-28T07:26:05Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
