Search code examples
htmltagsline-breaks

html br tag in text element - how to display it as text


This is a little question to which i couldn't find an answer by searching. I have this text which says: <p>Each <br> tag represents a new line break</p>, and i want the br tag to be visible as text instead of a line break.


Solution

  • Thank you nikhil, for giving me the answer. The answer is:

    &lt;br&gt;
    

    &lt; represents <

    and

    &gt; represents >