Archive for December, 2007

Printing tags in an html pages.

  Usually, Html file consists of many special tags like <a>, <br> etc. And if you need to print html tags in text of your web page (for example when you want to display html source code on web page), you can’t write them directly in your html file. Because in that case your browser will interpret them as html tags and will not shown them correctly. Thus, it’s better to use &amp;lt; and &amp;gt; instead of < and > correspondingly. For example, if you need to display <table> tag, you need to write &amp;lt;table&amp;gt;
  But how to display &amp;lt; or &amp;gt; in html? You can use &amp;amp; instead of & symbol. For example, you need to display &amp;lt;. Then you should write &amp;amp;lt; in your html file.

  In general, if you want to display &amp;amp;amp;amp;lt; or something like this, you need to write in your html the same sequence but with replaced & symbol with &amp;amp;. In this case it will be &amp;amp;amp;amp;amp;lt;

  In WordPress you should use +1 more amp; phrase, because it replace all &amp;amp; with the & in Code mode.

Saturday, December 29th, 2007

How to make burning text in JavaScript

You can make different dynamic text effects on your html page using JavaScript function document.getElementsByTagName(‘tag_name’). The idea is to select tag, which is absent in your html (for example:<tt>, <i>, <b> etc.). Then you should embrace all letters of your text with this tag. For example: “Hello world” transforms to “<tt>H</tt><tt>e</tt><tt>l</tt><tt>l</tt><tt>o</tt><tt> </tt><tt>W</tt><tt>o</tt><tt>r</tt>

<tt>l</tt><tt>d</tt>”. After that you can dynamically change style (color, font etc.) of every letter you want accessing to it during array document.getElementsByTagName(‘tt’).

So, you can create with your text such effects like burning, dissapearing, growing etc. Please, look at http://atuk.boloto.org/fire/ to get sample scripts.

Friday, December 21st, 2007