HTML5 Shiv

HTML5 has all sorts of great new elements such as <header>, <nav>, etc.  We can finally build pages without having tons of <div class=”header”> etc, and have the terms standardized across websites.

Internet Explorer will not recognize these unofficial elements.  Unlike Chrome, Firefox, Opera, and the rest of the browser world who will gladly assume the element is acceptable, and render / CSS just like any other element — Internet Explorer ignores them.  If you used <header> tags on your site, Internet Explorer (yes, even 8 ) will just ignore the existence of the code.

To use this script, it must be included before the <body> element (i.e. in the <head>) but doesn’t matter if it appears before or after the CSS – but for the sake of performance, it would make better sense to include the CSS first then this script.

<!--[if lt IE 9]><script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script><![endif]-->

Note that the protocol has been removed so you don’t have to when including on an http or https page

Common question: what’s the difference between the html5shim and the html5shiv? Answer: nothing, one has an m and one has a v – that’s it.

PIE

CSS Level 3 brings with it some incredibly powerful styling features. Rounded corners, soft drop shadows, gradient fills, and so on. These are the kinds of elements our designer friends love to use because they make for attractive sites, but are difficult and time-consuming to implement, involving complex sprite images, extra non-semantic markup, large JavaScript libraries, and other lovely hacks.

CSS3 promises to do away with all that! But as we all know, due to Internet Explorer’s lack of support for any of these features, we must be patient and refrain from using them, and make do with the same old tedious techniques for the foreseeable future.

Five Tips to Help You Stay Safer on the Web

1. Keep your computer up to date and install anti-virus.

2. Make sure you’re running a modern browser like Internet Explorer 9

3. Look for the lock in the address bar of your browser for online shops

4. Look for the warning signs from your browser.

5. If you’re doing all of your shopping on a few sites, just pin them to your Windows 7 taskbar.

HTML 5 简介

HTML5 是下一代的 HTML。

什么是 HTML5?

HTML5 将成为 HTML、XHTML 以及 HTML DOM 的新标准。

HTML 的上一个版本诞生于 1999 年。自从那以后,Web 世界已经经历了巨变。

HTML5 仍处于完善之中。然而,大部分现代浏览器已经具备了某些 HTML5 支持。

HTML5 是如何起步的?

HTML5 是 W3C 与 WHATWG 合作的结果。

编者注:W3C 指 World Wide Web Consortium,万维网联盟。

编者注:WHATWG 指 Web Hypertext Application Technology Working Group。

WHATWG 致力于 web 表单和应用程序,而 W3C 专注于 XHTML 2.0。在 2006 年,双方决定进行合作,来创建一个新版本的 HTML。

为 HTML5 建立的一些规则:

  • 新特性应该基于 HTML、CSS、DOM 以及 JavaScript。
  • 减少对外部插件的需求(比如 Flash)
  • 更优秀的错误处理
  • 更多取代脚本的标记
  • HTML5 应该独立于设备
  • 开发进程应对公众透明

新特性

HTML5 中的一些有趣的新特性:

  • 用于绘画的 canvas 元素
  • 用于媒介回放的 video 和 audio 元素
  • 对本地离线存储的更好的支持
  • 新的特殊内容元素,比如 article、footer、header、nav、section
  • 新的表单控件,比如 calendar、date、time、email、url、search

浏览器支持

最新版本的 Safari、Chrome、Firefox 以及 Opera 支持某些 HTML5 特性。Internet Explorer 9 将支持某些 HTML5 特性。

在线测试当前浏览器对HTML5的支持程度: http://html5test.com/