Why this random `</p>`?

I suspect you used an auto-formatter in IntelliJ.