zoukankan      html  css  js  c++  java
  • html 结构的语义化

    1 <header>...</header>
    2 <nav>...</nav>
    3 <article>
    4   <section> ... </section>
    5 </article>
    6 <aside>...</aside> 
    7 <footer>...</footer>

    1 <figure id="fig2">
    2   <legend>Figure 2. Install Mozilla XForms dialog</legend>
    3   <img alt="A Web site is requesting permission to install the ollowing item: Mozilla XForms 0.7 Unsigned" src="installdialog.jpg" />
    4 </figure>

    <header>定义文档的页眉
    <nav>定义导航链接的部分

    <article>定义外部的内容,可以是一篇新的文章
    <section>定义文档的节(section、区段)。比如章节、页眉、页脚或文档中的其他部分。

    <aside>定义article以外的内容,aside的内容可用作文章的侧边栏

    <figure>用于对元素进行组合,使用figcaption元素为元素组添加标题

    <figcaption>定义figure元素的标题

    <hgroup>用于对section或网页的标题进行组合,使用figcaption元素为元素添加标题

    <time>定义日期或时间,或者两者。
    <footer>定义section或文档的页脚

    优点:

    1、语义化标签有利于屏幕阅读器的阅读

    2、确保网页是一种有意义的方式来渲染网页

    3、对搜索引擎友好

    4、

  • 相关阅读:
    在类的外面调用类的private函数
    Django多表操作
    Django聚合与分组查询中value与annotate的顺序问题
    Django路由控制
    cookie与session的区别与关系
    面试题之改变对象的类
    python实现双向链表
    python实现单向循环链表
    python中的顺序表
    顺序表
  • 原文地址:https://www.cnblogs.com/dovfwx/p/6481834.html
Copyright © 2011-2022 走看看