Proper way to use spoiler tag to hide code

Can someone explain the proper method to blur code.
I have not quite figured it out
sample code:

<div id="img-div"> 
  <img id= "image" src="https://cdn.pixabay.com/photo/2018/02/08/22/27/flower-3140492_960_720.jpg" alt=" a flower">
  <div id="img-caption">
stuff lorem ipsum lorem blah blah blah/div>
</div>

trying to blur:

[spoiler]```


stuff lorem ipsum lorem blah blah blah
```[/spoiler] how can I blur the code without it being executed?

Put the ticks and the spoiler tag on different lines

If you use one backtick only for online code formatting you can do that, but with the three backticks for block code formatting you need to put spoiler tags on a different line than the backticks

  <img id= "image" src="https://cdn.pixabay.com/photo/2018/02/08/22/27/flower-3140492_960_720.jpg" alt=" a flower">
  <div id="img-caption">
stuff and more stuff?</div>
</div>```

Thank you now I see.
did not realize they had to be on separate lines