Line of Code as a Text


#1

Good Afternoon,
I would like to know how to show a line of code as a text.

For example,

If I say <p> The <DOCTYPE html> is a declaration of the document being HTML5</p>, The <DOCTYPE html> wont show up when I display the line of code in the Browser.

So is there a way I can Display this like of code without removing the text from within the <>?
Regards
Satanshu

Thank you for your time and Happy New Year in advance!


#3

the problem are < and > since they mark the end and start of html tags, to display them on a web page you could: < and >

this use html ascii characters: &#60; and &#62;

thankfully for this character there are some friendlier way: &gt; and &lt;

gt = greater then, lt = lesser then


#4

Thank you for your Reply Stetim94. I will replace the < and > with your suggested by you.