<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Wai Yan Lin &#187; tutorial</title>
	<atom:link href="http://blog.waiyanlin.net/category/tutorial/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.waiyanlin.net</link>
	<description></description>
	<lastBuildDate>Wed, 11 Aug 2010 02:30:07 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Tutorial: How to create a simple drop-down menu jQuery plugin</title>
		<link>http://blog.waiyanlin.net/2010/08/11/tutorial-how-to-create-a-simple-drop-down-menu-jquery-plugin/</link>
		<comments>http://blog.waiyanlin.net/2010/08/11/tutorial-how-to-create-a-simple-drop-down-menu-jquery-plugin/#comments</comments>
		<pubDate>Wed, 11 Aug 2010 02:30:07 +0000</pubDate>
		<dc:creator>waiyan</dc:creator>
				<category><![CDATA[jQuery]]></category>
		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://blog.waiyanlin.net/?p=207</guid>
		<description><![CDATA[I&#8217;ve been using jQuery for quite a long time and simply love the power of it. It helps to speed up my development time like what they say: &#8216;write less, do more&#8217;. And I also used many jQuery plugins depending on my development&#8217;s needs. There are many great plugins which...]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been using jQuery for quite a long time and simply love the power of it. It helps to speed up my development time like what they say: &#8216;write less, do more&#8217;. And I also used many jQuery plugins depending on my development&#8217;s needs. There are many great plugins which will make your life much easier.</p>
<p>In this tutorial, I will share how to write a simple plugin for your drop-down navigation menu.</p>
<p><strong>Basic Structure</strong></p>
<p>Lets take a look at the basic structure of jQuery plugin. (If you wish, you can read <a href="http://docs.jquery.com/Plugins/Authoring" target="_blank">the official article</a> for writing a plugin)</p>
<blockquote><p>(function($) {</p>
<p>$.fn.yourplugin = function() {</p>
<p>this.each(function() {    <span style="white-space:pre"> </span></p>
<p><span style="white-space:pre"> </span> //your code comes here</p>
<p>});</p>
<p>return this;</p>
<p>};</p>
<p>})(jQuery);</p>
</blockquote>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 16px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">(function($) {</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 16px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">$.fn.yourplugin = function() {</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 16px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">this.each(function() {    <span style="white-space: pre;"> </span></div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 16px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"><span style="white-space: pre;"> </span> //your code comes here</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 16px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">});</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 16px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">return this;</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 16px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">};</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 16px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">})(jQuery);</div>
<p><strong>Options</strong></p>
<p><strong><span style="font-weight: normal; ">You might want to include some options to let the users to change easily without touching your plugin&#8217;s code. </span></strong></p>
<blockquote><p>(function($) {</p>
<p>$.fn.yourplugin = function() {</p>
<p>//set default values of your options</p>
<p>var config = {</p>
<p><span style="white-space:pre"> </span> &#8216;option1&#8242;: value&#8217;,</p>
<p><span style="white-space:pre"> </span> &#8216;option2&#8242;: &#8216;value&#8217;</p>
<p>};</p>
<p>var settings = $.extend(config, settings);</p>
<p>this.each(function() {</p>
<p><span style="white-space:pre"> </span> //default options. you can call your settings like &#8216;s.option1&#8242; or &#8216;s.option2&#8242;<span style="white-space:pre"> </span> <span style="white-space:pre"> </span></p>
<p><span style="white-space:pre"> </span> var s = settings;</p>
<p>//your code comes here</p>
<p>});</p>
<p>return this;</p>
<p>};</p>
<p>})(jQuery);</p>
</blockquote>
<p>Now we know what basic plugin structure looks like. Lets create our very simple drop-down menu plugin. First of all, we need to create a navigation menu before we move on to the plugin. Here&#8217;s how it looks like:</p>
<blockquote><p>&lt;div id=&#8221;navwrap&#8221;&gt;</p>
<p>&lt;ul id=&#8221;nav&#8221;&gt;</p>
<p>&lt;li&gt;&lt;a href=&#8221;#&#8221;&gt;Menu Item 1&lt;/a&gt;</p>
<p>&lt;ul&gt;</p>
<p>&lt;li&gt;&lt;a href=&#8221;#&#8221;&gt;Menu Item 1.1&lt;/a&gt;</p>
<p>&lt;ul&gt;</p>
<p>&lt;li&gt;&lt;a href=&#8221;#&#8221;&gt;Menu Item 1.1.1&lt;/a&gt;</p>
<p>&lt;ul&gt;</p>
<p>&lt;li&gt;&lt;a href=&#8221;#&#8221;&gt;Menu Item 1.1.1.1&lt;/a&gt;&lt;/li&gt;</p>
<p>&lt;/ul&gt;</p>
<p>&lt;/li&gt;</p>
<p>&lt;li&gt;&lt;a href=&#8221;#&#8221;&gt;Menu Item 1.1.2&lt;/a&gt;&lt;/li&gt;</p>
<p>&lt;/ul&gt;</p>
<p>&lt;/li&gt;</p>
<p>&lt;li&gt;&lt;a href=&#8221;#&#8221;&gt;Menu Item 1.2&lt;/a&gt;&lt;/li&gt;</p>
<p>&lt;li&gt;&lt;a href=&#8221;#&#8221;&gt;Menu Item 1.3&lt;/a&gt;&lt;/li&gt;</p>
<p>&lt;/ul&gt;</p>
<p>&lt;/li&gt;</p>
<p>&lt;li&gt;&lt;a href=&#8221;#&#8221;&gt;Menu Item 2 Is Long&lt;/a&gt;</p>
<p>&lt;ul&gt;</p>
<p>&lt;li&gt;&lt;a href=&#8221;#&#8221;&gt;Menu Item 2.1&lt;/a&gt;&lt;/li&gt;</p>
<p>&lt;/ul&gt;</p>
<p>&lt;/li&gt;</p>
<p>&lt;li&gt;&lt;a href=&#8221;#&#8221;&gt;Menu Item 3&lt;/a&gt;&lt;/li&gt;</p>
<p>&lt;li&gt;&lt;a href=&#8221;#&#8221;&gt;Menu Item 4&lt;/a&gt;&lt;/li&gt;</p>
<p>&lt;/ul&gt;</p>
<p>&lt;/div&gt;</p>
</blockquote>
<p><strong>CSS</strong></p>
<p>Then, we need to set some css rules for our menu.</p>
<blockquote><p>ul#nav{</p>
<p><span style="white-space:pre"> </span>list-style: none;</p>
<p><span style="white-space:pre"> </span>margin: 0;</p>
<p><span style="white-space:pre"> </span>padding: 0;</p>
<p><span style="white-space:pre"> </span>position: relative;</p>
<p>}</p>
<p>ul#nav li{</p>
<p><span style="white-space:pre"> </span>float:left;</p>
<p><span style="white-space:pre"> </span>background-color: #0088AA;</p>
<p><span style="white-space:pre"> </span>position:relative;</p>
<p><span style="white-space:pre"> </span>display:block;</p>
<p><span style="white-space:pre"> </span>margin-right:1px;</p>
<p><span style="white-space:pre"> </span>font-size:14px;</p>
<p>}</p>
<p>ul#nav li a{</p>
<p><span style="white-space:pre"> </span>color:#FFF;</p>
<p><span style="white-space:pre"> </span>text-decoration: none;<span style="white-space:pre"> </span></p>
<p><span style="white-space:pre"> </span>padding:5px;</p>
<p><span style="white-space:pre"> </span>display:block;</p>
<p><span style="white-space:pre"> </span>position:relative;</p>
<p><span style="white-space:pre"> </span>width:100%;</p>
<p>}</p>
<p>ul#nav ul{</p>
<p><span style="white-space:pre"> </span>margin:0;</p>
<p><span style="white-space:pre"> </span>padding:0;</p>
<p><span style="white-space:pre"> </span>position:absolute;</p>
<p><span style="white-space:pre"> </span>width:100%;</p>
<p>}</p>
<p>ul#nav li li{</p>
<p><span style="white-space:pre"> </span>position:relative;</p>
<p><span style="white-space:pre"> </span>background-color:#0077AA;</p>
<p><span style="white-space:pre"> </span>display:block;</p>
<p><span style="white-space:pre"> </span>margin:0;</p>
<p><span style="white-space:pre"> </span>border-top:solid 1px #FFF;</p>
<p><span style="white-space:pre"> </span>width:100%;</p>
<p><span style="white-space:pre"> </span>font-size:11px;</p>
<p>}</p>
<p>ul#nav ul ul{</p>
<p><span style="white-space:pre"> </span>position:absolute;</p>
<p><span style="white-space:pre"> </span>left:100%;</p>
<p><span style="white-space:pre"> </span>top:0;</p>
<p><span style="white-space:pre"> </span>margin:0 0 0 1px;</p>
<p><span style="white-space:pre"> </span>width:100%;</p>
<p>}</p>
</blockquote>
<p>Now, we will create the plugin which will use jQuery slideDown/Up effect for drop-down animation and giving one option for users to change the animation speed.</p>
<blockquote><p>(function($) {</p>
<p>$.fn.jDropDown = function(settings) {</p>
<p>//option for speed with default value of 500 milliseconds</p>
<p>var config = {</p>
<p><span style="white-space:pre"> </span> &#8216;speed&#8217;: &#8217;500&#8242;</p>
<p>};</p>
<p>var settings = $.extend(config, settings);</p>
<p>this.each(function() {</p>
<p><span style="white-space:pre"> </span> var s = settings;</p>
<p><span style="white-space:pre"> </span> var mainNav = this;    <span style="white-space:pre"> </span></p>
<p><span style="white-space:pre"> </span> //set css to all second ul to display none</p>
<p><span style="white-space:pre"> </span> $(mainNav).find(&#8216;ul&#8217;).css({&#8216;display&#8217;:'none&#8217;});    <span style="white-space:pre"> </span> <span style="white-space:pre"> </span> <span style="white-space:pre"> </span> <span style="white-space:pre"> </span></p>
<p><span style="white-space:pre"> </span> //hover event for each main li</p>
<p><span style="white-space:pre"> </span> $(mainNav).find(&#8216;li&#8217;).hover(</p>
<p><span style="white-space:pre"> </span>function(){</p>
<p><span style="white-space:pre"> </span>$(this).find(&#8216;ul:first&#8217;).slideDown(s.speed);    <span style="white-space:pre"> </span></p>
<p><span style="white-space:pre"> </span>},</p>
<p><span style="white-space:pre"> </span>function(){</p>
<p><span style="white-space:pre"> </span>$(this).find(&#8216;ul:first&#8217;).slideUp(s.speed);    <span style="white-space:pre"> </span></p>
<p><span style="white-space:pre"> </span>}</p>
<p><span style="white-space:pre"> </span>);</p>
<p><span style="white-space:pre"> </span></p>
<p>});</p>
<p>return this;</p>
<p>};</p>
<p>})(jQuery);</p>
</blockquote>
<p>This is all we have to do. Now, you can use this plugin by putting the following code in your html page between &lt;head&gt; and &lt;/head&gt;</p>
<blockquote><p>&lt;script&gt;</p>
<p>$(document).ready(function(){</p>
<p><span style="white-space:pre"> </span>$(&#8216;ul#nav&#8217;).jDropDown({</p>
<p><span style="white-space:pre"> </span>&#8216;speed&#8217;: 300</p>
<p><span style="white-space:pre"> </span>});</p>
<p>});</p>
<p>&lt;/script&gt;</p>
</blockquote>
<p>It is not too difficult to create your own jQuery plugin. I hope this tutorial will help you to write some cool plugins. If you have any doubt, feel free to write in the comment section below.</p>
<p><a href="http://blog.waiyanlin.net/example/jquery/jdropdown/" target="_blank">Demo</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.waiyanlin.net/2010/08/11/tutorial-how-to-create-a-simple-drop-down-menu-jquery-plugin/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Tutorial: Easiest way to display random image using PHP</title>
		<link>http://blog.waiyanlin.net/2010/07/30/tutorial-easiest-way-to-display-random-image-using-php/</link>
		<comments>http://blog.waiyanlin.net/2010/07/30/tutorial-easiest-way-to-display-random-image-using-php/#comments</comments>
		<pubDate>Fri, 30 Jul 2010 08:01:59 +0000</pubDate>
		<dc:creator>waiyan</dc:creator>
				<category><![CDATA[php]]></category>
		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://blog.waiyanlin.net/?p=201</guid>
		<description><![CDATA[First of all, this tutorial is mainly for the beginners who start learning programming especially PHP. If you are building some website and sometimes, you might need to display a random image per page load. It that case, you could use this method. There might be some other ways to achieve this but I find that this is the easiest way at least, for me.]]></description>
			<content:encoded><![CDATA[<p>First of all, this tutorial is mainly for the beginners who start learning programming especially PHP. If you are building some website and sometimes, you might need to display a random image per page load. It that case, you could use this method. There might be some other ways to achieve this but I find that this is the easiest way at least, for me.</p>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">&lt;?php</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">$iArr = array(&#8216;image1.jpg&#8217;, &#8216;image2.jpg&#8217;, &#8216;image3.jpg&#8217;);</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">$no = sizeof($iArr)-1;</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">$random = mt_rand(0, $no);</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">$path = &#8216;images/&#8217;;</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">$ranImg = $iArr[$random];</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">$img = $path.$ranImg;</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">echo $img;</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">echo &#8216;&lt;img src=&#8221;&#8216;.$img.&#8217;&#8221; alt=&#8221;"/&gt;&#8217;;</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">?&gt;</div>
<blockquote><p>&lt;?php</p>
<p>$iArr = array(&#8216;image1.jpg&#8217;, &#8216;image2.jpg&#8217;, &#8216;image3.jpg&#8217;); //create an array of image</p>
<p>$no = sizeof($iArr)-1;</p>
<p>$random = mt_rand(0, $no); //get random number between 0 and array size</p>
<p>$path = &#8216;images/&#8217;; //this is the path to your images</p>
<p>$ranImg = $iArr[$random]; //get random image from array</p>
<p>$img = $path.$ranImg; //the full image path e.g. images/image1.jpg</p>
<p>echo &#8216;&lt;img src=&#8221;&#8216;.$img.&#8217;&#8221; alt=&#8221;"/&gt;&#8217;; //display the random image</p>
<p>?&gt;</p>
</blockquote>
<p>I believe the code is quite simple and self explained. Please feel free to share your thoughts in comments.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.waiyanlin.net/2010/07/30/tutorial-easiest-way-to-display-random-image-using-php/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>jQuery: Flying Text With Fade Effect</title>
		<link>http://blog.waiyanlin.net/2008/12/17/jquery-flying-text-with-fade-effect/</link>
		<comments>http://blog.waiyanlin.net/2008/12/17/jquery-flying-text-with-fade-effect/#comments</comments>
		<pubDate>Tue, 16 Dec 2008 17:01:00 +0000</pubDate>
		<dc:creator>waiyan</dc:creator>
				<category><![CDATA[jQuery]]></category>
		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://blog.waiyanlin.net/?p=154</guid>
		<description><![CDATA[<p>With this great javascript framework, jQuery, you can create some flash like effects. In this post, I will show how to create very simple flying and fading text effect using jQuery. Here is live <a href="http://blog.waiyanlin.net/example/jquery/flyingtext.html" target="_blank">demo</a>.</p>]]></description>
			<content:encoded><![CDATA[<p>With this great javascript framework, jQuery, you can create some flash like effects. In this post, I will show how to create very simple flying and fading text effect using jQuery. Here is live <a href="http://blog.waiyanlin.net/example/jquery/flyingtext.html" target="_blank">demo</a>.</p>
<p><code><span style="color: #000000;"></p>
<p></span></code></p>
<p><span style="color: #000000;">javascript:</span></p>
<blockquote><p>$(&#8216;.container .flying-text&#8217;).css({opacity:0}); //set all text opacity to 0</p>
<p>$(&#8216;.container .active-text&#8217;).animate({opacity:1, marginLeft: &#8220;350px&#8221;}, 4000); //animate first text</p>
<p>var int = setInterval(changeText, 5000); // call changeText function every 5 seconds</p>
<p>function changeText(){</p>
<p>var $activeText = $(&#8220;.container .active-text&#8221;); //get current text</p>
<p>var $nextText = $activeText.next();  //get next text</p>
<p>if($activeText.next().length == 0) $nextText = $(&#8216;.container .flying-text:first&#8217;); //if it is last text, loop back to first text</p>
<p>$activeText.animate({opacity:0}, 1000); //set opacity 0 to animated text</p>
<p>$activeText.animate({marginLeft: &#8220;-100px&#8221;}); //set animated text position to default</p>
<p>//animate next text</p>
<p>$nextText.css({opacity: 0}).addClass(&#8216;active-text&#8217;).animate({opacity:1, marginLeft: &#8220;350px&#8221;}, 4000, function(){</p>
<p>$activeText.removeClass(&#8216;active-text&#8217;);</p>
<p>});</p>
<p>}</p>
</blockquote>
<p>HTML:</p>
<blockquote><p>&lt;div class=&#8221;container&#8221;&gt;</p>
<p>&lt;h3 class=&#8221;flying-text active-text&#8221;&gt;I believe&lt;/h3&gt;</p>
<p>&lt;h3 class=&#8221;flying-text&#8221;&gt;I can&lt;/h3&gt;</p>
<p>&lt;h3 class=&#8221;flying-text&#8221;&gt;Fly&lt;/h3&gt;</p>
<p>&lt;/div&gt;</p>
</blockquote>
<p>CSS:</p>
<blockquote><p>body{</p>
<p>background-color:#000;</p>
<p>}</p>
<p>.container{</p>
<p>background-color:#000;</p>
<p>width:500px;</p>
<p>margin:0 auto;</p>
<p>color:#FFF;</p>
<p>overflow:hidden;</p>
<p>}</p>
<p>.flying-text{</p>
<p>margin-left:-100px;</p>
<p>}</p>
</blockquote>
<p>Check this live <a href="http://blog.waiyanlin.net/example/jquery/flyingtext.html" target="_blank">demo</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.waiyanlin.net/2008/12/17/jquery-flying-text-with-fade-effect/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>HTML ဆိုတာ</title>
		<link>http://blog.waiyanlin.net/2007/06/05/html-%e1%80%86%e1%80%ad%e1%80%af%e1%80%90%e1%80%ac/</link>
		<comments>http://blog.waiyanlin.net/2007/06/05/html-%e1%80%86%e1%80%ad%e1%80%af%e1%80%90%e1%80%ac/#comments</comments>
		<pubDate>Tue, 05 Jun 2007 16:04:00 +0000</pubDate>
		<dc:creator>waiyan</dc:creator>
				<category><![CDATA[html]]></category>
		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://blog.waiyanlin.com/?p=80</guid>
		<description><![CDATA[ဒီပို႔စ္ကိုေရးရတဲ့ရည္ရြယ္ခ်က္ကေတာ့ မသိေသးသူမ်ား ဗဟုသုတရၿပီး HTML နဲ႔ပတ္သက္တာေတြကို အေျခခံကစၿပီး ေလ့လာႏိုင္ဖို႔အတြက္ပါ။ သိၿပီးသားပုဂၢိဳလ္မ်ားကေတာ့ မ်က္စိေညာင္းလိမ့္မယ္ဗ်။ HTML ဆိုတာHypertext Markup Language ကိုေခၚတာျဖစ္ပါတယ္။ အရိုးရွင္းဆံုးေျပာရမယ္ဆိုရင္ေတာ့ HTML ဆိုတာ အင္တာနက္စာမ်က္ႏွာ (website) မ်ားကိုဖန္တီးရာမွာ အသံုးျပဳတဲ့ ကြန္ပ်ဴတာဘာသာစကားတစ္မ်ိဳးျဖစ္ပါတယ္။Hypertext &#8211; ဆိုတာက အသံုးျပဳသူ သို႔မဟုတ္ ၾကည့္ရွဳသူရဲ႕ ေတာင္းဆိုမွဳကိုအေျခခံၿပီး အျခားသက္ဆိုင္ရာ သတင္းအခ်က္အလက္မ်ားရွိတဲ့ေနရာမ်ားကို hyperlinks ဆိုတဲ့အထူးျပဳလုပ္ထားေသာ text မ်ားကိုႏွိပ္ျခင္းအားျဖင့္ ေရာက္ရွိသြားေအာင္ ျပဳလုပ္ေပးေသာနည္းပညာတစ္ခုပါ။Markup Language &#8211; ဆိုတာက text ေတြနဲ႔အဲဒီ text ေတြရဲ႕အျခားအခ်က္အလက္မ်ားကို ေပါင္းစပ္ထားတဲ့ language တစ္ခုပါ။ အျခားအခ်က္အလက္ေတြဆိုတာက အဲဒီ text ေတြရဲ႕ဖြဲ႕စည္းပံု...]]></description>
			<content:encoded><![CDATA[<p><span style="font-family:Zawgyi-One;">ဒီပို႔စ္ကိုေရးရတဲ့ရည္ရြယ္ခ်က္ကေတာ့ မသိေသးသူမ်ား ဗဟုသုတရၿပီး HTML  နဲ႔ပတ္သက္တာေတြကို အေျခခံကစၿပီး ေလ့လာႏိုင္ဖို႔အတြက္ပါ။ သိၿပီးသားပုဂၢိဳလ္မ်ားကေတာ့ မ်က္စိေညာင္းလိမ့္မယ္ဗ်။</p>
<p><span style="font-weight: bold;">HTML ဆိုတာ</span><br /><span id="fullpost"><br />Hypertext Markup Language ကိုေခၚတာျဖစ္ပါတယ္။ အရိုးရွင္းဆံုးေျပာရမယ္ဆိုရင္ေတာ့ HTML ဆိုတာ အင္တာနက္စာမ်က္ႏွာ (website) မ်ားကိုဖန္တီးရာမွာ အသံုးျပဳတဲ့ ကြန္ပ်ဴတာဘာသာစကားတစ္မ်ိဳးျဖစ္ပါတယ္။<br />Hypertext &#8211; ဆိုတာက အသံုးျပဳသူ သို႔မဟုတ္ ၾကည့္ရွဳသူရဲ႕ ေတာင္းဆိုမွဳကိုအေျခခံၿပီး အျခားသက္ဆိုင္ရာ သတင္းအခ်က္အလက္မ်ားရွိတဲ့ေနရာမ်ားကို hyperlinks ဆိုတဲ့အထူးျပဳလုပ္ထားေသာ text မ်ားကိုႏွိပ္ျခင္းအားျဖင့္ ေရာက္ရွိသြားေအာင္ ျပဳလုပ္ေပးေသာနည္းပညာတစ္ခုပါ။<br />Markup Language &#8211; ဆိုတာက text ေတြနဲ႔အဲဒီ text ေတြရဲ႕အျခားအခ်က္အလက္မ်ားကို ေပါင္းစပ္ထားတဲ့ language တစ္ခုပါ။ အျခားအခ်က္အလက္ေတြဆိုတာက အဲဒီ text ေတြရဲ႕ဖြဲ႕စည္းပံု သို႔မဟုတ္ ဘယ္လိုေပၚရမယ္၊ ဘယ္လိုေနရာမွာေပၚရမယ္ စတာမ်ိဳးေတြအတြက္ျဖစ္ပါတယ္။</p>
<p><span style="font-weight: bold;">သမိုင္းေၾကာင္း</span></p>
<p>HTML ရဲ႕သမိုင္းေၾကာင္းကို အက်ဥ္းခ်ဳပ္ေျပာရရင္ေတာ့ ၁၉၉၀ ခုႏွစ္မွာ Tim Berners-Lee ဆိုတဲ့ Scientist တစ္ေယာက္က တီထြင္ခဲ့တာပါ။ သူ႔ရဲ႕အဓိကရည္ရြယ္ခ်က္ကေတာ့ တျခားတကၠသိုလ္၊ ေကာလိပ္မ်ားမွာရွိတဲ့ Scientists မ်ားနဲ႔ research လုပ္ထားတဲ့ စာရြက္စာတမ္းမ်ားကိုသူတို႔အခ်င္းခ်င္း ဖလွယ္ၾကည့္ရွဳႏိုင္ဖို႔ပါ။ ဒါေပမယ့္သူ႔ရဲ႕တီထြင္မွဳဟာ သူေမွ်ာ္မွန္းထားတာထက္ အဆေပါင္းမ်ားစြာ ပိုမိုႀကီးမားခဲ့ပါတယ္။ ဘာျဖစ္လို႔လဲဆိုေတာ့ ယေန႔ကမာၻႀကီးတစ္ခုလံုး အသံုးျပဳေနတဲ့ အင္တာနက္ထဲက စာမ်က္ႏွာမ်ားဟာ အဲဒီ HTML ဆိုတဲ့ဘာသာစကားကိုပဲ အေျခခံၿပီးအသံုးျပဳေနၾကရလို႔ပါပဲ။</p>
<p>ယေန႔ကာလမွာ Website တစ္ခုကိုဖန္တီးေတာ့မယ္ဆိုရင္ HTML ကိုဖယ္ထားလို႔မရပါဘူး။ Website ေတြဖန္တီးဖို႔ အထူးထုတ္လုပ္ထားတဲ့ software (ဥပမာ &#8211; Dreamweaver) ေတြကိုသံုးရင္ေတာင္မွ HTML ကိုသိထားမွအဆင္ေျပႏိုင္လိမ့္မယ္။ ဒါေပမဲ့ ပူစရာေတာ့မရွိပါဘူး။ HTML ကသင္ယူရတာလြယ္ကူၿပီး အသံုးျပဳရတာလဲ လြယ္ကူပါတယ္။</p>
<p><span style="font-weight: bold;">ဘယ္လိုအလုပ္လုပ္လဲ</span>ဲ</p>
<p>HTML Tags ေတြနဲ႔ရိုးရိုးစာေတြေရးထားတဲ့ ဖိုင္တစ္ခုကို ေရးၿပီးသြားၿပီဆိုရင္ အဲဒီဖိုင္ကို .html သို႔မဟုတ္ .htm ဆိုတဲ့ file extension နဲ႔သိမ္းလိုက္ရမယ္။ အဲဒီဖိုင္ကို browser (Firefox သို႔မဟုတ္ IE) နဲ႔ဖြင့္ၾကည့္လိုက္ရင္ အဲဒီ browser က HTML ဖိုင္မွာေရးထားတဲ့ text ေတြကိုဖတ္လိုက္မယ္။ ၿပီးရင္ဖိုင္ထဲမွာပါတဲ့ Tags နဲ႔ Text ေတြကိုဘာသာျပန္ၿပီး browser ေပၚမွာစာမ်က္ႏွာတစ္ခုအျဖစ္ ျပန္ပံုေဖာ္ေပးပါတယ္။</p>
<p><span style="font-weight: bold;">Tag ဆိုတာဘာလဲ</span></p>
<p>Tag ဆိုတာကရိုးရိုးသာမန္ Text ေတြနဲ႔ HTML ကုဒ္ေတြကိုပိုင္းျခားေပးထားတာပါ။Tag အမ်ိဳးမ်ိဳးဟာ တစ္ခုနဲ႔တစ္ခု အသံုးျပဳရတာျခင္း ကြဲျပားၾကပါတယ္။ ကိုယ့္ရဲ႕ HTML စာမ်က္ႏွာကို Browser တစ္ခုခုနဲ႔ ၾကည့္လိုက္ရင္ Tags ေတြကိုျမင္ရမွာမဟုတ္ပါဘူး။ ဒါေပမယ့္ သူတို႔ရဲ႕ effects ေတြကအလုပ္လုပ္ပါလိမ့္မယ္။ ေယဘူယ်အားျဖင့္ေျပာရရင္ Tag ႏွစ္မ်ိဳးရွိပါတယ္။ အဖြင့္ Tag (opening tag) နဲ႔ အပိတ္ Tag (closing tag) ဆိုၿပီးေတာ့ျဖစ္ပါတယ္။ ေအာက္မွာျပထားတဲ့ ရိုးရိုးရွင္းရွင္း ဥပမာတစ္ခုကိုၾကည့္ပါ။<br />
<blockquote>&lt;b&gt;This text is bold.&lt;/b&gt;</p></blockquote>
<p>အဲဒီ &lt;b&gt; နဲ႔ &lt;/b&gt; တို႔ဟာ text ေတြကို bold ျဖစ္ေအာင္လုပ္ေပးတဲ့ Tag ျဖစ္ပါတယ္။ အဖြင့္ &lt;b&gt; နဲ႔အပိတ္ &lt;/b&gt; တို႔ၾကားမွာေရးထားတဲ့စာမွန္သမွ်ဟာ bold text အေနနဲ႔ေပၚမွာပါ။</p>
<p>HTML tags တိုင္း အဖြင့္နဲ႔အပိတ္လိုသလားဆိုေတာ့ ျခြင္းခ်က္တစ္ခ်ိဳ႕ရွိပါတယ္။ အနည္းငယ္ေသာ HTML tags တစ္ခ်ိဳ႕က အပိတ္မလိုၾကပါဘူး။ ဥပမာ &lt;br /&gt; ဆိုတဲ့ လုိင္းတစ္ေၾကာင္းေအာက္ကိုဆင္းေစတဲ့ tag ဆိုရင္တစ္ခုပဲေရးရပါတယ္။ အဖြင့္အပိတ္ ႏွစ္ခုေရးစရာမလိုပါဘူး။</p>
<p><span style="font-weight: bold;">HTML နဲ႔စေရးၾကည့္ရေအာင္</span></p>
<p>ကိုယ္တိုင္အ<br />
လြယ္ကူဆံုး page တစ္ခုကိုစေရးၾကည့္လိုက္ရင္ ပိုၿပီးနားလည္သြားပါလိမ့္မယ္။ ပထမဆံုး Notepad ကိုဖြင့္ၿပီးေတာ့ ေအာက္မွာျပထားတဲ့ ကုဒ္ေတြကိုကူးေရးပါ။</p>
<blockquote><p>&lt;html&gt;<br />&lt;head&gt;<br />&lt;title&gt;This is Title&lt;/title&gt;<br />&lt;/head&gt;<br />&lt;body&gt;<br />&lt;h1&gt;This is header 1&lt;/h1&gt;<br />This is my first HTML page.<br />&lt;br/&gt;<br />&lt;b&gt;This text is bold&lt;/b&gt;<br />&lt;br/&gt;<br />&lt;i&gt;This text is italic.&lt;/i&gt;<br />&lt;br/&gt;<br />&lt;u&gt;This text is underlined.&lt;/u&gt;<br />&lt;/body&gt;<br />&lt;/html&gt;</p></blockquote>
<p>ေရးၿပီးသြားၿပီဆိုရင္ အဲဒီဖိုင္ကို mypage.html ဆိုတဲ့ file extension အေနနဲ႔သိမ္းလိုက္ပါ။ ၿပီးရင္ေတာ့ အဲဒီဖိုင္သိမ္းထားတဲ့ေနရာ (ဥပမာ &#8211; C:\MyDocuments\mypage.html) ကိုသြားၿပီး ဖိုင္ကို double click ႏွိပ္ဖြင့္ၾကည့္လိုက္ပါ။</p>
<p><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp1.blogger.com/_CxBN9HaDL64/RmWKh93voOI/AAAAAAAAABQ/cZ2F8M8oBVI/s1600-h/html01.gif"><img style="cursor: pointer;" src="http://bp1.blogger.com/_CxBN9HaDL64/RmWKh93voOI/AAAAAAAAABQ/cZ2F8M8oBVI/s320/html01.gif" alt="" id="BLOGGER_PHOTO_ID_5072612871451418850" border="0" /></a></p>
<p>ေဟာဒီလိုျမင္ရပါလိမ့္မယ္။ HTML page ေတြဟာ &lt;html&gt; နဲ႔စၿပီး &lt;/html&gt; နဲ႔အဆံုးသတ္ပါတယ္။ &lt;head&gt; နဲ႔ &lt;/head&gt; ၾကားမွာ header information ေတြကိုေဖာ္ျပရန္ျဖစ္ပါတယ္။ ဥပမာ &#8211; ေနာက္ပိုင္းကိုယ့္ page ကို CSS (Cascading Style Sheet) ေတြနဲ႔တန္ဆာဆင္မယ္ဆိုရင္ CSS ကုဒ္ေတြကို သူတို႔ၾကားမွာေရးရမွာေပါ့။ အဲဒီ header information ေတြဟာ browser ကေနဖြင့္ၾကည့္ရင္ ျမင္ရမွာမဟုတ္ပါဘူး။ &lt;title&gt; ကေတာ့ကိုယ့္ page ရဲ႕ေခါင္းစဥ္ေပါ့။ အဲဒီေခါင္းစဥ္က browser ရဲ႕ caption မွာေပၚမွာပါ။</p>
<p><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp2.blogger.com/_CxBN9HaDL64/RmWLFN3voPI/AAAAAAAAABY/yTr_8Of7Teo/s1600-h/html02.gif"><img style="cursor: pointer;" src="http://bp2.blogger.com/_CxBN9HaDL64/RmWLFN3voPI/AAAAAAAAABY/yTr_8Of7Teo/s320/html02.gif" alt="" id="BLOGGER_PHOTO_ID_5072613477041807602" border="0" /></a></p>
<p>browser ကေနကိုယ္ျမင္ေစခ်င္တဲ့စာေတြအားလံုးကို &lt;body&gt; နဲ႔ &lt;/body&gt; ၾကားမွာေရးရမွာပါ။<br />&lt;h1&gt; ဆိုတာကေခါင္းစဥ္အတြက္ tag တစ္ခုပါ။ ေခါင္းစဥ္အတြက္ ၆ မ်ိဳးရွိပါတယ္။ &lt;h1&gt;, &lt;h2&gt;, &lt;h3&gt;, &lt;h4&gt;, &lt;h5&gt;, &lt;h6&gt; ဆိုၿပီးေတာ့ျဖစ္ပါတယ္။<br />&lt;br/&gt; ရဲ႕ရည္ရြယ္ခ်က္ကေတာ့ ေနာက္စာေၾကာင္းတစ္ေၾကာင္းကိုဆင္းေစတာပါ။<br />&lt;b&gt; ကစာသားကို bold ျဖစ္ဖို႔အတြက္<br />&lt;i&gt; ကေတာ့ စာသားေတြကုိနည္းနည္းေစာင္းေစရန္နဲ႔<br />&lt;u&gt; ဆိုတာကေတာ့ စာသားေတြရဲ႕ေအာက္က မ်ဥ္းေၾကာင္းတားဖို႔ ျဖစ္ပါတယ္။<br />အဲဒီထက္အမ်ားႀကီးရွိပါေသးတယ္။ <a href="http://www.w3schools.com/tags/default.asp">ဒီမွာ</a>သြားၿပီးေလ့လာၾကည့္ၾကပါ။</p>
<p>ခုလက္ရွိျမင္ေနၾကတဲ့ အင္တာနက္စာမ်က္ႏွာ (Website) ေတြလိုလွလွပပ ဒီဇိုင္းေတြလုပ္ခ်င္ရင္ေတာ့ HTML တစ္ခုထဲနဲ႔တင္ မရပါဘူး။ CSS (Cascading Style Sheet ) ေတြ Javascript ေတြနဲ႔ထပ္ၿပီးေပါင္းစပ္လိုက္မွ အဲဒီလိုအဆင့္ျမင့္လွပတဲ့ အင္တာနက္စာမ်က္ႏွာ (Website) ေတြကိုဖန္တီးလို႔ရပါတယ္။</p>
<p>ဒါေလာက္ဆိုရင္ HTML ကိုနည္းနည္းေတာ့ မတတ္တစ္ေခါက္ေလး သိသြားေလာက္ၿပီထင္ပါတယ္။ ဒီထက္ပိုၿပီး အမ်ားႀကီးသိခ်င္ၾကသူမ်ားကိုေတာ့ လင့္ခ္ေလးေတြေပးလိုက္ပါတယ္။ အဲဒီက Tutorial ေတြကိုထပ္ေလ့လာလိုက္ရင္ HTML ဆိုတာႀကီးကို ကၽြမ္းက်င္သြားပါလိမ့္မယ္။ မခက္ပါဘူး။ လုပ္ၾကည့္ဖို႔ပဲလိုပါတယ္။</p>
<p><a href="http://www.w3schools.com/html/default.asp">http://www.w3schools.com/html/default.asp</a><br /><a href="http://www.devx.com/projectcool/Article/17861/0/page/3">http://www.devx.com/projectcool/Article/17861/0/page/3</a><br /><a href="http://www.yourhtmlsource.com/myfirstsite/">http://www.yourhtmlsource.com/myfirstsite/</a></p>
<p>အဲဒီေနရာေတြမွာ ေလ့လာႏိုင္ပါတယ္။</p>
<p>Credit: <a href="http://www.w3schools.com/">w3schools</a>, <a href="http://www.devx.com/">devx</a>, <a href="http://www.yourhtmlsource.com/">yourhtmlsource</a></p>
<p></span></span></p>
<p>Technorati:<a href="http://technorati.com/tag/html" rel="tag" class="techtag">html</a>, <a href="http://technorati.com/tag/tutorial" rel="tag" class="techtag">tutorial</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.waiyanlin.net/2007/06/05/html-%e1%80%86%e1%80%ad%e1%80%af%e1%80%90%e1%80%ac/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
	</channel>
</rss>

