<?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>Chakkrit Tantithamthavorn&#039;s Official Personal Website &#187; html</title>
	<atom:link href="http://www.klainfo.com/tag/html/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.klainfo.com</link>
	<description></description>
	<lastBuildDate>Wed, 01 Feb 2012 13:12:31 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>[Web] HTML 5 Cheat Sheet Release Now!</title>
		<link>http://www.klainfo.com/2009/07/06/web-html-5-cheat-sheet-release-now/</link>
		<comments>http://www.klainfo.com/2009/07/06/web-html-5-cheat-sheet-release-now/#comments</comments>
		<pubDate>Mon, 06 Jul 2009 15:39:00 +0000</pubDate>
		<dc:creator>klainfo</dc:creator>
				<category><![CDATA[Web]]></category>
		<category><![CDATA[cheat sheet]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[html5]]></category>

		<guid isPermaLink="false">http://blog.klainfo.com/?p=215</guid>
		<description><![CDATA[Dowload Here : html5-cheat-sheet credits: http://www.smashingmagazine.com/2009/07/06/html-5-cheat-sheet-pdf/]]></description>
			<content:encoded><![CDATA[<p style="text-align: left;">
<h2><a href="http://klainfo.com/wp-content/uploads/2009/07/html5-cheat-sheet.pdf">Dowload Here : html5-cheat-sheet</a></h2>
<p style="text-align: left;"><img class="aligncenter size-full wp-image-217" title="preview" src="http://klainfo.com/wp-content/uploads/2009/07/preview.gif" alt="preview" width="712" height="585" /></p>
<p style="text-align: left;">credits: <a href="http://www.smashingmagazine.com/2009/07/06/html-5-cheat-sheet-pdf/" target="_blank">http://www.smashingmagazine.com/2009/07/06/html-5-cheat-sheet-pdf/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.klainfo.com/2009/07/06/web-html-5-cheat-sheet-release-now/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Enhancing your html layout!</title>
		<link>http://www.klainfo.com/2009/06/10/enhancing-your-html-layout/</link>
		<comments>http://www.klainfo.com/2009/06/10/enhancing-your-html-layout/#comments</comments>
		<pubDate>Wed, 10 Jun 2009 07:46:30 +0000</pubDate>
		<dc:creator>klainfo</dc:creator>
				<category><![CDATA[Web]]></category>
		<category><![CDATA[html]]></category>

		<guid isPermaLink="false">http://blog.klainfo.com/?p=67</guid>
		<description><![CDATA[ตามมาตรฐาน W3C ซึ่งเป็น 1 ใน web standard ใหญ่ๆที่รู้จักกัน วันนี้จะมาแนะนำ tag ใหม่ คือ abbr กับ acronym ครับ โดยลักษณะการใช้งาน จะดูคล้ายๆกัน ซึ่งพบได้บ่อยครั้งใน Wikipedia ความคล้าย : acronym และ abbr เพิ่มความหมายใ้ห้ตัวอักษรย่อต่างๆ ซึ่งทำงานเหมือนกัน เช่น [CSS = Cascading Style Sheets] เป็นต้น ความต่าง คือ acronyme อ่านออกเสียงเป็นคำๆ เช่น RADAR (เร-ดาร์) หรือ NATO(นาโต้) abbr : อ่านออกเสียงทุกตัวอักษร เช่น CSS(ซี-เอส-เอส) หรือ URI(ยู-อาร์-ไอ) ตัวอย่าง 1 2 &#60;acronym title=&#34;Radio [...]]]></description>
			<content:encoded><![CDATA[<p>ตามมาตรฐาน W3C ซึ่งเป็น 1 ใน web standard ใหญ่ๆที่รู้จักกัน</p>
<p>วันนี้จะมาแนะนำ tag ใหม่ คือ abbr กับ acronym ครับ</p>
<p>โดยลักษณะการใช้งาน จะดูคล้ายๆกัน ซึ่งพบได้บ่อยครั้งใน Wikipedia</p>
<blockquote><p><strong>ความคล้าย</strong> : acronym และ abbr เพิ่มความหมายใ้ห้ตัวอักษรย่อต่างๆ ซึ่งทำงานเหมือนกัน<br />
เช่น [CSS = Cascading Style Sheets] เป็นต้น</p>
<p><strong>ความต่าง</strong> คือ<br />
acronyme อ่านออกเสียงเป็นคำๆ เช่น <span style="color:#ff0000;">RA</span><span style="color:#0000ff;">DAR</span> (เร-ดาร์) หรือ <span style="color:#ff0000;">NA</span><span style="color:#0000ff;">TO</span>(นาโต้)<br />
abbr : อ่านออกเสียงทุกตัวอักษร เช่น <span style="color:#ff0000;">C</span><span style="color:#0000ff;">S</span><span style="color:#008000;">S</span>(ซี-เอส-<span style="color:#008000;">เอส</span>) หรือ <span style="color:#ff0000;">U</span><span style="color:#0000ff;">R</span><span style="color:#008000;">I</span>(<span style="color:#ff0000;">ยู</span>-<span style="color:#0000ff;">อาร์</span>-<span style="color:#008000;">ไอ</span>)</p></blockquote>
<p>ตัวอย่าง</p>
<div class="wp_syntax">
<table>
<tr>
<td class="line_numbers">
<pre>1
2
</pre>
</td>
<td class="code">
<pre class="html" style="font-family:monospace;">&lt;acronym title=&quot;Radio Detecting And Ranging&quot;&gt;radar&lt;/acronym&gt;
&lt;abbr title=&quot;Cascading Style Sheets&quot;&gt;CSS&lt;/abbr&gt;</pre>
</td>
</tr>
</table>
</div>
<p>ผลลัพท์ได้เป็นดังนี้</p>
<div class="wp_syntax">
<table>
<tr>
<td class="line_numbers">
<pre>1
2
3
</pre>
</td>
<td class="code">
<pre class="html" style="font-family:monospace;">&lt;abbr title=&quot;Really Simple Syndication&quot;&gt;RSS&lt;/abbr&gt;
&lt;abbr title=&quot;Uniform Resource Identifier&quot;&gt;URI&lt;/abbr&gt;
&lt;abbr title=&quot;Cascading Style Sheets&quot;&gt;CSS&lt;/abbr&gt;</pre>
</td>
</tr>
</table>
</div>
<p>โดยส่วนใหญ่แล้ว มักจะใช้ abbr ซะมากกว่า และแน่นอน IE6 ไม่สามารถแสดงผลได้อีกเช่นเคย แต่ FF ทำงานได้ปกติ (==&#8217;)</p>
<p>จึงมีวิธีแก้ไขดังนี้</p>
<p><strong>1.) ใช้ span เข้ามาช่วย</strong></p>
<div class="wp_syntax">
<table>
<tr>
<td class="line_numbers">
<pre>1
</pre>
</td>
<td class="code">
<pre class="html" style="font-family:monospace;">&lt;abbr title=&quot;Cascading Style Sheets&quot;&gt;&lt;span class=&quot;abbr&quot; title=&quot;Cascading Style Sheets&quot;&gt;CSS&lt;/span&gt;&lt;/abbr&gt;</pre>
</td>
</tr>
</table>
</div>
<p><strong>2.) ใช้ javascript</strong></p>
<div class="wp_syntax">
<table>
<tr>
<td class="line_numbers">
<pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
</pre>
</td>
<td class="code">
<pre class="html" style="font-family:monospace;">&lt;script type=&quot;text/javascript&quot;&gt;
     function styleAbbr() {
          var oldBodyText, newBodyText, reg
          if (isIE) {
               oldBodyText = document.body.innerHTML;
               reg = /&lt;ABBR([^&gt;]*)&gt;([^&lt;]*)&lt;\/ABBR&gt;/g;
               newBodyText = oldBodyText.replace(reg, '&lt;ABBR $1&gt;&lt;SPAN class=\&quot;abbr\&quot; $1&gt;$2&lt;/SPAN&gt;&lt;/ABBR&gt;');
               document.body.innerHTML = newBodyText;
          }
     }
     window.onload = function(){
          styleAbbr()
     };
     isIE = (document.all) ? true:false;
&lt;/script&gt;</pre>
</td>
</tr>
</table>
</div>
<p>script นี้จะใช้หลักการของ regular expression มาแก้ปัญหา</p>
<p>วิธีใช้ แค่ copy แปะไว้ที่ header แค่นั้นครับ แล้ว javascript นี้จะเรียกทั้งเพจมาแก้เอง</p></blockquote>
<p>เพียงเท่าที่ ก็สามารถแสดงผลลัพท์ได้ทั้ง IE และ Firefox แล้วครับ</p>
<p>ถามว่า ทำไมต้องใช้ tag อะไรแบบนี้ด้วยหละ ไม่ได้ใช้ก็ไม่มีใครว่าครับ แต่ถ้ามี ก็เหมือนยกระดับเว็บของคุณเพิ่มมากขึ้น(search engine friendly) ครับ</p>
]]></content:encoded>
			<wfw:commentRss>http://www.klainfo.com/2009/06/10/enhancing-your-html-layout/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How different between id and class?</title>
		<link>http://www.klainfo.com/2009/06/10/how-different-between-id-and-class/</link>
		<comments>http://www.klainfo.com/2009/06/10/how-different-between-id-and-class/#comments</comments>
		<pubDate>Wed, 10 Jun 2009 07:45:30 +0000</pubDate>
		<dc:creator>klainfo</dc:creator>
				<category><![CDATA[Web]]></category>
		<category><![CDATA[html]]></category>

		<guid isPermaLink="false">http://blog.klainfo.com/?p=65</guid>
		<description><![CDATA[หลายๆคนที่เขียน CSS ไปซักพัก แล้วโดนไซโคให้นิยมชมชอบ tag div เป็นชีวิตจิตใจ ^^ อาจจะสงสัยกันว่า แล้ว id กับ class นั้น แตกต่างกันอย่างไร ผมเองก็เคยสงสัยครับ ความแตกต่างมันอยู่ตรงที่ ID Once times in your html layout. มีใช้แค่ครั้งเดียวใน 1 page เช่น header content sidebar footer etc. วิธีใช้ เช่น &#60;div id=&#8221;header&#8221;&#62;&#60;/div&#62; เป็นต้น ID is the first priority. เมื่อมี ID กับ CLASS อยู่พร้อมกัน เช่น &#60;div id=&#8221;aaa&#8221; class&#8221;bbb&#8221;&#62; CSS จะเรียกใช้ id [...]]]></description>
			<content:encoded><![CDATA[<p>หลายๆคนที่เขียน CSS ไปซักพัก แล้วโดนไซโคให้นิยมชมชอบ tag div เป็นชีวิตจิตใจ ^^ อาจจะสงสัยกันว่า แล้ว id กับ class นั้น แตกต่างกันอย่างไร ผมเองก็เคยสงสัยครับ</p>
<p>ความแตกต่างมันอยู่ตรงที่</p>
<p><strong>ID</strong></p>
<ul>
<li><strong>Once times in your html layout.</strong><br />
มีใช้แค่ครั้งเดียวใน 1 page เช่น header content sidebar footer etc.<br />
วิธีใช้ เช่น &lt;div id=&#8221;header&#8221;&gt;&lt;/div&gt; เป็นต้น</li>
<li><strong>ID is the first priority.</strong><br />
เมื่อมี ID กับ CLASS อยู่พร้อมกัน เช่น &lt;div id=&#8221;aaa&#8221; class&#8221;bbb&#8221;&gt;<br />
CSS จะเรียกใช้ id เป็นหลัก หมายถึงจะไปเรียกใช้ #aaa</li>
</ul>
<p><strong>CLASS</strong></p>
<ul>
<li><strong>Several times in your html layout.<br />
</strong>ใช้หลายครั้งใน 1 page เช่น menu link<br />
วิธีใช้ เช่น &lt;div class=&#8221;menu&#8221;&gt;&lt;/div&gt;</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.klainfo.com/2009/06/10/how-different-between-id-and-class/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Served from: www.klainfo.com @ 2012-02-06 19:34:39 -->
