2011年9月6日星期二

HTML5與未來的網頁設計(英文教程)

HTML5與未來的網頁設計(英文教程)

http://www.inspirr.com

有些人接受了 ,有些人丟棄它太遙遠的未來,有些人放棄了濫用的朋友有利于舊火焰在籌備。任何一方的辯論你的,你最有可能聽到的所有的博客聊天圍繞“新炎熱” ,也就是HTML5 。它無處不在,它的未來,和你想知道的一切,您可以收到的舊新聞。
像jQuery插件,格式技術,并設計趨勢的變化非常迅速地在整個網絡社會。并在大多數情況下我們都接受的是,有些事情我們知道今天可以過時的明天,但是這是我們行業的性質。
在尋找一些穩定,我們通常可以轉向代碼本身,因為它往往會保持不變了很長一段時間(相對而言) 。因此,當一些驚喜和改變我們的代碼,這是一個大問題,以及將有一些成長的痛苦,我們必須通過。幸運的是,據傳,我們已經少了一個變化的擔心 。
在這篇文章中,我希望能夠給你一些提示和洞察HTML5 ,以幫助減輕疼痛的必然附帶過渡到一種略有不同的語法。
Welcome to HTML5.
What are the basics? The DOCTYPE When I first started researching HTML5 a few months ago, one of the main things I struggled to find was the doctype. A simple thing, you’d think it would be everywhere, but after much frustration, I finally found it buried within w3.org and here it is:
<!DOCTYPE html>
我也好奇,為什么他們選擇“的HTML ” ,而不是“ html5 ” ,這似乎合乎邏輯的方式來告訴瀏覽器,目前的文件寫于HTML5 ,并提供了一個良好的范本,以供未來。但我發現, <!DOCTYPE html5>觸發夸克斯模式中的IE6 ,和向后兼容時,考慮到<!DOCTYPE html>是一個相當不錯的選擇(在我看來) 。
總之,我真的很喜歡這個新的文檔,它的小的,有意義的,也許我們會實際上能夠記住這個時刻的心,而不是將其粘貼在網站上。
New Elements you should know At first glance, with HTML5, the new elements immediately jump out and command attention. The W3C really listened to the community and planned for the future when architecting the abundance of new elements available. We have everything from basic structural elements like <header> and <footer> to others like <canvas> and <audio> that tap into, what seems to be, a very powerful API which allows us the freedom to create more user-friendly applications while further distancing ourselves from reliance on Flash for saving data and intense animation.
The new structural elements <header>
The header element contains introductory information to a section or page. This can involve anything from our normal documents headers (branding information) to an entire table of contents. <nav>
The nav element is reserved for a section of a document that contains links to other pages or links to sections of the same page. Not all link groups need to be contained within the <nav> element, just primary navigation. <section>
The section element represents a generic document or application section. It acts much the same way a <div> does by separating off a portion of the document. <article>
The article element represents a portion of a page which can stand alone such as: a blog post, a forum entry, user submitted comments or any independent item of content. <aside>
Aside, represents content related to the main area of the document. This is usually expressed in sidebars that contain elements like related posts, tag clouds, etc. They can also be used for pull quotes. <footer>
The footer element is for marking up the footer of, not only the current page, but each section contained in the page. So, it’s very likely that you’ll be using the <footer> element multiple times within one page. When you take a look at these new elements, it looks like they’re just replacing our common DIV IDs; and in a way, it’s true. But, the diagram below shows that elements like <header> and <footer> can be used more than once on a single page where they behave more like classes and normal HTML elements that you can use over and over again to retain a semantic structure.
Elements like <header> and <footer> are not just meant to represent the top and bottom of the current document, but they also represent the <header> and <footer> of each document section, much the way we use <thead> and <tfoot> in data tables.
The benefits of using these structural elements is mainly due to the fact that they are extremely well defined and provide a great way to semantically structure your document. However, these elements do need to be used with some careful thought because they can, very easily be overused.
Further Reading on structural HTML5 Steve Smith on Structural Tags in HTML5 Lachlan Hunt’s Preview of HTML5 Elliot Harold on New Elements in HTML5 Bruce Lawson’s HTML5 Form Demo Easing the transition from XHTML Even though HTML 4.01, XHTML 1.0, & HTML5 are all very similar there are some small syntax differences that can, very easily, slip past anyone and invalidate code. Keeping this in mind, HTML5 has some built-in “slack” to make the transition a little easier.
For example, when marking up a form in HTML5, this is the proper syntax for an input text element:
<input type="text" id="name">
But this is also accepted as valid code in an attempt to ease the pain for avid XHTML coders (like myself) who are used to self-closing elements:
<input type="text" id="name"/>
The same rules apply to <meta> and other self closing elements. Legacy elements like <b> and <i> were also left in to help those coming over from HTML 4.01.l
What are the benefits? With any new technology there has to be benefit; why else would you use it? If your old code works just as well and efficient as the new code there’s no reason to upgrade. No reason at all, trust me, I checked.
Luckily HTML5 is with cool new features, code slimming techniques and a lot of stuff I would call very large benefits. Most of which circle around the new APIs and the DOM tree.


  Tag: 設計公司 | 網頁設計公司 | 廣告公司 | 網站設計 | 平面設計 | 互動媒體 | 網頁設計 | Web design | Website design | design house | 媒體公司 | Iphone app | 程式設計 | Flash 網頁 | Flash game | 動畫設計 | 後期製作 | 網上商店 | 網上宣傳 | 網頁服務 |

没有评论:

发表评论