Skip to main content

How to write HTML code in blogger ?

It's somewhat tricky to write HTML code in blogger as it does not escape "<" and ">" characters.
So whenever you need to write HTML code or Regular Expression to show someone, you can follow these steps-

1.Go to any of these sites here  or here. These two sites are HTML escaper.
2.Copy the code you have written in any these websites and press the button escape. You will see the escaped code.
3.Now copy this escaped code and paste it again in the new blog post. You are done escaping and press publish to publish the code.

And of course, you always have the option of escaping yourself "<" and ">" character by their escape values. Well this can be an important source of information, if you are willing to do it on your own.

Comments

Popular posts from this blog

Running PHP by command line on WAMP

There are a few simple steps one can follow to run php scripts by command line. Usually if you write "php" on the DOS prompt it will not recognize the command. In order to run php on command line in windows you have to do the following - Step 1 : Go to your wamp directory:\wamp\bin\php\php5.x.x (directory depends on your version). Copy this path Step 2 : Right click on My Computer and go to properties > Advanced > Environment Variables > System Variables . In that window select "path" click edit button. Go to the end of "Variable Value" and add a semi-colon ";" and after that paste the path copied. Click "Ok" and close. Step 3 : Open a fresh command prompt . Type php. Now it should run.

Difference between SJAX and AJAX

AJAX is Asynchronous Javascript and XML SJAX is Synchronous Javascript and XML What does Asynchronous means ? It means that when a request is sent to the server the statements following (javascript code OTHER than the callback function ) are executed WITHOUT waiting for the server response. So even though if your server is taking a long time for responsing for a request , you are not put on a hold. That's the beauty of AJAX. Synchronous means here exactly the opposite of it. That means you force the browser to wait for the server response. This might be a bit a dangerous step because if the server takes a long time,the browser may appear dead. Your users might have to close the tab or the browser. How to send Synchronous request by jQuery? $.ajax method of jquery supports a lot of options , there is an option called async which is true by default . You can set it to false. You can find it here

jQuery Selectors

In this post I would like to share what are the different ways by which we can select a particular DOM element. There are numerous ways of selecting an element, lets focus on the important ways. Let us consider the following HTML code. <div class="myClass" myAttribute="myAttributeValue"> <span>This is the first span in div </span> <span class="mySpanClass">This is second span in div </span> </div> If you have to get the attribute value of myAttribute of the first div with class="myClass" You can write in two ways - One $("div.myClass").attr('myAttribute'); //output will be myAttributeValue Two $(".myClass").attr('myAttribute'); //output will be myAttributeValue The above second way is not safe if you have elements other than div (such as span,td etc ) with the same class name. Selection by attribute If you want to know the class of the div you can write t...