for example, if I want to write:
\usepackage{minted}
My parents gave me some money.
I walked in the shop and found some sweets
that I liked. I decided to buy them.
In the above text how do I used minted package to highlight like the above
If you are also interested in the light gray background, you might find one of the two following methods useful:
\documentclass{article}
\usepackage{geometry}
\usepackage{xcolor} % For the first and second example
\definecolor{mylightgray}{RGB}{239,240,241}
\usepackage{soul} % For the second example
\sethlcolor{mylightgray}
\begin{document}
My parents gave me some money. I walked in the shop and \colorbox{mylightgray}{\texttt{found some sweets}} that I liked. I decided to buy them.
My parents gave me some money. I walked in the shop and \hl{\texttt{found some sweets}} that I liked. I decided to buy them.
\end{document}
Please note that the first example will not allow line breaks inside of the gray box.
minted
?soul
package for that, as in leandris's answer.