html页面布局

div和css定义

1.float 浮动属性

left
right
none
inherit

2.页面布局

  1. header:文档或者节的页眉
  2. nav:导航链接的容器
  3. section:文档中的节
  4. article:独立的自包含文章
  5. aside:内容之外的内容(e.g 侧栏)
  6. footer:文档或者节的页脚
  7. details:额外的细节
  8. summary:details元素的标题

    3.table 不是布局,尽量不用以布局

    1
    2
    3
    4
    5
    <table>
    <tr>
    <td/>
    </tr>
    </table>

4.所有元素样式

默认包含所有元素

1
2
3
4
5
//css
* {
padding: 0px
margin: 0px
}