The closing
s inside HTML comment blocks appear outside the comment which makes the exported HTML invalid. For example: #+title: Stray div demo Hello. #+html: Goodbye. Produces this HTML (cleaned up to make it easier to read, see attached for original files):

Hello.

Goodbye.

Emacs : GNU Emacs 30.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.38, cairo version 1.18.0) of 2024-03-08 Package: Org mode version 9.6.15 (release_9.6.15 @ /home/jm/.local/share/emacs/30.0.50/lisp/org/)