Don't miss these Blodger posts!

Saturday, 3 March 2012

Showing HTML code in Blogger

If you want to display mouse over colour changing table code shown in previous post ie the table like this 

1  Rob T riley
 Great free photo links
2  Duckingham Palace
 Beautiful Ducks

Then in Blogger - Page - Compose just cut and paste HTML code onto screen. It automatically strips some of HTML tags to allow it to be displayed as code ..

<table bgcolor="#CCCCFF" border="0" height="31" onmouseout="this.bgColor='#CCCCFF';" onmouseover="this.bgColor='#FDD017';" style="width: 515px;">
  <td height="25" rowspan="2" width="34">1</td>
  <td height="13" width="465">&nbsp;<span style="color: blue; font-family: Verdana; font-size: 10pt;"><a href="" target="_blank">Free photography link</a></span></td>
  <td height="12" width="465"><span style="font-family: Verdana; font-size: 10pt;">&nbsp;</span><span style="font-family: Verdana; font-size: 10pt;">In Depth view from experts</span></td>

The issue is that HTML tags will be interpreted as HTML unless thay are

HTML Tag in English Substitute
& ampersand &amp
" double quote &quot
' single quote &#039;
< less than &lt;
> greater than &gt;

For example this

<td height="25" rowspan="2" width="34">1</td>


  &lt;td height=&quot;25&quot; rowspan=&quot;2&quot; width=&quot;34&quot;&gt;1&lt;/td&gt;

If it's up use Gordon Hudsons

If you are using for example c# , perl, or other code in your blog and want to display this then a better way is to use Google Prettify.

Related Articles :



Post a Comment


Blodger Copyright © 2010 LKart Theme is Designed by Lasantha

Downloaded from Free Templates

Modified to LK Magazine v2 Pimp No6 and Copyright © 2013 by Blodger