I am making a LaTeX document and I am having HTML tags like List<? extends Number> which when I put in LaTeX turn out to be List¡? extends Number¿. I tried escaping with \ but did not help. Anybody knows how to escape < and > in LaTeX?

2 Answers 2


The LaTeX expressions to insert < and > would be \textless and \textgreater.

In a verbatim environment you can also include such characters without escaping. To properly include HTML code I would suggest that you have a look into the listings or lstlistings package.

< you must use T1 font encoding >

enter image description here

You must log in to answer this question.