Display HTML Code on a web page

How to display a HTML code on a web page? 

For Display a HTML code on a web page we need to replace the opening bracket of the tag with < and replace the closing bracket of the tag with >

The formate will be look like this:

<tag>