How to ignore tags within a paragraph?

Viewed 172

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.

2 Answers

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>

You can use HTML Entitites. The basic syntax goes like this:

<some_tag> Some text &entity_code </some_tag>

Talking about your case, it would go like

<p> Microsoft Windows &lt;c&gt;</p>
Related