Skip to content

Instantly share code, notes, and snippets.

@SIRHAMY
Created September 18, 2016 04:49
Show Gist options
  • Star 12 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save SIRHAMY/d12e8d6d7e2b7bda691298c283eea8dd to your computer and use it in GitHub Desktop.
Save SIRHAMY/d12e8d6d7e2b7bda691298c283eea8dd to your computer and use it in GitHub Desktop.
React/JSX: Put greater than and less than symbol in HTML
<div>{"<"} Less than, {">"} greater than </div>
@xerotolerant
Copy link

This was surprisingly hard to find. I was beginning to wonder if I was the only perosn to encounter a problem because of this.

@telmotrooper
Copy link

Thank you for the hint!

@prebur1hpp
Copy link

Thanks!

@mikelyons
Copy link

Good on ya mate! 👍

@Kim-Sung-Tae
Copy link

thank you handsome man

@kiranNetha1997
Copy link

thanks you

@mDeram
Copy link

mDeram commented Jun 28, 2022

Nice one, you can also use:

<div>&lt; Less than, &gt; greater than </div>

Reserved html characters with how to write them:

" : &quot;
' : &apos;
& : &amp;
< : &lt;
> : &gt;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment