天阔阔雪漫漫共谁同航 这沙滚滚水皱皱笑着浪荡

HTML5 COURSERA-notes

|

course link 算是入门笔记,每周更 H5

  1. 大概念 HTML structure CSS style js behavior

  2. WEEK1 HTML annotates content defines document structure

3core web technologies:HTML CSS JS

WHATWG和W3C一起出的H5

##HTML

  1. element name
content </closing tag> 2. only have opening tag: `<\br>,
` 3. attribute name id = "dd" attribute value 4. value in quote, quote should be closed correctly 5. semantic change 不能自己close自己了,

---->

6. browser render html sequentially(top-bottom) 7. H5 seven models 8. traditional models: block-level element(div): render to begin on new line by default; may contain inline or other block-level element/inline element(span): render on the same line; only contain other inline elements 9. headings 和div+css实现可以看到一样的效果但是作用不一样,seo会依据h1这些tag执行搜索什么的,H1 you should always have it there 10. 有语义的element比如`

`比div这种有更大意义和功能 11. list ul/ol (unorder list/order list) list for navigation 12. avoid rendering issues: </>/&/ </>/&amp 如果想使用<>&要输入这些来防止当做html标记解析, copyright shows the copyright symbol /nbsp:(想把几个短语放在一起letcure7里讲到, 把这几个字符跟在一个单词后面,单词后面的空格就不能换行) 13. href relative links <\a> 是block-level也是inline flow content, H5: a标签可以surround在
外面了,点击整个区域都可以跳转 14. target = _bland new tab/new window 15. fragment identifier href = "#sections" 跳转到当前页的某处(jump to different parts of the same page),sections是某标签的id attribute的value `

`可以直接跳转到top SPA single page application 16. image inline element 写上宽高,方便浏览器预留空间,chrome developer tools,network no throttling里可以调别的,就是模拟网速慢的时候 ##Week2 CSS box model css layout 1. an interesting website: cssszengarden/219 2. user experience of content matters 3. anatomy of a css rule ``` selector { property:value; //declaration } p { color:blue; font-size:20px; } ``` 4. selector: specifying the element name class `className{}` //pound sign, only can use once id`#idName{}` html element we can group selector, separate selector with comma `div,.class1{}` 这些selector都有后面大括号里的属性 5. combining selector 1. `p.big{}`(element with class selector) every p that has class = "big", no space! 2. `article > p`(direct child selector) every p that is a **direct** child of article 3. `article p`(descendent selector) every p that is inside(at any level) of article 4. `.class1.class2`(这里也是no space?) select the element, who both have these two class 6. pseudo-class ``` selector: pseudo-class :link :visited :hover :active :nth-child //link can applied another style a:link, a:visited{ display:block; } a:hover, a:active{ } header li:nth-child(3){ } section div:nth-child(odd){ } section div:nth-child(4):hover{ } ``` 7. resolve conflict 1. simple rule: last declaration wins, (top to bottom, which the bottom declaration wins, external<internal declaration.) 2. even simple rule: declarations merge(different properties, merge to one) 8. specificity inner element style>id>classname>numbers of element ``` header.navigation p{}>p.blurb{}

Comments