html5(2)

版权所有,禁止匿名转载;禁止商业使用。

安装开发工具

webstorm

https://www.jetbrains.com/webstorm/

dreamweaver

http://www.adobe.com/downloads.html

IntelliJ IDEA

https://www.jetbrains.com/idea/


article标签强调独立性,article可以嵌套使用;

<article>
   
<header>
       
作者
   
</header>
   
<p>评论</p>
   
<footer>时间</footer>

</article>
<article>
     
<object>
         
<embed src="#" width="300" height="600"></embed>
     
</object>
</article>

src=“#”链接当前页面;


section:强调的是分块;

 对内容进行分块,一个section元素通常由内容及(标题)组成,但section元素并不是普通的容器元素,当一个容器需要定义样式或通过脚本定义行为的时候,推荐使用div而非section;

注意:

设置样式选择div作为容器;

不要对没有标题的使用section;

 article, section, div 在没有加样式的时候显示的效果是一样的; 并且可以嵌套使用


 
<section>
    
<h1>标题</h1>
    
<p>我要说的内容</p>
 
</section>

article中可以嵌套sectionsection 中也可以嵌套article;


nav 应用场景:传统导航,侧边栏导航,页内导航,翻页操作;注意:不要用menu代替nav的使用;

<body>
<nav>
   
<ul>
       
<li><a href="#">主页</a> </li>
       
<li><a href="#">开发</a> </li>
   
</ul>
</nav>
<article>
   
<header>
       
<h1>html5css</h1>
       
<nav>
           
<ul>
               
<li><a href="#">html</a> </li>
               
<li><a href="#">css</a> </li>

           
</ul>
       
</nav>
   
</header>
   
<section>
       
<h1>html5</h1>
       
<p>描述</p>
   
</section>
   
<section>
       
<h1>css</h1>
       
<p>描述</p>
   
</section>
   
<footer>
       
<a href="#">删除</a>
       
<a href="#">修改</a>
   
</footer>

</article>
<footer> <p><small>版权声明</small></p></footer>
</body>

aside用于表示但前页面或文章的附属信息,它可以包含与当前页面有关或主要内容有关的引用,侧边栏,导航条,以及其他类似的有区别于主要内容的部分;

在article里面使用,在article外面使用;

<body>
<header>
   
<h1>入门</h1>
</header>
<article>
   
<h1>语法</h1>
   
<p>文章特征</p>
   
<aside>
       
<h1>解释</h1>
       
<p>文章特九宫格征</p>
   
</aside>
</article>
<aside>
   
<nav>
       
<ul>
           
<li><a href="#">评论</a> </li>
           
<li><a href="#">评论2</a> </li>
       
</ul>
   
</nav>

</aside>
</body>

time元素:

<body>
   
<time datetime="2015-10-10">2015-10-10</time>
   
<time datetime="2015-10-10T20:00">2015-10-10</time>
   
<time datetime="2015-10-10T20:00Z">2015-10-10</time>
   
<time datetime="2015-10-10T20:00+09:00">2015-10-10</time>

</body>

T时间间隔,Z表示utc标准时间;+09:00表示时差;

 

pubDate属性 bool,代表文章,整个网页的发布日期;


0 0