# My spoiler tags are occasionally not working. What am I doing wrong?

In this answer my spoiler tags were not working, as the ! character is ignored and displayed, as if it was quoted text. How do I get a workaround of this?

## 2 Answers

I have fixed it for you.

# This is HTML, and you can learn it here

Spoiler tags don't work when you try and have paragraphs

For instance:

!This spoiler tag doesn't work

Because I have written:

>!This spoiler tag
doesn't work


And the new line causes an error

# If you want to add a new line then add

<br>

which means line break.

So now

This spoiler tag
works :P

Because I wrote

>!This spoiler tag<br>works :P


Alternatively you can write

>!This spoiler tag<br>
>!works :P


and you still get

A spoiler tag
that works :P

• Thanks for the heads up. I was struggling with this in more than one of my posts. Sep 17 '16 at 15:23
• @Matsmath, added a place where you can learn about it Sep 17 '16 at 15:24
• (+1) for :P :P
– user14478
Sep 17 '16 at 15:30

You has a paragraph break in the middle of your spoilertag, which caused it not to work properly. @BeastlyGerbil has now fixed this.

For future reference, paragraph breaks don't work very well with spoilertags. You need to include a double space at the end of every line, including the black line between paragraphs. Doing this:

>! stuff

>! more stuff

gives this output:

! stuff

! more stuff

So you have to do this:

>! stuff
>!
>! more stuff

to get the desired output:

stuff

more stuff

• Thanks! I am going to accept the other answer because @Beasty Gerbil actually fixed the issue. Sep 17 '16 at 15:23
• Well, at least you don't get rep for an accept :P Sep 17 '16 at 15:25