The HTML5 mark tag was created in order to highlight text within a document that is relative to another context. This is perfect for highlighting the search term in a list of results.

For Example…

Google currently does this using an em tag:

Google search results using em tag

When it comes to semantics, the HTML5 mark tag is a better way to handle this sort of thing going forward.

Demo

HTML5 is a markup language used for structuring and presenting content for the World Wide Web and a core technology of the Internet. It is the fifth revision of …

Sources

Comments