Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Code in bootstrap

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?

like image 454
Web R Avatar asked Feb 08 '26 00:02

Web R


2 Answers

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;
like image 181
Nikhil Aggarwal Avatar answered Feb 12 '26 04:02

Nikhil Aggarwal


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

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

like image 43
Danny Riofrío Jiménez Avatar answered Feb 12 '26 05:02

Danny Riofrío Jiménez



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!