八(第一篇)、主体结构元素——article元素、section元素
2024-09-16 16:13:55
article元素
article元素代表文档、页面或应用程序中独立的、完整的、可以独自被外部引用的内容。
他可以是一篇博客或者报刊中的文章,一篇轮胎帖子、一段用户评论或独立的插件,或其他任何独立的插件,或其他任何独立的内容。
article元素是可以嵌套使用的。
article元素可以用来表示插件。
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>article元素</title>
</head>
<body>
<article>
<header>
<h1>peace</h1>
<p>hello,hello</p>
</header> <p>hi,guy!</p> <article>
<header>作者</header>
<p>评论</p>
<footer>time</footer>
</article> <footer>
<p>这是底部</p> </footer>
</article> <article>
<h1>这是一个内嵌页面</h1>
<object>
<embed src="#" width="600" height="400">
</object>
</article>
</body>
</html>
section元素
section元素用于对网站或应用程序中页面上的内容进行分块。一个section元素通常由内容及其标题组成。
但section元素并非一个普通的容器元素;当一个容器需要被直接定义样式或通过脚本定义行为时,推荐使用div而非section元素。
段落,章节,特点是强调分段分块
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>section元素</title>
</head>
<body>
<section>
<h1>苹果</h1>
<p>这是一个水果,可以吃。很好吃</p>
</section> <article>
<h1>水果</h1>
<section>
<h2>红富士</h2>
<p>这是一个很红的苹果,很棒。</p>
</section>
<section>
<h2>香蕉</h2>
<p>这是一个香蕉。</p>
</section>
</article> <section>
<h1>水果</h1>
<article>
<h2>红富士</h2>
<p>内容</p>
</article> <article>
<h2>香蕉</h2>
<p>内容</p>
</article> </section> </body>
</html>
最新文章
- Rockey 4加密狗介绍
- [内核同步]Linux内核同步机制之completion
- [知识库分享系列] 三、Web(高性能Web站点建设)
- javascript - 清空一个 array
- asp net 编程问题 实现下一篇 和上一篇效果
- nginx 日志和监控
- Mysql 演示示例存储过程
- 配置主机路由表(route)(两)
- [编织消息框架][设计协议]优化long,int转换
- .NET中利用反射来实现自动映射两个对象中的数据成员
- Oracle 12C 新特性之非分区表转分区表online clause(不停业务+索引有效)
- Android进阶(十)Android 发邮件
- 单元测试mock当前时间
- IntelliJ IDEA快捷键总结
- SQL SERVER中DBLINK的实现
- ERROR 2003 (HY000): Can&#39;t connect to MySQL server on ";192.168.xxx.xxx"; (111)
- 【转】失效迭代器(Invalidating Iterators)
- java抽象类和普通类的区别
- AOP 动态织入的.NET实现
- 1.安装hbase