Search code examples
htmlcsstagsparagraph

How to ignore tags within a paragraph?


Is it possible to have display tags with a paragraph? For example, I want to display the text '<c>' on my page within a p tag. however, the <c> is parsed as a tag instead of raw text.

 <p1>Microsoft Windows<c></p1>

In this example, I want the <c> to be displayed as text rather than being used as a tag.


Solution

  • In order to do that, you need to use HTML codes for the symbols '<>'. The code for '<' is &#60; and that for '>' is &#62;, so your code should be:

    <p> Microsoft Windows &#60;c&#62;</p>