【HTML5】HTML5 高级程序设计 学习笔记1 HTML5新特性简介
2015-09-21 18:47
731 查看
New DOCTYPE and Character Set
HTML5内容类型
Semantic Markup 语义化标记
Simplifying Selection Using the Selectors API
以前:
现在:
HTML5内容类型
Content Type | Description |
---|---|
Embedded | Content that imports other resources into the document, for example audio, video,canvas, and iframe |
Flow | Elements used in the body of documents and applications, for example form, h1, and small |
Heading Section headers, | for example h1, h2, and hgroup |
Interactive Content that users interact with, | for example audio or video controls, button, and textarea |
Metadata Elements— | commonly found in the head section— that set up the presentation or |
behavior of the rest of the document, | for example script, style, and title |
Phrasing Text and text markup elements, | for example mark, kbd, sub, and sup |
Sectioning Elements that define sections in the document, | for example article, aside, and title |
Semantic Markup 语义化标记
Sectioning Element | Description |
---|---|
header | Header content (for a page or a section of the page) |
footer | Footer content (for a page or a section of the page) |
section | A section in a web page |
article | Independent article content |
aside | Related content or pull quotes |
nav | Navigational aids |
Simplifying Selection Using the Selectors API
以前:
Function | Description |
---|---|
getElementById() | Returns the element with the specified id attribute value getElementById(“foo”); |
getElementsByName() | Returns all elements whose name attribute has the specified value |
getElementsByTagName() | Return all elements whose tag name matches the specified value |
getElementsByTagName(“input”); |
<script type="text/javascript"> document.getElementById("findHover").onclick = function() { // find the table cell currently hovered in the page var hovered = document.querySelector("td:hover"); if (hovered) document.getElementById("hoverResult").innerHTML = hovered.innerHTML; } </script>
相关文章推荐
- HTML5中在客户端验证文件上传的大小
- c++ primer 第五版 笔记前言
- Canvas 在高清屏下绘制图片变模糊的解决方法
- 那些年,我还在学习C# 学习笔记续
- Ruby 魔法 学习笔记之一
- sqlserver 数据库学习笔记
- CSS学习笔记Padding 属性中参数的定义与使用
- prototype 1.5 & scriptaculous 1.6.1 学习笔记
- prototype 学习笔记整理
- Oracle学习笔记(六)
- 关于SQLServer2005的学习笔记 XML的处理
- 原生js结合html5制作小飞龙的简易跳球
- Jquery 基础学习笔记
- ExtJs 学习笔记基础篇 Ext组件的使用第1/2页
- linux Shell学习笔记第五天
- Jquery 学习笔记(二)
- PHP入门学习笔记之一
- 那些年,我还在学习C# 学习笔记
- Ruffy javascript 学习笔记