HTML5中的section标签是什么?HTML5中的section标签怎么居中?


当前第2页 返回上一页

类似于<li>元素,section元素是用来列举内容的。

因此在现实例子中,使用<section>元素的原因是结构化的列出博客的内容,代码如下:

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

<div class="blog">  

    <section class="post">  

        <h2 class="post-title">Blog Post Title</h2>  

        <p class="post-excerpt">Ice cream tart powder jelly-o.   

        Gummies chocolate cake ice cream cookie halvah tiramisu jelly-o.</p>  

    </section>  

    <section class="post">  

        <h2 class="post-title">Blog Post Title</h2>  

        <p class="post-excerpt">Ice cream tart powder jelly-o.   

        Gummies chocolate cake ice cream cookie halvah tiramisu jelly-o.</p>  

    </section>  

    <section class="post">  

        <h2 class="post-title">Blog Post Title</h2>  

        <p class="post-excerpt">Ice cream tart powder jelly-o.   

        Gummies chocolate cake ice cream cookie halvah tiramisu jelly-o.</p>  

    </section>  

</div>

这只是个例子,<section>元素也可以用作其他用途。

【元素有话说】

section:

hello,ladies and gentlemen,我是section。我参加的国际会议,是这么介绍我的,“The section element represents a generic section of a document or application. A section , in this context, is a thematic grouping of content, typically with a heading.” 我是带有语义的div,“Examples of sections would be chapters, the various tabbed pages in a tabbed dialog box, or the numbered sections of a thesis. A Web site’s home page could be split into sections for an introduction, news items, and contact information.”我出席的场景一般是有文章的章节、标签对话框中的标签页、或者论文中有编号的部分。一个网站的主页可以分成简介、新闻和联系信息等几部分。我不仅仅是一个普通的容器标签。当一个标签只是为了样式化或者方便脚本使用时,应该去找我的朋友 div 。一般来说,当元素内容明确地出现在文档大纲中时,我是很好的人选。通常会带有标题,<section><h1></h1><p></p></section>。我会用于对网站或者应用程序中页面上的内容进行分块。

【相关推荐】

HTML IMG标签的属性是有哪些?了解IMG标签的用法

HTML5中web是什么?web存储中的元素有哪些?

以上就是HTML5中的section标签是什么?HTML5中的section标签怎么居中?的详细内容,更多文章请关注木庄网络博客

返回前面的内容

相关阅读 >>

HTML5中的section标签是什么?HTML5中的section标签怎么居中?

更多相关阅读请进入《HTML5中的section标签》频道 >>




打赏

取消

感谢您的支持,我会继续努力的!

扫码支持
扫码打赏,您说多少就多少

打开支付宝扫一扫,即可进行扫码打赏哦

分享从这里开始,精彩与您同在

评论

管理员已关闭评论功能...