# Cloze deletion with line break issue

**URL:** <https://forums.ankiweb.net/t/cloze-deletion-with-line-break-issue/67345>\
**Category:** Card Design\
**Created:** [November 5, 2025, 9:42pm UTC](https://forums.ankiweb.net/t/cloze-deletion-with-line-break-issue/67345 "2025-11-05T21:42:16Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![jhlee](https://avatars.discourse-cdn.com/v4/letter/j/e8c25b/32.png) [@jhlee](https://forums.ankiweb.net/u/jhlee)\
**Post date:** [November 5, 2025, 9:42pm UTC](https://forums.ankiweb.net/t/cloze-deletion-with-line-break-issue/67345/1 "2025-11-05T21:42:16Z")

</div>

When I use cloze deletion on text with a line break, only the first part becomes colored while the second part stays black. How do I make it so that the entire cloze deletion is ONE color, regardless of line breaks?

For example, I created the following cloze-deleted card:

 ![Screenshot 2025-11-05 at 4.40.44 PM](https://us1.discourse-cdn.com/flex002/uploads/anki2/original/3X/7/0/700a690490a599bccf2192930672da5445a82f4a.png)

The issue is that I made the entire cloze deletion to be RED, but this is how the card turns out (due to line break):

 ![Screenshot 2025-11-05 at 4.41.32 PM](https://us1.discourse-cdn.com/flex002/uploads/anki2/original/3X/1/6/168500020f646ac3597660c620fcc212b2e3a8a7.png)

Here is my current Styling section of the card.

 ![Screenshot 2025-11-05 at 4.41.48 PM](https://us1.discourse-cdn.com/flex002/uploads/anki2/original/3X/4/3/4346d3ee9fb465b26dfa1f3bdef32c0ce6656eeb.png)

How can I resolve this? I tried searching everything. I even found a previous post but there was no solution.

---

<div class="post-metadata">

**Author:** ![Anon\_0000](https://avatars.discourse-cdn.com/v4/letter/a/c67d28/32.png) [@Anon\_0000](https://forums.ankiweb.net/u/Anon_0000)\
**Post date:** [November 5, 2025, 10:50pm UTC](https://forums.ankiweb.net/t/cloze-deletion-with-line-break-issue/67345/2 "2025-11-05T22:50:29Z")

</div>

1. Can you send the html of your field as text inside a codeblock?
2. Can you send the css as text inside a codeblock?

---

<div class="post-metadata">

**Author:** ![Danika\_Dakika](https://sea2.discourse-cdn.com/flex002/user_avatar/forums.ankiweb.net/danika_dakika/32/17815_2.png) [@Danika\_Dakika](https://forums.ankiweb.net/u/Danika_Dakika)\
**Post date:** [November 6, 2025, 1:24am UTC](https://forums.ankiweb.net/t/cloze-deletion-with-line-break-issue/67345/3 "2025-11-06T01:24:46Z")

</div>

Duplicate post: [Reddit - The heart of the internet](https://www.reddit.com/r/Anki/comments/1opfoiu/cloze_deletion_with_line_break/)

---

<div class="post-metadata">

**Author:** ![Eltaurus](https://sea2.discourse-cdn.com/flex002/user_avatar/forums.ankiweb.net/eltaurus/32/10287_2.png) [@Eltaurus](https://forums.ankiweb.net/u/Eltaurus)\
**Post date:** [November 6, 2025, 7:03am UTC](https://forums.ankiweb.net/t/cloze-deletion-with-line-break-issue/67345/4 "2025-11-06T07:03:34Z")

</div>

![image](https://us1.discourse-cdn.com/flex002/uploads/anki2/original/3X/f/e/fea3368b5faf380213c05778073fa948b27ff6fe.png)

Couldn’t reproduce this either. Styling seems to be working just fine regardless of whether the new line is input as a `<br>` or as a `<div>`, so your exact code will be required to figure out the source of the problem.

Also, which Anki version is this on? There was an issue with HTML line breaks at some point, even though this one is not very likely to be connected

---

<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:** [December 6, 2025, 7:03am UTC](https://forums.ankiweb.net/t/cloze-deletion-with-line-break-issue/67345/5 "2025-12-06T07:03:42Z")

</div>

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