HTML landmarks are used to categorize and group content on a web page for better accessibility and SEO.