How do I add the error message for BMI calculator fields next/under them instead of on the top of the page?

So I’m trying to get the error message to go next to the field, but I have no idea what I’m doing, I’m pretty new at this, sorry to bother you guys. Here’s the whole code: function computeBMI() { …