京山网站建设,网站备案大概多久,深圳做微信商城网站建设,建立一个网址需要多少钱section section元素描绘的是一个文档或者程序里的普通的section节#xff0c;一般来说一个section包含一个head和一个content内容 块。section可以表示成一个小节#xff0c;或者tab页面里的一个tab下的box块。一个页面里可以拆分成多个section#xff0c;分别代表 introdu…section section元素描绘的是一个文档或者程序里的普通的section节一般来说一个section包含一个head和一个content内容 块。section可以表示成一个小节或者tab页面里的一个tab下的box块。一个页面里可以拆分成多个section分别代表 introduction, news items和contact information。 如果元素的内容集中到一起显示可以表达相应的意思的话那就可以定义成article元素而没必要使用section元素。 section元素不是一般的容器元素所以如果一个元素需要定义相应的style或者script脚本的话那推荐使用div元素section的使用条件是确保这个元素的内容能够明确地展示在文档的大纲里。 下面的例子代码来自苹果网站页面的一部分代码里包含了2个短小的section articlehgrouph1Apples/h1h2Tasty, delicious fruit!/h2/hgrouppThe apple is the pomaceous fruit of the apple tree./psectionh1Red Delicious/h1pThese bright red apples are the most common found in many supermarkets./p/sectionsectionh1Granny Smith/h1pThese juicy, green apples make a great filling for apple pies./p/section/article 可以看到在section里可以任意使用h1元素而不用考虑这个section是顶级的还是二级或者三级元素。 下面的代码是一个毕业典礼的页面包含2个section一个是显示将要毕业人的名单一个是显示毕业典礼的形式。 !DOCTYPE HtmlhtmlheadtitleGraduation Ceremony Summer 2022/title/headbodyh1Graduation/h1sectionh1Ceremony/h1pOpening Procession/ppSpeech by Validactorian/ppSpeech by Class President/ppPresentation of Diplomas/ppClosing Speech by Headmaster/p/sectionsectionh1Graduates/h1ulliMolly Carpenter/liliAnastasia Luccio/liliEbenezar McCoy/liliKarrin Murphy/liliThomas Raith/liliSusan Rodriguez/li/ul/section/body/html article article代表了一个文档内容的独立片段例如博客条目或报纸文章article标签的内容独立于文档的其余部分。 article 是一个特殊的 section 标签它比 section 具有更明确的语义, 它代表一个独立的、完整的相关内容块。一般来说 article 会有标题部分(通常包含在 header 内)有时也会 包含 footer 。虽然 section 也是带有主题性的一块内容但是无论从结构上还是内容上来说article 本身就是独立的、完整的。 当 article 内嵌 article 时原则上来说内部的 article 的内容是和外层的 article 内容是相关的。例如一篇博客文章中包含用户提交的评论的 article 就应该潜逃在包含博客文章 article 之中。 articlea hrefhttp://www.apple.comSafari 5 released/abr /7 Jun 2010. Just after the announcement of the new iPhone 4 at WWDC,Apple announced the release of Safari 5 for Windows and Mac....../article aside HTML5提供的aside元素标签用来表示当前页面或文章的附属信息部分可以包含与当前页面或主要内容相关的引用、侧边栏、广告、nav元素组以及其他类似的有别与主要内容的部分。 根据目前的规范aside元素有两种使用方法 n 被包含在article中作为主要内容的附属信息部分其中的内容可以是与当前文章有关的引用、词汇列表等。 n 在article之外使用作为页面或站点全局的附属信息部分最典型的形式是侧边栏(sidebar)其中的内容可以是友情链接、附属导航或广告单元等。 下面的代码示例综合了以上两种使用方法 bodyheaderh1My Blog/h1/headerarticleh1My Blog Post/h1pLorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua./paside!-- Since this aside is contained within an article, a parser should understand that the content of this aside is directly related to the article itself. --h1Glossary/h1dldtLorem/dtddipsum dolor sit amet/dd/dl/aside/articleaside!-- This aside is outside of the article. Its content is related to the page, but not as closely related to the above article --h2Blogroll/h2ullia href#My Friend/a/lilia href#My Other Friend/a/lilia href#My Best Friend/a/li/ul/aside/body转载于:https://www.cnblogs.com/z-j-n-2015/p/5279080.html