Posted in General | January 31st, 2008

New HTML Version HTML 5

INTRODUCTION:

HTML 5 is planned to be the fifth major revision of the core language of the World Wide Web, HTML. When HTML 5 is expressed in XML it is called XHTML5. 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 W3Cin 2007. The HTML working group has published the First Public Working Draft of the specification on 22nd January 2008.

This specification defines the 5th 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.

1.NEW MARKUP:

HTML 5 provides a number of new elements and attributes (”tags”) that reflect typical usage on modern web sites.

a) Structure:
Even well-formed HTML pages are harder to process than they should be because of the lack of structure. Sidebars, footers, headers, navigation menus, main content sections, and individual stories are marked up by the catch-all div element. HTML 5 adds new elements to specifically identify each of these common constructs:
· section: A part or chapter in a book, a section in a chapter, or essentially anything that has its own heading in HTML 4
· header: The page header shown on the page; not the same as the head element
· footer: The page footer where the fine print goes; the signature in an e-mail message
· nav: A collection of links to other pages
· article: An independent entry in a blog, magazine, compendium, and so forth

b)Block semantic elements :
As well as the structural elements, HTML 5 adds some purely semantic block-level elements:
· aside
· figure
· dialog

Aside
The aside element represents a note, a tip, a sidebar, a pullquote, a parenthetical remark, or something that’s just outside the main flow of the narrative.

<aside>
- - - — -
</aside>

Figure:
The figure element represents a block-level image, along with a caption.

<figure id=”fig2″>

</figure>

Dialog:
The dialog element represents a conversation between several people. The HTML 5 dt element is overloaded to indicate the speaker, and the HTML 5 dd element is overloaded to indicate the speech. This gives reasonable display even in legacy browsers

<dialog>
<dt>—– </dt>

<dd>———</dd>

<dd><p> ——. </p>

<p>………</p>
</dd>
</dialog>

c)Inline semantic elements:
HTML 4 has five different inline elements to represent subtly different variations of computer code : var, code, kbd, tt, and samp. However, it doesn’t have any way to indicate such basic qualities as time, numbers, or sarcasm. HTML 5 aims to rectify this imbalance between techies and normal writers with several new inline elements.
Mark:
The m element indicates text that is “marked”.You can imagine it as being like highlighted passages in a book.
<m>—-</m>
Time :
The time element indicates a specific moment in history, such as 5:35 P.M., EST, April 23, 2007. For example,

<p>————–
<time>5:35 P.M. on April 23rd</time>.
</p>
The time element helps browsers and others recognize times in HTML pages.

Meter:
The meter element represents a numeric value in a specified range. For example, you can use it for salaries, percentage.
<p>————–
<meter>$90,000</meter> per year.
</p>

However, each “meter” element can have up to six attributes offering information about this amount in a more machine-recognizable form:

* value
* min
* low
* high
* max
* optimum

Each of these should contain a decimal number indicating the relevant range. For example, a final exam grade might be marked up like this:

p>Your score was
<meter value=”88.7″ min=”0″ max=”100″ low=”65″ high=”96″ optimum=”100″>B+</meter>.
</p>
This indicates that the student’s score was 88.7 out of a possible 100.
The “value” attribute shows the current state of the operation.
The max attribute shows the total amount toward which the progress is moving. Here the element indicates that 1,534,602 bytes out of a total 4,603,807 bytes have been downloaded.

progress:
The progress element represents the state of an ongoing process, like the progress bar in a graphical user interface (GUI) application. For instance, it can show you what percentage of a file is downloaded or how far you are into a movie. This progress control says that a download is 33% complete:

<p>Downloaded:
<progress value=”1534602″ max=”4603807″>33%</progress>
</p>

d)Embedded media:
Video on the Web is booming, but it’s almost all proprietary. YouTube uses Flash, Microsoft uses Windows Media, and Apple uses QuickTime. Markup that works for embedding such content in one browser doesn’t work in the next. Consequently, the WhatWG has proposed a new video element that allows the embedding of arbitrary video formats.

Video:
<video src=”http://www.cafeaulait.org/birds/sora.mov” />
Audio:
A complementary audio element is also proposed.
<audio src=”spacemusic.mp3″
autoplay=”autoplay” loop=”20000″ />
e)Interactivity:
HTML 5 also goes under the rubric of Web Applications 1.0. Toward that end, several new elements are focused on more interactive experiences for Web pages:
· details
· datagrid
· menu
· command
These elements all have the potential to change what is displayed based on user action and choice without loading a new page from the server.
Details:
The details element represents further information that might not be shown by default. An optional legend element can summarize the details. One use for details is for foot notes and endnotes.
<details>
<legend>[Sibley, 2000]</legend>
<p>Sibley, David Allen, The Sibley Guide to Birds,
(New York: Chanticleer Press, 2000) p. 247
</p>
</details>
Datagrid:
The datagrid element serves the role of a grid control. It’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.
A datagrid gets its initial data from its contents: a table, select, or other group of HTML elements.
<datagrid>
<table>
<tr><td>Jones</td><td>Allison</td><td>A-</td><td>B+</td><td>A</td></tr>
<tr><td>Smith</td><td>Johnny</td><td>A</td><td>C+</td><td>A</td></tr>
<tr><td>Willis</td><td>Sydney</td><td>C-</td><td>D</td><td>F</td></tr>
<tr><td>Wilson</td><td>Frank</td><td>B-</td><td>B+</td><td>A</td></tr>
</table>
</datagrid>
Menu and command
In HTML 5, a menu contains command elements, each of which causes an immediate action.
HTML 5 menu :
<menu>
<command onclick=”alert(’first command’)” label=”Do 1st Command”/>
<command onclick=”alert(’second command’)” label=”Do 2nd Command”/>
<command onclick=”alert(’third command’)” label=”Do 3rd Command”/>
</menu>
Commands can also be turned into check boxes with a checked=”checked” attribute.
in addition to simple lists of commands, you can use the menu element to create a toolbar or pop-up context menu by setting the type attribute to toolbar or popup
<menu type=”toolbar”>
<command onclick=”insertTag(buttons, 0);” label=”strong” icon=”bold.gif”/>
<command onclick=”insertTag(buttons, 1);” label=”em” icon=”italic.gif”/>
<command onclick=”insertLink(buttons, 2);” label=”link” icon=”link.gif”/>
<command onclick=”insertTag(buttons, 3);” label=”b-quote” icon=”blockquote.gif”/>

</menu>
HTML 5 Edit menu :
<menu type=”popup” label=”Edit”>
<command onclick=”undo()” label=”Undo”/>
<command onclick=”redo()” label=”Redo”/>
<command onclick=”cut()” label=”Cut”/>
<command onclick=”copy()” label=”Copy”/>
<command onclick=”paste()” label=”Paste”/>
<command onclick=”delete()” label=”Clear”/>
</menu>

2.New APIs:
In addition to specifying markup, HTML 5 specifies scripting Application Program Interface (APIs). Existing Document Object Model (DOM) interfaces are extended and de facto features documented. There are also new APIs, such as:
· Immediate-mode 2D drawing
· Timed media playback
· Storage
· Offline
· Editing
· Drag&Drop
· Messaging/Networking
· Back button management
· MIME and protocol handler registration

3.Differences from HTML 4

Here is a cursory list of differences and some specific examples:
· New parsing rules oriented towards flexible parsing and compatibility
· New elements – section, video, progress, nav, meter, time, aside, canvas
· New Input attributes – date/time, email, url
· New attributes – ping, charset, async
· Global attributes (that can be applied for every element) – id, tabindex, repeat
· Deprecated elements dropped – center, font, strike

4.Error handling

A HTML 5 browser should be flexible in handling incorrect syntax, in contrast to XHTML, where the browser must refuse to render a document a t all even if there is just one illegal character or missing close tag. HTML 5 is designed such that old HTML 4 browsers can safely ignore new HTML 5 constructs. In contrast to HTML 4, the HTML 5 specification gives detailed rules for lexing and parsing, with the intent that different compliant browsers will produce the same result in the case of incorrect syntax.

Conclusion:

HTML 5 is part of the future of the Web. 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. Many pages will no longer need to use them.

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’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. Inline semantic elements

Posted in SEO | January 30th, 2008

SEO Guidelines for Programmers

Look at the 2 urls.
· www.example.com/index.php?id=23&articleid=55&name=praveen www.example.com/index.php?id=23-articleid~55-name~praveen

we want something like the 2nd url. Efforts should be made to keep query string pass only one string.

Wherever possible try to pass the value between 2 pages through query string then through forms.
Use of sessions for passing the value through pages should be avoided and should only be used if necessary or can’t be done through query strings.
Site should not be more then 3 page deep.
Look at 2 options.

1. www.example.com/shop
2. www.example.com/shop/index.php

1st one is better. It is not important how you look at links. But it is more important how search engines look at links and greater flexibility is there in 1st link.

SEO Guidelines and Recomendations

Guidelines for planning Phase

  • List of competing websites.
  • List important keyword.
  • Target audience.
  • Demography of visitors.
  • Visitor’s probable age group.
  • Website present status on search engines.
  • Website status in directory – submissions approved/pending submissions.

SEO Guidelines for Designers

Basic principals

Content is king
Easy to read
Easy to navigate
Easy to find
Consistent in layout and design
Quick to download

Other things to remember

  • Keep Your Home Page Short and to the Point. 12 to 20 kb of html is optimum. 40 is ok. More then 60 is shame.
  • Pay attention to the title, META tags, and relevance of the text on all of the pages on your site. Title and keyword differences between pages improve the chances that your site will match any given search criteria.
  • No typos.
  • Try to do all the text in headings, more the better.
  • Maximum use of css.
  • Use synonymous phrases in title, meta tags and headers
  • keywords in text.
  • Don’t use single words for keywords.
  • JavaScript and css in external files.
  • The link text should be descriptive and try to make link text as first phrase of the title for the page you are linking to. Note: Try http://www.google.com/search?hl=en&ie=UTF-8&q=miserable+failure&btnG=Google+Search . Miserable failure is never used in the page. How the page is number one for term “miserable failure”. Keyword in back link
  • Cross link your important related pages back and forth.
  • Don’t repeat keywords right next to each other
  • Don’t use the same keyword list and title for every page
  • Don’t try to trick the search engines with techniques such as invisible text. Every text on html should be visible to eyes.
  • Try to limit title to 64 characters.
  • Don’t change title regularly as it would give a impression that site is completely changed.
  • Meta tag limit ** Please no more then 250 characters. Also keep a check on repetition of keywords.
  • Putting punctuation in from of names. Not sure but could help.
  • Try for minimum use of images and try not to use images for text.
  • Don’t forget the alt tags for images and no alt tags for very small images. No need to over do things.
  • Keywords in the title should be present on the page or else no benefit for placing keyword in the title tag.
  • Not more then 5 keywords per page and each keyword should not be repeated more then 3-5 times. Choose appropriate keywords from the list provided.
  • Higher the importance of keyword higher it should be placed on the page. See it in lynx browser how a spider would see the page to verify.
  • No stealing of content. Read a line from other website and copy it in your own words.

Note: To view how search engine would look at your page see it in lynx browser. You could fine a online lynx browser here http://www.delorie.com/web/lynxview.html