Archive for the ‘Programming’ Category

How To Highlight HTML Codes in Blog Posts

Tuesday, July 14th, 2009

It is always suggestible for the author to write posts in very attractive and beautiful way so that the reading ability and enthusiasm of the visitor remains live. In this post I will explain how the procedure to highlight codes( Whether it may be CSS, PHP, Java, HTML…) in different colours. There were lots of plugins for wordpress which serves the purpose but here I am choosing Syntax Highlighter Wordpress Plugin. Just Follow the simple instructions and you can play in colours with codes.

1. First download Syntax Highlighter Wordpress Plugin.

2. Now install the plugin and activate it. ( To know How to install Wordpress plugin, just check this post)

3. Now create the code you wish to post

<pre class="brush:[code-alias]"> …Your Code Here </pre>

replace the "[Code-alias]" segment with the type of code you have. You can see all the available brush alias here.

For Example a C# code will look like this:

Hello1.cs

public class Hello1

{

public static void Main()

{

System.Console.WriteLine("Hello, World!");

}

}

The screenshot to see how this plugin highlight’s your codes is attached for your reference.HTML Code highlighter

Difference Between HTML Sitemap and XML Sitemap

Saturday, June 20th, 2009

Generally there are two types of sitemap HTML sitemap and XML sitemap. HTML sitemap it stands for Hyper Text Makeup Language sitemap and another one is XML sitemap Extensible Makeup Language sitemap.

HTML Sitemap

HTML sitemap is used to list all hyperlinks or the link of all pages of website into a single page. These hyperlinks are normally listed hierarchically and they may provide description for each link. To adding HTML sitemap to your website will help your visitors navigate and find information easily. So HTML sitemap is mainly created for humans. Although a HTML sitemap is created for your visitors, indexing bot such as Googlebot might have a better chance to crawl your first-time-missed links again since all the files are well put together in your sitemap page.

XML Sitemap

XML sitemap lists URLs (World Wide Web addresses) for your website in a xml code. See below the example of a URL in xml.

<?xml version=”1.0″ encoding=”UTF-8″?>
<urlset xmlns=”"http://www.sitemaps.com/schemas/sitemap/0.9″”>
<url>
<loc>http://www.LazyTechie.com </loc>
<lastmod>2009-01-20 </lastmod>
<changefreq>monthly </changefreq>
<priority> 0.6 </priority>
</url>
</urlset>

XML site map is mainly for search engine crawler not for visitor. It allows webmasters to inform search engines about URLs in your website for easy indexing. Submitting a XML sitemap to search engines such as Google, Yahoo, and MSN will not only help your website being indexing rapidly and proficiently but also increase your website’s visibilities in search engines as well.