<?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>Design Gala &#187; HTML</title>
	<atom:link href="http://designgala.com/tag/html/feed/" rel="self" type="application/rss+xml" />
	<link>http://designgala.com</link>
	<description>Web Usability, Web Technology, User Experience</description>
	<lastBuildDate>Thu, 26 Aug 2010 11:13:17 +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>Basic jQuery Tutorial: Add Remove Attribute</title>
		<link>http://designgala.com/basic-jquery-tutorial-add-remove-attribute/</link>
		<comments>http://designgala.com/basic-jquery-tutorial-add-remove-attribute/#comments</comments>
		<pubDate>Thu, 04 Mar 2010 14:10:16 +0000</pubDate>
		<dc:creator>Mukesh Chapagain</dc:creator>
				<category><![CDATA[jQuery]]></category>
		<category><![CDATA[attribute]]></category>
		<category><![CDATA[basic]]></category>
		<category><![CDATA[element]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://www.designgala.com/?p=2018</guid>
		<description><![CDATA[In this article, I will be showing you how to add or remove HTML attributes. HTML attributes like title, href, src, etc. For example:- &#60;img src=&#34;abc.jpg&#34; class=&#34;test&#34; alt=&#34;abc&#34; /&#62; Here: src, class, alt, title are attributes. You can add attributes like above through jQuery. You can also remove the attributes with jQuery. VIEW DEMO Here [...]]]></description>
			<content:encoded><![CDATA[
<div class="topsy_widget_data topsy_theme_jade" style="float: right;float: right;margin:-30px 0 5px 2px; background: url(data:,%7B%20%22url%22%3A%20%22http%253A%252F%252Fdesigngala.com%252Fbasic-jquery-tutorial-add-remove-attribute%252F%22%2C%20%22shorturl%22%3A%20%22http%3A%2F%2Fis.gd%2F9Gy9M%22%2C%20%22style%22%3A%20%22small%22%2C%20%22title%22%3A%20%22Basic%20jQuery%20Tutorial%3A%20Add%20Remove%20Attribute%22%20%7D);"></div>
<p><a href="http://www.designgala.com/wp-content/uploads/2010/02/jquery-logo.png"><img src="http://www.designgala.com/wp-content/uploads/2010/02/jquery-logo.png" alt="" width="268" height="268" class="alignleft size-full wp-image-2007" /></a></p>
<p>In this article, I will be showing you how to add or remove HTML attributes. HTML attributes like title, href, src, etc. For example:-</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">&lt;img src=&quot;abc.jpg&quot; class=&quot;test&quot; alt=&quot;abc&quot; /&gt;</pre></div></div>

<p>Here: src, class, alt, title are attributes. </p>
<p>You can add attributes like above through jQuery. You can also remove the attributes with jQuery. <span id="more-2018"></span></p>
<p><a href="http://www.cssbreak.com/examples/add-remove-attribute/">VIEW DEMO</a> </p>
<p>Here is the HTML source. This contains a link with id &#8216;myLink&#8217; and Add and Remove buttons with id &#8216;add&#8217; and &#8216;remove&#8217; respectively.</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #339933;">&lt;</span>div <span style="color: #003366; font-weight: bold;">class</span><span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;content&quot;</span><span style="color: #339933;">&gt;</span>
<span style="color: #339933;">&lt;</span>a id<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;myLink&quot;</span> href<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;#&quot;</span><span style="color: #339933;">&gt;</span>This <span style="color: #000066; font-weight: bold;">is</span> my LINK<span style="color: #339933;">&lt;/</span>a<span style="color: #339933;">&gt;</span>
<span style="color: #339933;">&lt;/</span>div<span style="color: #339933;">&gt;</span>
&nbsp;
<span style="color: #339933;">&lt;</span>button<span style="color: #339933;">&gt;</span>Add<span style="color: #339933;">&lt;/</span>button<span style="color: #339933;">&gt;</span>
<span style="color: #339933;">&lt;</span>button<span style="color: #339933;">&gt;</span>Remove<span style="color: #339933;">&lt;/</span>button<span style="color: #339933;">&gt;</span></pre></div></div>

<p><strong>Adding Attribute</strong></p>
<p>The following function works as follows:<br />
- myLink is the id of a href link<br />
- add is the id of add button<br />
- when add button is clicked, some style (css) is added to the link with id &#8216;myLink&#8217;<br />
- after that, &#8216;title&#8217; attribute is added to link with id &#8216;myLink&#8217;</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#add&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">click</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
	$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#myLink&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">css</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span><span style="color: #3366CC;">&quot;font-weight&quot;</span><span style="color: #339933;">:</span><span style="color: #3366CC;">&quot;bold&quot;</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">&quot;color&quot;</span><span style="color: #339933;">:</span><span style="color: #3366CC;">&quot;red&quot;</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">&quot;text-decoration&quot;</span><span style="color: #339933;">:</span><span style="color: #3366CC;">&quot;line-through&quot;</span><span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#myLink&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">attr</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;title&quot;</span><span style="color: #339933;">,</span><span style="color: #3366CC;">&quot;My Link Title&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p><strong>Removing Attribute</strong></p>
<p>The following function works as follows:<br />
- there is a button with id &#8216;remove&#8217;<br />
- when remove button is clicked, the following things happen:<br />
	- &#8216;style&#8217; attribute is removed from the link with id &#8216;myLink&#8217;<br />
	- &#8216;title&#8217; attribute is removed from the link with id &#8216;myLink&#8217;</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#remove&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">click</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
	$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#myLink&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">removeAttr</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;style&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#myLink&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">removeAttr</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;title&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p><a href="http://www.cssbreak.com/examples/add-remove-attribute/">VIEW DEMO</a></p>
<p>Cheers,</p>

<img src="http://designgala.com/?ak_action=api_record_view&id=2018&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://designgala.com/basic-jquery-tutorial-add-remove-attribute/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Why Follow Web Standards?</title>
		<link>http://designgala.com/why-follow-web-standards/</link>
		<comments>http://designgala.com/why-follow-web-standards/#comments</comments>
		<pubDate>Thu, 15 Nov 2007 20:37:16 +0000</pubDate>
		<dc:creator>Design Gala</dc:creator>
				<category><![CDATA[Web Standards]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[Web Standard]]></category>

		<guid isPermaLink="false">http://www.designgala.com/?p=10</guid>
		<description><![CDATA[While discussing about Web Standards, most web developer's cliche is "Who Cares Standards?", "Too Difficult to understand, let's forget" and "It worked anyway".]]></description>
			<content:encoded><![CDATA[
<div class="topsy_widget_data topsy_theme_jade" style="float: right;float: right;margin:-30px 0 5px 2px; background: url(data:,%7B%20%22url%22%3A%20%22http%253A%252F%252Fdesigngala.com%252Fwhy-follow-web-standards%252F%22%2C%20%22shorturl%22%3A%20%22http%3A%2F%2Fis.gd%2F7AGWJ%22%2C%20%22style%22%3A%20%22small%22%2C%20%22title%22%3A%20%22Why%20Follow%20Web%20Standards%3F%22%20%7D);"></div>
<p><span class="firstletter"><span>W</span></span>hile discussing about Web Standards, most web developer&#8217;s cliche is &#8220;Who Cares Standards?&#8221;, &#8220;Too Difficult to understand, let&#8217;s forget&#8221; and &#8220;It worked anyway&#8221;.</p>
<p>Always be listed on side to follow web standards. It&#8217;s easy to build a website with good looking graphics and best functionality but why they just don&#8217;t add up a little effort to make a site follow standards. We must remember that, we are targeting visitors of site, and pages should be accessible irrespective of OS, Browser used by visitor. Using web standards offer much benefit to us.</p>
<ul>
<li>Separation of HTML semantics (structure) from design confirms better accessibility.</li>
<li>Pages sizes are less and results in quick downloads. Browsers render pages faster when pages confirm standards.</li>
<li>Following standard ensures that documents will be compatible in future browsers. There is no risk of browser not understanding your documents. Interpretation and rendering is easy for browser.</li>
<li>Different CSS files can be created and adopted accordingly. Adaptation of document to print media, mobile devices is easy just by creating alternative style sheets and linking to particular CSS file.</li>
</ul>
<p>The bottom line is: use web standards. It&#8217;s the future of web. If you are new and haven&#8217;t yet followed then start from this point upwards. And, after all this; its you to choose and follow and how you perceives.</p>

<img src="http://designgala.com/?ak_action=api_record_view&id=10&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://designgala.com/why-follow-web-standards/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
