While correct that HTML is stateless, you could accomplish what has been asked for with Javascript either by appending and reading query string variables, or by using cookies. It's better to use server-side scripting as it's more reliable and useful.