1

I want to write larger than or smaller than symbols inside my html paragraph, for example:

<p>
    15 > 13
</p>

I want the paragraph to show 15 > 13 but it's invalid syntax. How can I fix that? Thanks

Rani Giterman
  • 708
  • 2
  • 6
  • 17

2 Answers2

1

You use HTML entities.

<p>
    15 &gt; 13
</p>

&gt; is > and &lt; is <.

There are many others you should learn. See https://developer.mozilla.org/en-US/docs/Glossary/Entity

Andy Lester
  • 91,102
  • 13
  • 100
  • 152
1

> is written using &gt; and < with &lt;

<p>
    15 &gt; 13
</p>

You can see a full list of available named character references. The general pattern is an ampersand, followed by some name, ended with a semicolon.

Silvio Mayolo
  • 62,821
  • 6
  • 74
  • 116