juniorHTML5
What is the purpose of the <mark> tag?
Updated Apr 28, 2026
Short answer
It highlights text that is relevant in a particular context.
Deep explanation
Unlike <strong> (importance) or <em> (emphasis), <mark> is used to denote search hits or text that the user needs to notice quickly due to its relevance to their current activity.
Real-world example
Highlighting search terms in a results list after a user performs a search.
Common mistakes
- Using <mark> for styling purposes only (use CSS background-color for that).
Follow-up questions
- How does <mark> differ from <strong>?