zoukankan      html  css  js  c++  java
  • Main标签

    main

    main 标签规定文档的主要内容。
    main 元素中的内容对于文档来说应当是唯一的。它不应包含在文档中重复出现的内容,比如侧栏、导航栏、版权信息、站点标志或搜索表单。
    注释:在一个文档中,不能出现一个以上的 main 元素。main 元素不能是以下元素的后代:articleasidefooterheadernav

    <!DOCTYPE html>
    <html lang="en">
    <head>
    <meta charset="UTF-8" />
    <title>Using main</title>
    </head>
    <body>
    <header>My page</header>
    <nav>
    	[url=#]Home[/url]
    </nav>
    <main>
    	<article>
    		<h1>My article</h1>
    		Content
    
    	</article>
    	<aside>
    		More information
    
    	</aside>
    </main>
    <footer>Copyright 2013</footer>
    </body>
    </html>
    

    另一个例子:

    <main>  
    
    <h1>Skateboards</h1>  
    The skateboard is the way cool kids get around  
    
    
    <article>  
    <h2>Longboards</h2>  
    Longboards are a type of skateboard with a longer   
    wheelbase and larger, softer wheels.  
    
    ...   
    
    ...   
    
    </article>  
    
    <article>  
    <h2>Electric Skateboards</h2>  
    These no longer require the propelling of the skateboard  
    by means of the feet; rather an electric motor propels the board,   
    fed by an electric battery.  
    
    ...   
    
    ...   
    
    </article>  
    
    </main>  
    
    <!-- other content -->  
    

    HTML 5中又新增加main标签

    the main element

  • 相关阅读:
    MySQL 练习题
    MySQL 增删查改
    HTML显示与隐藏
    360布局
    div布局
    HTML练习2
    HTML练习

    if语句的用法及其案例
    输入输出,数据类型与运算符
  • 原文地址:https://www.cnblogs.com/masai1969/p/4354285.html
Copyright © 2011-2022 走看看