Vanilla JavaScript Plugin

mark.js  

A highlighter plugin that can be used to dynamically mark search terms or custom regular expressions in any text.

Plugin Website  Demo

Related plugins

highlight.js  

Syntax highlighting auto-detecting 118 languages, multi-language code highlighting. A bit on the large side for a code highlighter.

SyntaxHighlighter  

A powerful code syntax highlighter with very beautiful styles and manifold options. However, rather large in size. Used by Apache, Mozilla, Yahoo and others.

Rainbow Syntax Highlighter  

Rainbow is a very lightweight and powerful source code syntax highlighting library supporting 19 languages by default. It's used here on plainJS.