How to send simple variables via HTML Webserver?


I am trying to send simple numbers from my ESP32 to my HTML Page. I'm new to the whole HTML stuff, I know that there are several possibilities like php, some javascript methods, iFrames and other things. I don't want to refresh the whole page with a meta tag, that is too slow for my use. I only want to refresh a div container every x seconds. The HTML Page is on my Arduino and it sends the page to the client.

It would be very nice, if somebody could show me an example sketch, where one variable is sent to the client. (HTML Page + Arduino code)

Thank you!

this will be your friend

Thank you, I was searching for exactly this, I'll try that now!