The video can be placed within normal text (inside `<p>` elements). `<div>` elements are not allowed within `<p>` elements. Because the class `.videoContainer` is already a block element (via CSS), we can easily change the element type to `<span>`, which is allowed inside of `<p>` elements.
-<div id="attachmentVideo_{@$attachmentIdentifier}" class="videoContainer" style="display: none;">
+<span id="attachmentVideo_{@$attachmentIdentifier}" class="videoContainer" style="display: none;">
<video src="{link controller='Attachment' object=$attachment}{/link}" controls></video>
-</div>
+</span>
<a id="attachmentVideoLink_{@$attachmentIdentifier}" href="{link controller='Attachment' object=$attachment}{/link}">{$attachment->filename}</a>