3

I want to display this code, in my website:

<title>MY_TITLE</title>

I tried to use the <pre> and <code> tags without success. Its wrote that I can't use title tags on those tags.

Again, I want to display this code (This code shouldn't do nothing). Any suggestions?

2 Answers 2

4

If you want to display and show HTML code on a web page so that it is not executed, you need to convert the < and > into it's ascii equivalent of &lt; and &gt;

Try following

&lt;title&gt;MY_TITLE&lt;/title&gt;
Sign up to request clarification or add additional context in comments.

Comments

1

<title> MY_TITLE </ title> This code has to go inside label "<![CDATA[ "-->code here<--" ]]>"

https://stackoverflow.com/a/7092306/4504069

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.