`

Five Things You Should Know About HTML5(HTML5,你需要知道的5件事)

    博客分类:
  • html
阅读更多
Five Things You Should Know About HTML5

1. It’s not one big thing(它不是单独的大家伙)
    You may well ask: “How can I start using HTML5 if older browsers don’t support it?” But the question itself is misleading. HTML5 is not one big thing; it is a collection of individual features. So you can’t detect “HTML5 support,” because that doesn’t make any sense. But you can detect support for individual features, like canvas, video, or geolocation.

    你也许相当想问:”如果老版本的浏览器不支持它,我该如何开始使用HTML5?“但这个问题本身就是很容易引起误解的。HTML5不是一个单独的大家伙;它是一个由许多独立功能组成的集合。所以你不能检测出(你的浏览器)是否支持HTML5,因为那没有任何意义。但你可以检测出(你的浏览器)是否支持独立的功能,比如 canvas, video,或者 geolocation. 

    You may think of HTML as tags and angle brackets. That’s an important part of it, but it’s not the whole story. The HTML5 specification also defines how those angle brackets interact with JavaScript, through the Document Object Model (DOM). HTML5 doesn’t just define a <video> tag; there is also a corresponding DOM API for video objects in the DOM. You can use this API to detect support for different video formats, play a video, pause, mute audio, track how much of the video has been downloaded, and everything else you need to build a rich user experience around the <video> tag itself.

    你可以将HTML想象成为一些标记或者尖括号。 这些都是它的重要组成部分, 但这些并不是全部。HTML规范也定义了这些尖括号如何通过DOM与JavaScript交互。 HTML并不仅仅定义了一个<video>标签;也包含了供video对象在DOM中使用的相应的DOM API;你能使用这些API,用于检测(浏览器)对不同格式的视频的支持,播放一个视频,暂停,静音一个音频。跟踪视频被加载的多少程度。围绕<video>标签,你可以创造出任何你想要的,拥有良好客户体验你可以将HTML想象成为一些标记或者尖括号。 这些都是它的重要组成部分, 但这些并不是全部。HTML规范也定义了这些尖括号如何通过DOM与JavaScript交互。 HTML并不仅仅定义了一个<video>标签;也包含了供video对象在DOM中使用的相应的DOM API;你能使用这些API,用于检测(浏览器)对不同格式的视频的支持,播放一个视频,暂停,静音一个音频。跟踪视频被加载的多少程度。围绕<video>标签,你可以创造出任何你想要的,拥有良好客户体验的(程序)。

2. You don’t need to throw anything away(你不需要抛弃任何东西)

    Love it or hate it, you can’t deny that HTML 4 is the most successful markup format ever. HTML5 builds on that success. You don’t need to throw away your existing markup. You don’t need to relearn things you already know. If your web application worked yesterday in HTML 4, it will still work today in HTML5. Period.

    不管喜欢与否, 你不能否认HTML 4是迄今为止最成功的标记语言标准。 HTML5建立于它的成功之上。你不需要抛弃任何你现有的标记。你也不需要重新学习那些你已经掌握的知识。如果你的web应用过去一直在HTML4下工作,那么现在它仍然能够在HTML5下工作。至少在一段时间内是这样。

    Now, if you want to improve your web applications, you’ve come to the right place. Here’s a concrete example: HTML5 supports all the form controls from HTML 4, but it also includes new input controls. Some of these are long-overdue additions like sliders and date pickers; others are more subtle. For example, the email input type looks just like a text box, but mobile browsers will customize their onscreen keyboard to make it easier to type email addresses. Older browsers that don’t support the email input type will treat it as a regular text field, and the form still works with no markup changes or scripting hacks. This means you can start improving your web forms today, even if some of your visitors are stuck on IE 6.

    现在, 如果你想要升级你的web应用,那么你来对地方了。 这里有个具体的例子: HTML5支持所有的HTML4中的窗体控件,但它也提供了一些新的input控件。其中有一些早该加入的功能,比如sliders(滚动条)和date pickers(日期选择控件);其余的(控件)则更加巧妙。 比如, email输入控件看起来更像一个text box(文本框),但是手机浏览器会根据它们的触摸屏键盘自动调整,使它更容易输入email地址。 老版本的不支持email控件的浏览器将仍然将它当做一个普通的文本框, 表单(窗体)仍然正常工作,不需要对标签或者脚本做任何更改。 这些意味着你已经可以开始升级你的web应用了,虽然你的用户可能还在使用IE 6。

3. It’s easy to get started(它非常容易上手)

    “Upgrading” to HTML5 can be as simple as changing your doctype. The doctype should already be on the first line of every HTML page. Previous versions of HTML defined a lot of doctypes, and choosing the right one could be tricky. In HTML5, there is only one doctype:

    <!DOCTYPE html>


    升级到HTML5非常简单,简单到只需要修改你页面上的doctype。doctype应该出现在所有的HTML页面的第一行。前一个版本的HTML定义了相当多的doctype, 在它们中选择一个正确的来使用会变得非常复杂。在HTML5中,只有唯一的doctype:
    <!DOCTYPE html>


    Upgrading to the HTML5 doctype won’t break your existing markup, because all the tags defined in HTML 4 are still supported in HTML5. But it will allow you to use — and validate — new semantic elements like <article>, <section>, <header>, and <footer>.

    升级到HTML5的doctype不会破坏你任何的已经存在的标记,因为在HTML 4中定义的所有标记在HTML5中同样得到了支持。但它会允许你使用一些新的语义元件比如<article>, <section>, <header>, and <footer>.

4. It already works(它已经开始工作了)
    Whether you want to draw on a canvas, play video, design better forms, or build web applications that work offline, you’ll find that HTML5 is already well-supported. Firefox, Safari, Chrome, Opera, and mobile browsers already support canvas, video, geolocation, local storage, and more. Google already supports microdata annotations. Even Microsoft — rarely known for blazing the trail of standards support — will be supporting most HTML5 features in the upcoming Internet Explorer 9.

    无论你是想在canvas上画画,播放视频,设计更好的表单,或者创建能在离线状态下工作的web应用,你会发现HTML5已经被广泛地支持了。Firefox, Safari, Chrome, Opera,以及许多手机浏览器已经支持canvas, video, geolocation(地理位置定位), local storage(本地存储), 甚至更多。 Google已经开始支持microdata annotations(microdata是HTML新定义的一个规范,网页可以利用microdata来针对网页里的特殊架构信息做描述。搜索引擎,浏览器可以对这些数据进行解读,并为用户提供更富用户体验的功能)。就连很少和标准接轨的微软,也将在IE9中支持HTML5的大部分功能。

5. It’s here to stay(他们要说的是)

    Tim Berners-Lee invented the world wide web in the early 1990s. He later founded the W3C to act as a steward of web standards, which the organization has done for more than 15 years. Here is what the W3C had to say about the future of web standards, in July 2009:

    Tim Berners-Lee在上世纪90年代早期发明了万维网。 在那以后,他创立了W3C组织作为web标准的领路者, 这个组织已经运转了超过十五年。 这里是W3C在2009年7月,谈到关于未来的web标准所说的一段话:

    Today the Director announces that when the XHTML 2 Working Group charter expires as scheduled at the end of 2009, the charter will not be renewed. By doing so, and by increasing resources in the HTML Working Group, W3C hopes to accelerate the progress of HTML5 and clarify W3C’s position regarding the future of HTML.

    今天,董事宣布XHTML 2工作组的执照如期在2009年末到期后,将不再重新更新。(这个小组在2010-12-17正式解散) 通过这种措施,并且加大对HTML工作组的资源投入力度, W3C希望能够加快HTML5的进程。同时无论HTML将来发展如何,W3C再次表明了它对HTML5的坚定立场。

原文链接:http://diveintohtml5.org/introduction.html
0
1
分享到:
评论

相关推荐

    the importent five things 经验总结

    the importent five things 经验总结

    five things performance

    five things performance

    Cloud Computing Bible

    To read this book and get the most out of it, you should know about basic computer operations and theory. You should be able to turn a computer on and know what operating system is running, how ...

    The Five People You Meet In Heaven

    In this novel, you can find many English descriptions, and it'll be good for your English promotion.

    给你5元Five.zip

    Five是一种给你5元的捐款项目的复杂化库。捐赠:给我5元说真的,我们会打印贴纸并且邮寄给该项目的所有贡献者。所有剩下的钱将被捐献给慈善机构。用法需求模块var five = require('five');浏览器中[removed]...

    Apress.Practical.HTML5.Projects.2012

    Busy web developers should not have to plow through pages of theory or history only to discover that no practical applications are provided, nor should they have to read a paragraph five times to ...

    Back Track five - BT5

    BT5-GNOME-32.torrent* BT5-GNOME-32.torrent* BT5-GNOME-ARM.torrent* BT5-GNOME-ARM.torrent* BT5-KDE-32.torrent* BT5-KDE-64.torrent*

    Using SVG with CSS3 and HTML5

    With this practical guide, you’ll learn how to use SVG not only for illustrations but also as graphical documents that you can integrate into complex HTML5 web pages, and style with custom CSS....

    CardFive7.7卡片制作打印软件汉化补丁

    CardFive7.7卡片制作打印软件汉化补丁 非破解

    Five Ways Sharepoint Can Save You Money

    MOSS 白皮书 sharepoint Five Ways Sharepoint Can Save You Money.pdf

    CardFive7.7中文.rar

    Card Five证卡打印机制卡软件Card Five 简体中文版CardFive7.7 ☆ 专业的证卡打印机编辑软件 ☆ 支持照片、条形码、图片、文字、印章 ☆ 支持数据库添加 ☆ 我公司有详细的使用教程和案例分享 ☆ 如有需要请来电咨询...

    CardFive7.7(制卡软件)

    CardFive7.7(制卡软件)CardFive7.7(制卡软件)CardFive7.7(制卡软件)

    CardFive7.7中文

    CardFive7.7中文证卡打印工具,硬盘安装版本。证卡打印得力助手

    cardfive 7.7中文版

    CardFive7.7是一款专业的制卡软件,可支持zebra,fargo,datacard等牌子

    IEC60870-5系列规约(中文版)(101,103... 一直都收集,已经使用多个项目上,完整)

    Five documents specify the base IEC 60870-5: IEC 60870-5-1 Transmission Frame Formats IEC 60870-5-2 Data Link Transmission Services IEC 60870-5-3 General Structure of Application Data IEC 60870-5-4 ...

    CardFive7.7.rar

    CARDFIVE是用于塑料照片身份证的设计和打印软件。将设计链接到数据库,对磁条进行编码,对智能卡进行处理,创建效果并管理覆盖图,全息图或临时色带。使用DCL(直接命令语言)在市场上最流行的证卡打印机上以及几乎...

    CardFive5.0中文注册版

    CardFive5.0中文注册版,真正的中文版,安装好就已经注册好了的版本

    Five-Bus-Load-Flow:基于MATLAB Simulink的IEEE 5节点潮流计算仿真模型 五个潮流母线模块用

    Five_Bus_Load_Flow:基于MATLAB Simulink的IEEE 5节点潮流计算仿真模型。 五个潮流母线模块用于指定母线基准电压和光伏母线电压以及摆动母线的电压和相位。 潮流参数在同步和异步电机模块的潮流选项卡中定义。 仿真...

    Cloud Computing For Dummies

    We recommend that you read the first five chapters, regardless of how deeply you want to wander into the cloud. These chapters give you context about the cloud and what’s behind the concept. If you ...

Global site tag (gtag.js) - Google Analytics