html5的东西还是不少啊,搞个目录,汇总一下,以便查看,慢慢学习。
bs一下某些ie和webkit双核浏览器,渲染和其他的webkit内核搞定了,但是表单验证是失败的怎么能提交呢??
1. HTML5 新增标签
多媒体
audio ——定义声音,比如音乐或其他音频流。src属性定义文件位置。
video ——定义视频,比如电影片段或其他视频流。controls和
src属性。
canvas ——定义图形,比如图表和其他图像。
source—— 为媒介元素(比如 <video> 和 <audio>)定义媒介资源。
embed —— 定义嵌入的内容,比如插件。必须有 src 属性。无法在开始标签和结束标签之间写文本。
结构
article ——定义外部的内容。
aside ——定义 article 以外的内容。aside 的内容应该与 article 的内容相关。
section—— 标签定义文档中的节(section、区段)。
hgroup—— 对网页或区段(section)的标题进行组合。
nav—— 定义导航链接的部分。
header —— 定义文档的页眉(介绍信息)
footer —— 定义 section 或 document 的页脚。
details ——描述文档或文档某个部分的细节。
summary—— 定义details 元素的标题,"details" 元素用于描述有关文档或文档片段的详细信息。
figure ——对元素进行组合,主要是媒介内容的分组,以及它们的标题。
figcaption—— 定义 figure 元素的标题。被置于 "figure" 元素的第一个或最后一个子元素的位置。
menu—— 定义菜单列表。当希望列出表单控件时使用该标签。在 HTML 4.01 中,不赞成使用 menu 元素。
在 HTML 5 中,重新定义了 menu 元素,且使用用于排列表单控件。
其他
command—— 定义命令按钮,比如单选按钮、复选框或按钮。有type属性。
datalist—— 定义选项列表。请与 input 元素配合使用该元素,来定义 input 可能的值。 datalist 及其选项不会被想显示出来,它仅仅是合法的输入值列表。请使用 input 元素的 list 属性来绑定 datalist。
keygen—— 定义生成密钥。
mark—— 主要用来在视觉上向用户呈现那些需要突出的文字。<mark>标签的一个比较典型的应用就是在搜索结果中向用户 高亮显示搜索关键词。
meter——
output——
progress —— 定义运行中的进度(进程)。可用于显示 JavaScript 中耗费时间的函数的进度。
rp—— 若浏览器不支持 ruby 元素显示的内容。
rt—— 定义ruby 注释的解释。
ruby ——ruby 元素由一个或多个字符(需要一个解释/发音)和一个提供该信息的 rt 元素组成,还包括可选的 rp 元素,
定义当浏览器不支 持 "ruby" 元素时显示的内容。
time—— 定义日期或时间,或者两者。
2. 不支持的标签
acronym
applet
basefont
big
center
dir ——定义列表项目 HTML4中不赞成使用。
font
frame
frameset
isindex
noframes
s
strike
tt
u
xmp
from:http://blog.youkuaiyun.com/pangni/archive/2011/02/25/6208470.aspx
w3schools 的参考目录:
HTML5
HTML5 improves interoperability and reduces development costs by making precise rules on how to handle all HTML elements, and how to recover from errors.
Some of the new features in HTML5 are functions for embedding audio, video, graphics, client-side data storage, and interactive documents. HTML5 also contains new elements like <nav>, <header>, <footer>, and <figure>.
The HTML5 working group includes AOL, Apple, Google, IBM, Microsoft, Mozilla, Nokia, Opera, and many hundreds of other vendors.
Note: HTML5 is not a W3C recommendation yet!
To read about the HTML5 activities at W3C, please read our W3C tutorial .
Ordered Alphabetically
New : New tags in HTML5.
<!--...--> | Defines a comment |
<!DOCTYPE> | Defines the document type |
<a> | Defines a hyperlink |
<abbr> | Defines an abbreviation |
<acronym> | Not supported in HTML5 |
<address> | Defines an address element |
<applet> | Not supported in HTML5 |
<area> | Defines an area inside an image map |
<article> New | Defines an article |
<aside> New | Defines content aside from the page content |
<audio> New | Defines sound content |
<b> | Defines bold text |
<base> | Defines a base URL for all the links in a page |
<basefont> | Not supported in HTML5 |
<bdo> | Defines the direction of text display |
<big> | Not supported in HTML5 |
<blockquote> | Defines a long quotation |
<body> | Defines the body element |
<br> | Inserts a single line break |
<button> | Defines a push button |
<canvas> New | Defines graphics |
<caption> | Defines a table caption |
<center> | Not supported in HTML5 |
<cite> | Defines a citation |
<code> | Defines computer code text |
<col> | Defines attributes for table columns |
<colgroup> | Defines groups of table columns |
<command> New | Defines a command button |
<datalist> New | Defines a dropdown list |
<dd> | Defines a definition description |
<del> | Defines deleted text |
<details> New | Defines details of an element |
<dfn> | Defines a definition term |
<dir> | Not supported in HTML5 |
<div> | Defines a section in a document |
<dl> | Defines a definition list |
<dt> | Defines a definition term |
<em> | Defines emphasized text |
<embed> New | Defines external interactive content or plugin |
<fieldset> | Defines a fieldset |
<figcaption> New | Defines the caption of a figure element |
<figure> New | Defines a group of media content, and their caption |
<font> | Not supported in HTML5 |
<footer> New | Defines a footer for a section or page |
<form> | Defines a form |
<frame> | Not supported in HTML5 |
<frameset> | Not supported in HTML5 |
<h1> to <h6> | Defines header 1 to header 6 |
<head> | Defines information about the document |
<header> New | Defines a header for a section or page |
<hgroup> New | Defines information about a section in a document |
<hr> | Defines a horizontal rule |
<html> | Defines an html document |
<i> | Defines italic text |
<iframe> | Defines an inline sub window (frame) |
<img> | Defines an image |
<input> | Defines an input field |
<ins> | Defines inserted text |
<keygen> New | Defines a generated key in a form |
<kbd> | Defines keyboard text |
<label> | Defines a label for a form control |
<legend> | Defines a title in a fieldset |
<li> | Defines a list item |
<link> | Defines a resource reference |
<map> | Defines an image map |
<mark> New | Defines marked text |
<menu> | Defines a menu list |
<meta> | Defines meta information |
<meter> New | Defines measurement within a predefined range |
<nav> New | Defines navigation links |
<noframes> | Not supported in HTML5 |
<noscript> | Defines a noscript section |
<object> | Defines an embedded object |
<ol> | Defines an ordered list |
<optgroup> | Defines an option group |
<option> | Defines an option in a drop-down list |
<output> New | Defines some types of output |
<p> | Defines a paragraph |
<param> | Defines a parameter for an object |
<pre> | Defines preformatted text |
<progress> New | Defines progress of a task of any kind |
<q> | Defines a short quotation |
<rp> New | Used in ruby annotations to define what to show if a browser does not support the ruby element |
<rt> New | Defines explanation to ruby annotations |
<ruby> New | Defines ruby annotations |
<s> | Defines text that is no longer correct |
<samp> | Defines sample computer code |
<script> | Defines a script |
<section> New | Defines a section |
<select> | Defines a selectable list |
<small> | Defines small text |
<source> New | Defines media resources |
<span> | Defines a section in a document |
<strike> | Not supported in HTML5 |
<strong> | Defines strong text |
<style> | Defines a style definition |
<sub> | Defines subscripted text |
<summary> New | Defines the header of a "detail" element |
<sup> | Defines superscripted text |
<table> | Defines a table |
<tbody> | Defines a table body |
<td> | Defines a table cell |
<textarea> | Defines a text area |
<tfoot> | Defines a table footer |
<th> | Defines a table header |
<thead> | Defines a table header |
<time> New | Defines a date/time |
<title> | Defines the document title |
<tr> | Defines a table row |
<tt> | Not supported in HTML5 |
<u> | Not supported in HTML5 |
<ul> | Defines an unordered list |
<var> | Defines a variable |
<video> New | Defines a video |
<wbr> New | Defines a possible line-break |
<xmp> | Not supported in HTML5 |
HTML5 Global Attributes
New : New global attributes in HTML5.
Attribute | Value | Description |
---|---|---|
accesskey | character | Specifies a keyboard shortcut to access an element |
class | classname | Specifies a classname for an element (used for stylesheets) |
contenteditable New | true false | Specifies if the user is allowed to edit the content or not |
contextmenuNew | menu_id | Specifies the context menu for an element |
dir | ltr rtl | Specifies the text direction for the content in an element |
draggableNew | true false auto | Specifies whether or not a user is allowed to drag an element |
dropzoneNew | copy move link | Specifies what happens when dragged items/data is dropped in the element |
hidden New | hidden | Specifies that the element is not relevant. Hidden elements are not displayed |
id | id | Specifies a unique id for an element |
lang | language_code | Specifies a language code for the content in an element |
spellcheck New | true false | Specifies if the element must have its spelling and grammar checked |
style | style_definition | Specifies an inline style for an element |
tabindex | number | Specifies the tab order of an element |
title | text | Specifies extra information about an element |
Global Event Attributes
HTML 4 added the ability to let events trigger actions in a browser, like starting a JavaScript when a user clicks on an element.
To learn more about programming events, please visit our JavaScript tutorial and our DHTML tutorial .
Below are the global event attributes that can be inserted into HTML5 elements to define event actions.
New : New event attributes in HTML5.
Window Event Attributes
Events triggered for the window object.
Applies to the <body> tag:
Attribute | Value | Description |
---|---|---|
onafterprintNew | script | Script to be run after the document is printed |
onbeforeprintNew | script | Script to be run before the document is printed |
onbeforeonloadNew | script | Script to be run before the document loads |
onblur | script | Script to be run when the window loses focus |
onerrorNew | script | Script to be run when an error occur |
onfocus | script | Script to be run when the window gets focus |
onhaschangeNew | script | Script to be run when the document has change |
onload | script | Script to be run when the document loads |
onmessageNew | script | Script to be run when the message is triggered |
onofflineNew | script | Script to be run when the document goes offline |
ononlineNew | script | Script to be run when the document comes online |
onpagehideNew | script | Script to be run when the window is hidden |
onpageshowNew | script | Script to be run when the window becomes visible |
onpopstateNew | script | Script to be run when the window's history changes |
onredoNew | script | Script to be run when the document performs a redo |
onresizeNew | script | Script to be run when the window is resized |
onstorageNew | script | Script to be run when a document loads |
onundoNew | script | Script to be run when a document performs an undo |
onunloadNew | script | Script to be run when the user leaves the document |
Form Events
Events triggered by actions inside a HTML form.
Applies to all HTML5 elements, but is most common in form elements:
Attribute | Value | Description |
---|---|---|
onblur | script | Script to be run when an element loses focus |
onchange | script | Script to be run when an element changes |
oncontextmenuNew | script | Script to be run when a context menu is triggered |
onfocus | script | Script to be run when an element gets focus |
onformchangeNew | script | Script to be run when a form changes |
onforminputNew | script | Script to be run when a form gets user input |
oninputNew | script | Script to be run when an element gets user input |
oninvalidNew | script | Script to be run when an element is invalid |
onreset | script | Script to be run when a form is reset Not supported in HTML5 |
onselect | script | Script to be run when an element is selected |
onsubmit | script | Script to be run when a form is submitted |
Keyboard Events
Events triggered by a keyboard.
Applies to all HTML5 elements.
Attribute | Value | Description |
---|---|---|
onkeydown | script | Script to be run when a key is pressed |
onkeypress | script | Script to be run when a key is pressed and released |
onkeyup | script | Script to be run when a key is released |
Mouse Events
Events triggered by a mouse, or similar user actions:
Applies to all HTML5 elements.
Attribute | Value | Description |
---|---|---|
onclick | script | Script to be run on a mouse click |
ondblclick | script | Script to be run on a mouse double-click |
ondragNew | script | Script to be run when an element is dragged |
ondragendNew | script | Script to be run at the end of a drag operation |
ondragenterNew | script | Script to be run when an element has been dragged to a valid drop target |
ondragleaveNew | script | Script to be run when an element leaves a valid drop target |
ondragoverNew | script | Script to be run when an element is being dragged over a valid drop target |
ondragstartNew | script | Script to be run at the start of a drag operation |
ondropNew | script | Script to be run when dragged element is being dropped |
onmousedown | script | Script to be run when a mouse button is pressed |
onmousemove | script | Script to be run when the mouse pointer moves |
onmouseout | script | Script to be run when the mouse pointer moves out of an element |
onmouseover | script | Script to be run when the mouse pointer moves over an element |
onmouseup | script | Script to be run when a mouse button is released |
onmousewheelNew | script | Script to be run when the mouse wheel is being rotated |
onscrollNew | script | Script to be run when an element's scrollbar is being scrolled |
Media Events
Events triggered by medias like videos, images and audio.
Applies to all HTML5 elements, but is most common in media elements, such as audio, embed, img, object, and video:
Attribute | Value | Description |
---|---|---|
onabort | script | Script to be run on an abort event |
oncanplayNew | script | Script to be run when media can start play, but might has to stop for buffering |
oncanplaythroughNew | script | Script to be run when media can be played to the end, without stopping for buffering |
ondurationchangeNew | script | Script to be run when the length of the media is changed |
onemptiedNew | script | Script to be run when a media resource element suddenly becomes empty (network errors, errors on load etc.) |
onendedNew | script | Script to be run when media has reach the end |
onerrorNew | script | Script to be run when an error occurs during the loading of an element |
onloadeddataNew | script | Script to be run when media data is loaded |
onloadedmetadataNew | script | Script to be run when the duration and other media data of a media element is loaded |
onloadstartNew | script | Script to be run when the browser starts to load the media data |
onpauseNew | script | Script to be run when media data is paused |
onplayNew | script | Script to be run when media data is going to start playing |
onplayingNew | script | Script to be run when media data has start playing |
onprogressNew | script | Script to be run when the browser is fetching the media data |
onratechangeNew | script | Script to be run when the media data's playing rate has changed |
onreadystatechangeNew | script | Script to be run when the ready-state changes |
onseekedNew | script | Script to be run when a media element's seeking attribute is no longer true, and the seeking has ended |
onseekingNew | script | Script to be run when a media element's seeking attribute is true, and the seeking has begun |
onstalledNew | script | Script to be run when there is an error in fetching media data (stalled) |
onsuspendNew | script | Script to be run when the browser has been fetching media data, but stopped before the entire media file was fetched |
ontimeupdateNew | script | Script to be run when media changes its playing position |
onvolumechangeNew | script | Script to be run when media changes the volume, also when volume is set to "mute" |
onwaitingNew | script | Script to be run when media has stopped playing, but is expected to resume |