您的位置:首页 > Web前端 > HTML5

H5 COURSERA

2016-07-28 23:55 337 查看
这一节课是这样讲解DOM的:

Basis of HTML5 is "New features should be based on HTML,CSS,the DOM, and JavaScript..."                                                        
H5的新特征基于HTML,CSS,DOM和Javascript.
DOM provides common tree-like structure that all pages should follow.                                                                                          
DOM提供了常见的树形结构,而所有网页都是按照该结构构成的.
HTML is built on the DOM
直接放图:

              




        结构良好的HTML应有如下组成部分(3个):

Every well-formed HTML document should include:


Doctype
<!DOCTYPE html> ( the only doctype for H5)
                                                 Previous versions dictated backwards compatibility.

Head

meta data language,title

supporting files:JavaScript, Styling,Addons.

Body

 The bulk of your page, it's important to write well-formatted(tree-like) code.

  Most of the contents will be displayed by the brower, but there may be some meta-data which 

hen you finish your code, you need to user validator to validate them.(搜
Markup Validation Service)

HTML5 Tags and Syntax

学习原则

         It's really not until you need a tag that you ever really bother learning about it .()

Tag分类

Start tag<h1>,Closing tag</h1>,Self-closing tag <img src="x.gif"/>
.


Some tags have attributes()

常见

<h1>-<h6> have syntax and semantics

<p> should only contain inline elements.

<div>的缺点:there is no semantic meaning behind a div.(Compared with "header" or "footer").

Attributes

作用 provide additional information about an element.

形式come in name/value pairs. (有了name就要有value,如有src就要有对应地址,)

Attributes that apply to any tag:

class/id/style/accesskey/tabindex(1 is the highest priority)

Special entities 特殊字符

> 和  >

0203
How to Desgin Webpage
<header>   a group of introductory or navigational aids:title,navigation links,etc;
区分<head>
<head> is for metadata,<header>is more of just an aid.

<nav> a section of the page that links to other pages
or to parts within the page.(仅用于自己网站内的链接,不对外链接Fb,linkedin神马的)
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: