HTML5 notes, html5 Reading Notes
HTML5 code snippet: http://jingyan.baidu.com/article/6fb756ecacf663241858fb29.htmlHTML5 Audio/Video tags, attributes, methods, and event summary:Http://bbs.html5cn.org/thread-86734-1-1.htmlHTML5 performance optimization: http://isux.tencent.com/h5-performance.htmlHTML5 get Geographic Positioning coordinates: http://bbs.html5cn.org/thread-84593-1-1.htmlUse of FileReader in html5.: http://bbs.html5cn.org/thread-84706-1-1.html1. In the default html style, the <I> and <em>, <B> and <strong> styles are the same. However, in terms of semantics, <I> and <B> are Performance Elements and only change the appearance. <em> and <strong> respectively mean the emphasizing and increasing of behaviors, more attention is given to search engines, and some voice readers will also increase their tone when reading. B is the abbreviation of bold, and I is the abbreviation of italic. Their "Semantics" only stays on the presentation layer, and does not play an important role. The browser only knows how to change its style. However, if you use <strong> and <em>, you can send a message to the browser, which is more friendly for search engine crawlers, let it know the semantic effect of your content. B and I only emphasize the visual effect, but the semantics is not helpful. In addition, em is used for local emphasis, and strong is the global emphasis. Visually, the emphasis of em is ordered. It is noticed only when you read it somewhere. Strong's emphasis is a random and unordered key word sentence that is immediately highlighted when you see a document. Em will change the sentence meaning, while strong emphasizes the importance and will not change the sentence meaning. In addition, all presentation elements are not recommended and should be replaced by css. 2. Use Google's html5shiv package (recommended): https://github.com/aFarkas/html5shiv <! -- [If lt IE9]> <script src =" http://html5shiv.googlecode.com/svn/trunk/html5.js "> </Script> <! [Endif] --> but no matter which method is used, the CSS of the new tag must be initialized. because HTML5 is represented by inline elements by default, we need to use CSS to manually convert these elements into block elements for convenient layout: // html5article, aside, dialog, footer, header, section, footer, nav, figure, menu {display: block}. However, if ie6/7/8 disables the script, it becomes a "whiteboard" webpage with no style, how can we solve this problem? We can refer to facebook's practice to guide users into the "/? _ Fb_noscript = 1 "page, use html4 tags to replace html5 tags, Which is lighter than writing a large number of hack to maintain compatibility. <! -- [If lte IE 8]> <noscript> <style>. html5-wrappers {display: none! Important ;}</style> <div class = "ie-noscript-warning"> scripts are disabled in your browser, please <a href = ""> check here </a> to enable the script! Or <a href = "/? Noscript = 1 "> continue access </a> </div> </noscript> <! [Endif] --> in this way, the user can be guided to open the script, or directly jump to the HTML 4 tag design interface.