PHP-Z

编程

W3C 发表 HTML 5.1 网页推荐规范

2016-11-3 12:00 发布者: 大熊猫

负责制定Web标准的World Wide Web Consortium (W3C)正式发表了HTML5.1推荐规格,规格定义了HTML语言第五大版本的第一个小版本。

W3C已在着手制定下个版本HTML5.2,计划2017年下半年发表并替换此次HTML5.1的规格。

这里摘出HTML5.1和HTML5之间的改变部分:

功能添加

  1. The picture and srcset attributes allow responsive image selection.

  2. The details andsummary elements enable authors to provide extended information that users can choose whether to read.

  3. The menuitem and type="context" attribute value enable authors to add functionality to the browser’s context menu.

  4. The requestAnimationFrame API allows for more efficient animation.

  5. enqueueJob and nextJob help explain Promise resolution in terms of microtasks.

  6. The rev attribute for links, primarily to support RDFa (previously defined in HTML 4).

  7. HTMLMediaElement and srcObject objects.

  8. Enable cross-origin track and EventSource and cross-origin content for ImageBitmap in canvas.

  9. event-source-errorevent-track-error and event-track-load events for media fetching.

  10. onrejectionhandled and onunhandledrejection and APIs for tracking promise rejection.

  11. HTMLTableCaptionElementHTMLTableSectionElementHTMLTableRowElement, for HTML table elements.

  12. history.scrollRestoration to control where a users' view is directed when navigating through their history.

  13. IDL [SameObject], for some objects that return collections.

  14. Add "noopener" to rel and window to allow for browsing contexts to be separated.

  15. nonce attribute on script and style to support the use of Content Security Policy.

功能移除

  1. appCache.

  2. Media Controllers.

  3. The command API.

  4. The usemap attribute on object.

  5. The accessKeyLabel IDL attribute.

  6. The form attribute is no longer valid for label.

  7. The multiple attribute on input type="range".

  8. hreflang andtype attributes on area.

  9. The use of nested section elements each with an h1 to create an outline.

  10. Special handling of isindex in form submission.

  11. navigator.yieldForStorageUpdates() and the Storage mutex.

  12. Disallow tfoot before tbody.

  13. [Exposed=Window] for HTMLHyperLinkElementUtils, [Exposed=Window, Worker] for DOMStringMap and IDL Date.

现有功能调整

  1. The accesskey takes a single character as a value (as in HTML 4).

  2. header and footer elements can be nested, if each level is within a sectioning element.

  3. option elements can be empty.

  4. The mousewheel event is called wheel.

  5. The value attribute of input type="submit" is translatable.

  6. figcaption can appear anywhere within a figure.

  7. Having title, or writing email to a friend does not make an img missing alt conformant.

  8. The content of time is phrasing content, or text.

  9. Blank alt on area elements with duplicate href attributes is no longer conformant.

  10. When navigating internally, the next search for a link etc starts from where the navigation moved to.

  11. img and related elements support width="0".

  12. .tFoot and .createTFoot() always insert at the end of a table

  13. fieldset and namedItem make HTMLCollections not HTMLFormControlsCollections and HTMLOptionsCollections.

  14. frameElement can return null.

  15. For images which don’t resolve currentSrc is the URL given to the resolver, not necessarily the absolute URL.

  16. script IDL attributes reflect.

  17. meta refresh allows ; or url= to be optional.

  18. navigator.javaEnabled() is a method.

  19. fileCallback is called blobcallback.

  20. The toBlob() callback is non-nullable.

  21. origin on HTMLHyperlinkElementUtils and Location is readonly.

  22. The first title child of an SVG is its title, not the last.

  23. window.open() can return null

关注微信公众号

top100summit

扫一扫关注微信公众号

PHP-Z_COM