Preparing a presentation, text that involves HTML tags gets rendered as Spanish question mark and exclamation mark.

I am not particularly familiar with Latex Beamer and I could not figure out where this behavior comes from. Below is a minimum example.

When compiling in Overleaf, what I get on the slide is: ¡p¿ ¡br¿

What can I do about it?

\usetheme[progressbar=frametitle, block=fill]{metropolis}


% Define a custom footer
\setbeamertemplate{frame footer}{\inserttitle \quad - \quad \insertsectionhead}  %\insertshortauthor | \insertshortinstitute
\setbeamerfont{page number in head/foot}{size=\tiny}

\title{Latex Beamer Problems}
\date{May 15, 2019}




\begin{frame}{HTML Tags Rendered as Spanish Punctuation}
    <p> <br>


  • remember \usepackage[T1]{fontenc}, under the default OT1, some symbols may have a different meaning in text. Also, why are you adding a "floating" figure in \institute?
    – daleif
    May 15, 2019 at 12:16

2 Answers 2




(I usually do before inputenc) and it will work.

The default is OT1 in which (due to space limitations) certain chars have a different meaning in text mode.


HTML tags are no normal text, they are source code and should be rendered as such. Either with the build in verbatim stuff or \lstinline from the listsings package.




    \verb|<p> <br>|

    \lstinline|<p> <br>|


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .