Nandini Posted September 2, 2008 Share Posted September 2, 2008 Hi i want to display some content in html title. But there is a problem. here is my script <? $title="<i>i</i>UCSG"; ?> <html> <head> <title><? echo $title; ?></title> </head> <body> some script </body> </html> Here i want to display as "i" is as italic(i). But output display as "<i>i</i>UCSG". In another place its working fine. Can any one help me pls. Thanq Link to comment https://forums.phpfreaks.com/topic/122372-display-content-in-html-title/ Share on other sites More sharing options...
thebadbad Posted September 2, 2008 Share Posted September 2, 2008 HTML inside the title tag isn't allowed, and not rendered. Only HTML entities and such are translated (at least in browsers). Link to comment https://forums.phpfreaks.com/topic/122372-display-content-in-html-title/#findComment-631874 Share on other sites More sharing options...
Nandini Posted September 3, 2008 Author Share Posted September 3, 2008 then what is the remedy? Link to comment https://forums.phpfreaks.com/topic/122372-display-content-in-html-title/#findComment-632595 Share on other sites More sharing options...
ngreenwood6 Posted September 3, 2008 Share Posted September 3, 2008 try this: <? $title="UCSG"; ?> <html> <head> <title><em><? echo $title; ?></em></title> </head> <body> some script </body> </html> Link to comment https://forums.phpfreaks.com/topic/122372-display-content-in-html-title/#findComment-632601 Share on other sites More sharing options...
thebadbad Posted September 5, 2008 Share Posted September 5, 2008 ngreenwood6 - that won't work. The only solution would be to find a HTML entity (or Unicode character) resembling the italic i. Not sure if there is any. Link to comment https://forums.phpfreaks.com/topic/122372-display-content-in-html-title/#findComment-634355 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.