As far as I know, there isn't a way to do that with just HTML.
The way I would tackle it is to use simple JavaScript to store/check for a cookie and display/hide a message respectively.
the cookie
is part of the document
object in JavaScript, if you're not familiar with JavaScript, or just looking for some explanations then feel free to Google "JavaScript Cookies" or check this link for a simple tutorial from w3schools.
Also, just to explain why I would choose cookies over storing IP addresses, this approach (cookies) does the job on the front-end, which transfers the overhead into the client's machine. While storing IP addresses (or tackling the problem in a similar manner) requires a server-side solution, which means slighlty more things for your server to do, and a lot more for you to do (You'll need to code that in PHP or so in order to implement it on the back-end).
I hope my answer get you on the right track.
Good luck with your project.
P.S some countries' regulations require you to display a disclaimer of some sort just to let the customer know that "Our website uses Cookies to store information on your device", make sure you cover that base in case you go for Cookies.