HTML5入门基础教程


1.在html发展历史中,最广为人知的是html3.2和html4.01.

2.将html与xml的长处加以结合,从而得到xhtml,xhtml是更严格、更纯净的html代码。

3.W3C组织使用DTD(Document Type Definition,文档类型定义)来定义html和xhtml的语义约束,包括出现那些元素,支持哪些属性。

4.html5是规范制定者对现实的妥协。

--------------------------------------分割线 --------------------------------------

HTML5 地理位置定位(HTML5 Geolocation)原理及应用

HTML5移动开发即学即用(双色) PDF+源码

HTML5入门学习笔记

HTML5移动Web开发笔记

HTML5 开发中的本地存储的安全风险

《HTML5与CSS3权威指南》及相配套源码

关于 HTML5 令人激动的 10 项预测

HTML5与CSS3实战指南 PDF

--------------------------------------分割线 --------------------------------------

5.HTML5的优势

    1>主流浏览器:IE(9)、chrome、firefox(firefox4)、opera(opera10)、safari(safari5)

    2>部分替代了原来的js:如自动获取焦点:<input type=text autofocus name=price>

    3>更明确的语义支持:代替清一色的div页面结构

    <!DOCTYPE HTML>
     
    <html>
     
        <head>
            <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
            <title>Website Title</title>
        </head>
     
        <body>
     
          <strong> <header>
                <nav></strong>
                    <ul>
                        <li>Home</li>
                        <li>Contact</li>
                    </ul>
              <strong> </nav>
            </header>
     
            <section>
     
                <article> </strong>
                    <header>
                        <h2>Title Goes here</h2>
                        <p>Posted on <time datetime="2012-07-28T13:00:24+01:00">July 28th 2012</time> by <a href="#">Author</a> - <a href="#comments">12 comments</a></p>
                    </header>
                    <p>Lorem Ipsum is simply dummy text of the printing and typesetting industry.</p>
              <strong> </article>
     
                <article></strong>
                    <header>
                        <h2>Article title</h2>
                        <p>Posted on <time datetime="2012-07-26T13:00:24+01:00">July 26th 2012</time> by <a href="#">Author</a> - <a href="#comments">9 comments</a></p>
                    </header>
                    <p>Lorem Ipsum is simply dummy text of the printing and typesetting industry.</p>
                <strong></article>
     
            </section>
     
            <aside> </strong>
                <h2>Contact Us</h2>
                <p>It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout.</p>
          <strong> </aside>
     
            <footer></strong>
                <p>Copyright 2012 DigiMantra Labs ?</p>
          <strong> </footer> </strong>
     
        </body>
     
    </html>

 上述<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> 可以简化为<meta  charset="UTF-8" />

<em>元素表示被强调,可以用以下:

<time>2014-08-02</time>

<mark>被标记的文本</mark>

    4>增强了web应用程序的功能

6.html5的基本结构:

  <! DOCTYPE html>: DTD定义

  基本结构像5.3>代码所示

7.html5的语法变化

    1>标签不再区分大小写

    2>元素可以省略结束标签

                          eg:img、input、hr、embed、link、p、tr、td、th、thead、tbody等,可以省略全部标签的元素:html、head、body、tbody。

    3>可以省略属性值得属性 

                          eg:selected、disabled、checked、readonly、multiple、nowrap等

    4>允许属性值不使用引号(含有空格等容易引起浏览器混淆的属性值建议用引号)

8.注意:

              不要在<html>和<head>之间插入任何内容!

              不要在</head>和<body>之间插入任何内容!

              不要在</body>和</html>之间插入任何内容!

更多详情见请继续阅读下一页的精彩内容:

  • 1
  • 2
  • 3
  • 4
  • 下一页

相关内容

    暂无相关文章