-1

I would like to write the following text into my html webpage: ClosedRange<Double>

However, when I put that text in a paragraph tag, <p>ClosedRange<Double></p>, the tag is obviously ignored when the webpage renders.

Any suggestions on how to ignore the tags around <Double>?

Temani Afif
  • 245,468
  • 26
  • 309
  • 415
Alex Fine
  • 139
  • 1
  • 9

1 Answers1

2

The solution is to use html entities https://dev.w3.org/html5/html-author/charref.

<p>ClosedRange&lt;Double&gt;</p>

Renders as:

ClosedRange<Double>

Credit to @niclaslindgren

Alex Fine
  • 139
  • 1
  • 9
  • Although technically it is only the left bracket '<' that needs to be replaced with '<' and not strictly also the right (although it will obviously do no harm). – Jan Kyu Peblik Oct 11 '20 at 20:44