<?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>Kashit &#187; Web Standards</title>
	<atom:link href="http://www.kashit.org/channels/web-standards/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.kashit.org</link>
	<description>home to Ehsan Quddusi</description>
	<lastBuildDate>Sun, 28 Feb 2010 18:43:31 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>HTML 5 &#8211; What&#8217;s new</title>
		<link>http://www.kashit.org/general-web/html-5-whats-new/</link>
		<comments>http://www.kashit.org/general-web/html-5-whats-new/#comments</comments>
		<pubDate>Wed, 05 Mar 2008 16:36:52 +0000</pubDate>
		<dc:creator>Ehsan Quddusi</dc:creator>
				<category><![CDATA[General Web]]></category>
		<category><![CDATA[Web Standards]]></category>
		<category><![CDATA[canvas]]></category>
		<category><![CDATA[datagrid]]></category>
		<category><![CDATA[element]]></category>
		<category><![CDATA[figure]]></category>
		<category><![CDATA[footer]]></category>
		<category><![CDATA[html5]]></category>
		<category><![CDATA[mark]]></category>
		<category><![CDATA[nav]]></category>
		<category><![CDATA[nl]]></category>

		<guid isPermaLink="false">http://new.kashit.org/?p=81</guid>
		<description><![CDATA[<span class="dropcap">H</span>TML 5 is planned to be the fifth major revision of the core language of the World Wide Web, HTML. In this version, new features are introduced to help web application authors, new elements are introduced based on research into prevailing authoring practices, and special attention has been given to defining clear conformance criteria for user agents in an effort to improve interoperability. It is an incremental step forward rather than a bold step as compared with XHTML 2.0 that is coming and which is intended to create an architecture that will become the host language to many other W3C technologies. The ideas behind HTML 5 were pioneered in 2004 by the Web Hypertext Application Technology Working Group (WHATWG). HTML 5 was adopted as the starting point of the work of the new HTML working group of the W3C in 2007. The HTML working group has published the First Public Working Draft of the specification on 22nd January 2008. HTML 5 should be flexible to handle incorrect syntax in contract to XHTML where the browser must refuse to render the page at all even if there is just one illegal character or missing close tag. HTML 5 is designed such that the old HTML 4 browsers will escape the new HTML 5 tags or constructs.]]></description>
			<content:encoded><![CDATA[<p><span class="dropcap">H</span>TML 5 is planned to be the fifth major revision of the core language of the World Wide Web, HTML. In this version, new features are introduced to help web application authors, new elements are introduced based on research into prevailing authoring practices, and special attention has been given to defining clear conformance criteria for user agents in an effort to improve interoperability. It is an incremental step forward rather than a bold step as compared with XHTML 2.0 that is coming and which is intended to create an architecture that will become the host language to many other W3C technologies. The ideas behind HTML 5 were pioneered in 2004 by the Web Hypertext Application Technology Working Group (WHATWG). HTML 5 was adopted as the starting point of the work of the new HTML working group of the W3C in 2007. The HTML working group has published the First Public Working Draft of the specification on 22nd January 2008. HTML 5 should be flexible to handle incorrect syntax in contract to XHTML where the browser must refuse to render the page at all even if there is just one illegal character or missing close tag. HTML 5 is designed such that the old HTML 4 browsers will escape the new HTML 5 tags or constructs.</p>
<h4><span style="color: #003366;"> </span>New Section Tags</h4>
<p>HTML 5 introduces many new elements that partition webpage content into sections. These partitions should help search engines and other assistive technologies to better process the page. The idea of sections is cool and it is a great relief to the UI designers to better organised their code. Block levels elements like <code>header</code>, <code>section</code>, <code>footer</code> &amp; <code>nav</code> have been added to maximise the production of web application developers. The beauty of sections can be well understood from the above new tags that have been included. Like we have now <code>nav</code> for structuring of navigation links and header for the header elements. These elements are similar to div or span tags except they are having some meaning and context in which they are used.<br />
<code><br />
&lt;h3 id="blog-title"&gt;My Blog Name&lt;/h3&gt;<br />
&lt;p id="blog-description"&gt;Hello World!&lt;/p&gt;<br />
In the same way, you can have<br />
&lt;nav&gt;&lt;/nav&gt;<br />
&lt;ul class="nav"&gt;<br />
&lt;li&gt;Home&lt;/li&gt;<br />
&lt;/ul&gt;<br />
</code></p>
<h4>WYSIWYG Signature</h4>
<p>Documents created with WYSIWYG editors should include a signature in the head of the document, so that the browser can know the generator and will render the page accordingly.<br />
<code><br />
&lt;meta name="generator" content="Sample Editor 1.0 (WYSIWYG editor)" /&gt;<br />
</code></p>
<h4><span style="color: #003366;"> </span>New Block level Elements</h4>
<h5>aside element</h5>
<p>The <code>aside</code> element represents a note, a tip, a sidebar, a pullquote, a parenthetical remark, or something that&#8217;s just outside the main flow of the narrative.<br />
<code><br />
&lt;aside&gt;<br />
&lt;h3&gt;Aside Representation&lt;/h3&gt;<br />
This is the representation of aside element.<br />
&lt;/aside&gt;<br />
</code></p>
<h5>dialog element</h5>
<p>The dialog element represents conversation. It contains <code>dt</code> elements which represent the speaker and <code>dd</code> elements which represents the speakers quotes. This gives reasonable display even in legacy browsers.<br />
<code><br />
&lt;dialog&gt;<br />
&lt;dt&gt; Costello<br />
&lt;/dt&gt;<br />
&lt;dd&gt; Look, you gotta first baseman?<br />
&lt;/dd&gt;<br />
&lt;dt&gt; Abbott<br />
&lt;/dt&gt;<br />
&lt;dd&gt; Certainly.<br />
&lt;/dd&gt;<br />
&lt;dt&gt; Costello<br />
&lt;/dt&gt;<br />
&lt;dd&gt; Who's playing first?<br />
&lt;/dd&gt;<br />
&lt;dt&gt; Abbott<br />
&lt;/dt&gt;<br />
&lt;dd&gt; That's right.<br />
&lt;/dd&gt;<br />
&lt;dt&gt; Costello<br />
&lt;/dt&gt;<br />
&lt;dd&gt; When you pay off the first baseman every month, who gets the money?<br />
&lt;/dd&gt;<br />
&lt;dt&gt; Abbott<br />
&lt;/dt&gt;<br />
&lt;dd&gt; Every dollar of it.<br />
&lt;/dd&gt;<br />
&lt;/dialog&gt;<br />
</code></p>
<h5>figure element</h5>
<p><code>figure</code> element is a cool addition to HTML 5. This is a block level element that combines image and its caption. Until this version, HTML was lacking the feature to add captions to the images. The figure element with a child legend element can be used to caption images. For example:<br />
<code><br />
&lt;figure&gt;<br />
&lt;img src="kashit.jpg" alt="Photo: J. Smith" /&gt;Credit: Kashit, 2007<br />
&lt;/figure&gt;<br />
</code></p>
<h4>New Inline Semantic Elements</h4>
<h5>mark element</h5>
<p>As the name suggests, the mark element &lt;m&gt; is meant for marking the text or highlighting the text. As you will be aware of google&#8217;s searched keyword highlighting on the pages. This will be used for highlighting the searched keywords inside a page.<br />
This is the test for &lt;m&gt;marked&lt;/m&gt; text.</p>
<h5>time element</h5>
<p>The time element represents time of a specific moment such as 20 July, 2008, 5:30 PM.<br />
This is the example of &lt;time&gt;5:35 PM, July 25, 2007&lt;/time&gt;<br />
This is a very important update / feature as it will help browsers to recognize the times very easily. It will also help in better search engine optimization and calendar functions.</p>
<h5>progress element</h5>
<p>This is similar to the progress bar that is present in today&#8217;s GUI showing progress of a particular process or activity. The progress element is very useful in showing the download or upload process with the aid of some scripting language. Its usage is like this :<br />
Downloaded:<code>&lt;progress value="1534602" max="4603807"&gt;&lt;/progress&gt;</code><br />
It has value and max as its attributes which represent the current state of process and the total amount of process to be completed respectively.</p>
<h4>Enhancements to input element</h4>
<p>input element has received a good response from W3C. New types have been added to input element for better differntiation of input text. The new types are :<br />
<code>datetime, datetime-local, date, month, week, time, number, range, email, url</code><br />
The idea of these new types is that the user agent can provide the user interface, such as a calendar date picker or integration with the user&#8217;s address book and submit a defined format to the server. It gives the user a better experience as his input is checked before sending it to the server meaning there is less time to wait for feedback.</p>
<h4>datagrid element</h4>
<p>According to W3C specifications for HTML 5, <code>datagrid</code> represents an interactive representation of a tree list or tabular data. It&#8217;s intended for trees, lists, and tables that can be updated by both the user and scripts. By contrast, traditional tables are mostly intended for static data.<br />
A <code>datagrid</code> gets its initial data from its contents: a <code>table</code>, <code>select</code>, or other group of HTML elements.<br />
<code><br />
&lt;datagrid&gt;<br />
&lt;table&gt;&lt;tbody&gt;<br />
&lt;tr&gt;<br />
&lt;td&gt;Jones&lt;/td&gt;<br />
&lt;td&gt;Allison&lt;/td&gt;<br />
&lt;td&gt;A-&lt;/td&gt;<br />
&lt;td&gt;B+&lt;/td&gt;<br />
&lt;td&gt;A&lt;/td&gt;<br />
&lt;/tr&gt;<br />
&lt;tr&gt;<br />
&lt;td&gt;Smith&lt;/td&gt;<br />
&lt;td&gt;Johnny&lt;/td&gt;<br />
&lt;td&gt;A&lt;/td&gt;<br />
&lt;td&gt;C+&lt;/td&gt;<br />
&lt;td&gt;A&lt;/td&gt;<br />
&lt;/tr&gt;<br />
&lt;tr&gt;<br />
&lt;td&gt;Willis&lt;/td&gt;<br />
&lt;td&gt;Sydney&lt;/td&gt;<br />
&lt;td&gt;C-&lt;/td&gt;<br />
&lt;td&gt;D&lt;/td&gt;<br />
&lt;td&gt;F&lt;/td&gt;<br />
&lt;/tr&gt;<br />
&lt;tr&gt;<br />
&lt;td&gt;Wilson&lt;/td&gt;<br />
&lt;td&gt;Frank&lt;/td&gt;<br />
&lt;td&gt;B-&lt;/td&gt;<br />
&lt;td&gt;B+&lt;/td&gt;<br />
&lt;td&gt;A&lt;/td&gt;<br />
&lt;/tr&gt;<br />
&lt;/tbody&gt;&lt;/table&gt;<br />
&lt;/datagrid&gt;<br />
</code><br />
What distinguishes this from a regular table is that the user can select rows, columns, and cells; collapse rows, columns, and cells; edit cells; delete rows, columns, and cells; sort the grid; and otherwise interact with the data directly in the browser on the client. The JavaScript code monitors the updates.</p>
<h4>Embedded Media</h4>
<p>HTML 5 will contain two new elements for media. New <code>audio</code> &amp; <code>video</code> elements will make a uniform way of embedding media inside webpages. As today different vendors are using different media types on their sites (like Microsoft uses Windows Media, Apple uses Quicktime, Adobe uses Flash), thus resulting in diversity in the embedding of media. These elements may contain a way for better searching and accessible to blind or deaf users. Their usage is :<br />
<code><br />
&lt;audio autoplay="autoplay"&gt;</p>
<p>This is the podcast on DrupalWelcome to Drupal podcast...<br />
&lt;/audio&gt;<br />
</code><br />
Similarly for video the usage will be same with support of deaf &amp; blind people.<br />
<code><br />
&lt;video&gt;<br />
This is the descrption of movie...<br />
&lt;/video&gt;<br />
</code><br />
Whether any one format and codec will be preferred is still under debate. Probably Ogg Theora support at least will be strongly recommended, if not required.</p>
<h4>Conclusion</h4>
<p>HTML 5 is part of the future of the Web and is a reaction to the slow progress made by W3C in delivering replacement to HTML 4. Its new elements enable clearer, simpler markup that makes pages more obvious. Div and span still have their places, but those places are much more restricted than they used to be.<br />
Although not all browsers will support these new elements at first, the same has been true for most elements introduced after HTML was first invented: img, table, object, and many more. Support will come with time. In the meantime, HTML&#8217;s must-ignore behavior for unrecognized elements means that users with legacy browsers will still be able to read HTML 5 pages. They can do so today. Users with more modern browsers will get an enhanced experience, but no one will be left out. HTML 5 restores some of the excitement of the early days when Netscape, Microsoft, and others were introducing new elements every other week. At the same time, it takes a much more careful approach to defining these elements so that everyone can use them interoperably. The future looks bright.</p>
<h4>Further reading</h4>
<p>Latest version of W3c draft for HTML 5<br />
Ogg &#8211; The next generation open video format<br />
Conversation with HTML 5 team</p>
]]></content:encoded>
			<wfw:commentRss>http://www.kashit.org/general-web/html-5-whats-new/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CSS Best Practices</title>
		<link>http://www.kashit.org/design/css-best-practices/</link>
		<comments>http://www.kashit.org/design/css-best-practices/#comments</comments>
		<pubDate>Sat, 09 Feb 2008 09:40:18 +0000</pubDate>
		<dc:creator>Ehsan Quddusi</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Design]]></category>
		<category><![CDATA[Web Standards]]></category>
		<category><![CDATA[browser reset]]></category>
		<category><![CDATA[CSS Best Practices]]></category>
		<category><![CDATA[css hacks]]></category>
		<category><![CDATA[IE Conditional]]></category>
		<category><![CDATA[shorthand css]]></category>

		<guid isPermaLink="false">http://new.kashit.org/?p=48</guid>
		<description><![CDATA[<span class="dropcap">C</span>SS Best Practices is the topic that I had been planning to write on for months. As CSS is the order of the day as far as web related UI is concerned, more people are moving to it. CSS isn't always easy to deal with. CSS coding can sometimes become a nightmare, particularly if you're not sure which selectors are applied to document elements. CSS Best Practices covers some important and easy to remember tricks and tips to better manage, organise and develop your CSS Snippets.]]></description>
			<content:encoded><![CDATA[<p><span class="dropcap">C</span>SS Best Practices is the topic that I had been planning to write on for months. As CSS is the order of the day as far as web related UI is concerned, more people are moving to it. CSS isn&#8217;t always easy to deal with. CSS coding can sometimes become a nightmare, particularly if you&#8217;re not sure which selectors are applied to document elements. CSS Best Practices covers some important and easy to remember tricks and tips to better manage, organise and develop your CSS Snippets.</p>
<h4>Use a browser reset</h4>
<p>One of the most common mistakes that designers fall victim to when it comes to CSS is not resetting their browser defaults. This leads to inconsistencies in the appearance of your desing across different browsers. So before doing anything else, when coding a website, you should reset the styling. You can use a simple reset with the universal selector like this<br />
<code><br />
* { margin:0;padding:0;}<br />
</code><br />
But using the universal selector is sometimes a bad idea as it is very heavy on the rendering agent to apply rules to every single element in the document.</p>
<p>One of the most popular browser resets is of <a href="http://meyerweb.com/eric/thoughts/2007/05/01/reset-reloaded/" target="_blank">CSS Reset</a> by Eric Meyer. As Meyer says, “the styles should list all the actual elements to be reset and exactly how they should be reset.”</p>
<p>Another Browser Reset Library is Yahoo! UI Library: <a href="http://developer.yahoo.com/yui/reset/" target="_blank">Reset CSS</a>. It removes and neutralizes the default styling of html elements providing a foundation upon which you can explicity declare your extentions.</p>
<p>Another very useful CSS reset is <a href="http://warpspire.com/features/css-frameworks/">CSS Global Styles Reset</a> by Kyle Neath. A simple CSS Reset with some additional classes for better debugging.</p>
<h4>Size text without using pixels</h4>
<p>Web Designing best principles is to enable a site to withstand a user enlarging text and setting absolute text sizes is not a good practice. Instead we can size our text relative to the browser. Standard browser font size is 1em which is equal to 16px. A little web designer trick works around the issue and resets the font sizes for the entire site so that 1em is equal to 10 px.<br />
<code><br />
body { font-size:62.5%; }<br />
</code><br />
Simply throwing the font-size to 62.5% for the entire site does the trick. Now you can use em instead of pixels.</p>
<h4>Organise your CSS Code</h4>
<p>Organising your CSS code helps you with future maintainability of your site. You should make independent style sheets for different purposes and then linke them in your master stylesheet. Like you should maintain your typographic styles and structure selectors independently in different stylesheets and then link them together in your master stylesheet.<br />
<code><br />
@import url("reset.css")<br />
@import url("structure.css")<br />
@import url("typography.css")<br />
</code></p>
<h4>Make your code easy to read</h4>
<p>While scanning through CSS, I came across a very nicely separated CSS coded probably by Rundle. It looked something like this:<br />
<code><br />
h1 {}<br />
h1#title { font-size:2em; }</code></p>
<p>div {}<br />
div#error { color:#eee; }</p>
<p>This technique is very useful if you&#8217;re sharing code or working on a large site where you are using the same div tag in multiple places.</p>
<h4>Document your code</h4>
<p>This might be common sense to some of you but sometimes I look at CSS and it&#8217;s not documented at all. It is always a good practice to document your code or atleast provide a separate heading for a part of code as it makes working with code months or years later easier.<br />
<code><br />
/**********************************/<br />
/* Primary Navigation - Top Links */<br />
/*********************************/<br />
#nav {<br />
border:1px solid #eee;<br />
margin:10px auto;<br />
padding:5px;<br />
}</code></p>
<p>/***************/<br />
/* Search Box */<br />
/**************/<br />
#search-box {<br />
position:absolute;<br />
top:30px;<br />
left:30px;<br />
}</p>
<h4>Keep containers to minimum</h4>
<p>Avoid using too many Divs as it makes your document too much complex and tougher to handle. Avoid block level tags as much as possible and consider all options before using DIVs. New Developers to CSS often mistake DIVs for table cells and maximise their use to achieve the layout. Some people even style their headings with DIVs. Try using small tags or inline tags for goodness sake.</p>
<h4>Use Shorthand CSS</h4>
<p>Work smarter, not harder with CSS. You can wrap multiple properties within a single declaration by using special syntax. Avoid unnecessary properties as it directly effects your troubleshooting efforts.</p>
<h5>Like instead of writing</h5>
<p><code>margin-left:2px;<br />
margin-top:3px;<br />
margin-right:4px;<br />
margin-bottom:5px;<br />
</code></p>
<h5>You can write</h5>
<p><code>margin:3px 4px 5px 2px;<br />
</code><br />
Similarly we can use shorthand for border, background, padding, font and other properties.</p>
<h4>Specify Units</h4>
<p>Always specify units for the Property values unless it is 0. This a very common mistake among CSS beginners. In HTML you can get away with this but in CSS all length values should have a unit. While there&#8217;s no wrong in specifying a unit for 0 value, but for me it&#8217;s only a wastage of space.</p>
<pre class="css">padding:2px 3px 0 10px;</pre>
<h4>Working with Colors</h4>
<p>In hexadecimal notation, a color is represented by three pairs of hexadecimal digits. You can write a color more efficiently by omitting every second digit like this.</p>
<p><code>#ffffff</code> can be written as <code>#fff</code></p>
<p>Similarly <code>#ff3366</code> can be written as <code>#f36</code></p>
<p>Another color related tip is that you can specify web safe colors by using only digits that are multiples of 3 for the red, green and blue.</p>
<h4>Don&#8217;t redeclare inherited values</h4>
<p>The values of many properties are inherited by any descendants of the element that you specify the property for. So there is no fun of redeclaring those properties again and again. Some of the commonly inherited properties are of font and color.<br />
<code><br />
div { font-size:2em;color:#ef321d; }<br />
div.hello { font-size:2em;color:#ef23ef; }<br />
</code></p>
<h5>can be written as</h5>
<p><code>div { font-size:2em;color:#ef321d; }<br />
div.hello { color:#ef23ef; }<br />
</code></p>
<h4>Multiple Classes</h4>
<p>You can assign multiple classes to a single HTML element. This allows you to write several rules that define different properties and only apply them as needed. The multiple classes (assuming .head &amp; .head-about) can be applied to a single element like this.<br />
<code><br />
&lt;div class="head head-about"&gt;This is test for multiple classes&lt;/div&gt;<br />
</code></p>
<h4>Minimise CSS Hacks</h4>
<p>Hacks are the tricks, usually non-standard, to overcome some browser limitations. Don&#8217;t use hacks unless it is a known and documented bug as it makes the future maintenance of the code very difficult in absence of proper documentation and standard coding design.</p>
<h4>Define pseudo classes for links in the LoVe/HAte order</h4>
<p>Link, Visited, Hover &amp; Active, as the above represents. You should define your pseudo classes in this order<br />
<code><br />
a:link { color: blue; }<br />
a:visited { color: purple; }<br />
a:hover { color: purple; }<br />
a:active { color: red; }<br />
</code></p>
<h4>Define generic font families</h4>
<p>“When we declare a specific font to be used within our design, we are doing so in the hope that the user will have that font installed on their system. If they don’t have the font on their system, then they won’t see it, simple as that. What we need to do is reference fonts that the user will likely have on their machine, such as the ones in the font-family property below. It is important that we finish the list with a generic font type. [<a href="http://www.communitymx.com/content/article.cfm?cid=FAF76&amp;print=true">Getting into good coding habits</a>]<br />
<code><br />
p { font-family: Arial, Verdana, Helvetica, sans-serif; }<br />
</code></p>
<h4>1 ID per page, many classes per page</h4>
<p>“Check your IDs: Only one element in a document can have a certain value for the id attribute, while any number of elements can share the same class name. [..] Class and id names can only consist of the characters [A-Za-z0-9] and hyphen (-), and they cannot start with a hyphen or a digit (see CSS2 syntax and basic data types).” [<a href="http://www.456bereastreet.com/lab/developing_with_web_standards/css/" target="_blank">Roger Johansson</a>]</p>
<h4>Horizontally Centering an element</h4>
<p>It is very easy to center an element horizontally using HTML with the align attribute, but there is no such property in the CSS. Instead we use margin to center the element like this</p>
<pre class="css">margin:0 auto;</pre>
<p>Here &#8216;auto&#8217; automatically divides the space left on the sides of element into half and assigns each half on each side of the element</p>
<h4>Conditional Comments of IE</h4>
<p>IE versions less than 7 adhere to CSS standards very less and often create a nasty CSS bug or issue to deal with. You can come around the issue by creating a different style to address the issue and then include the style for only IE using IE conditional comments like this.<br />
<code><br />
&lt;!--[if IE]&gt;<br />
&lt;link rel="stylesheet" type="text/css" href="ie.css" /&gt;<br />
&lt;![endif]--&gt;</code></p>
<p><em>Next Article in Series <a href="http://www.kashit.org/design/css-best-practices-ii/" title="">CSS Best Practices &#8211; II</a></em></p>
]]></content:encoded>
			<wfw:commentRss>http://www.kashit.org/design/css-best-practices/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
	</channel>
</rss>
