# Source code customization for specific words?

I'd like to highlight some specific words for HTML5 code manually in LaTeX. In other words, I don't want to define an exact structure for highlighting the language, but do the highlights only for the words I select. So let's say for the code below, I only want to make signin-login bold and green, and only its type="text" bold and red, while the rest of the code stays the same.

    <form id="navbar-loginform" class="navbar-form navbar-right hidden">
<div class="form-group">
</div>
<div class="form-group">
</div>
</form>


How can I achieve this? Could you please show me a short working example for this?

• Welcome to TeX.SX. Please provide some more information on how you are working. Add a minimal working example showing your documentclass, the packages you want to use herefore and the \begin{document}...\end{document}-Block. – LaRiFaRi Mar 26 '14 at 13:14
• Maybe this link helps you: tex.stackexchange.com/questions/91259/… – raedma Mar 26 '14 at 13:15
• otherwise the listings-package might do the trick – raedma Mar 26 '14 at 13:31

One possibility using the listings package; since apparently you only want to highlight some specific strings, you can escape to LaTeX and do the coloring there (in my example I used the bera package just to have a mono-spaced font allowing boldface)

\documentclass{article}
\usepackage{xcolor}
\usepackage{listings}
\usepackage{bera}% for boldfaced typewriter font

\lstset{
basicstyle=\ttfamily,
columns=fullflexible,
breaklines=true,
escapeinside={@|}{|@}
}

\begin{document}

\begin{lstlisting}
<div class="form-group">
</div>
<div class="form-group">