Main标签_html/css_WEB-ITnose

php中文网
发布: 2016-06-24 11:47:50
原创
2097人浏览过

main

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

<!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>
登录后复制

另一个例子:

<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

豆包AI编程
豆包AI编程

智能代码生成与优化,高效提升开发速度与质量!

下载
来源:php中文网
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn
最新问题
开源免费商场系统广告
热门教程
更多>
最新下载
更多>
网站特效
网站源码
网站素材
前端模板
关于我们 免责申明 意见反馈 讲师合作 广告合作 最新更新
php中文网:公益在线php培训,帮助PHP学习者快速成长!
关注服务号 技术交流群
PHP中文网订阅号
每天精选资源文章推送
PHP中文网APP
随时随地碎片化学习
PHP中文网抖音号
发现有趣的

Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号