官术网_书友最值得收藏!

The <aside> element

As per the MDN definition:

The HTML <aside> element represents a section of the page with content connected tangentially to the rest, which could be considered separate from that content. These sections are often represented as sidebars or inserts. They often contain the definitions on the sidebars, such as definitions from the glossary; there may also be other types of information, such as related advertisements; the biography of the author; web applications; profile information or related links on the blog.

Here are a few important points to remember about the <aside> element:

  • Content that is tangential to the main content can be included in an <aside> element. If this content was to be separated from the main content, it would still make sense on its own.
  • There can be more than one <aside> in a single page.

Consider the following example:

<body>
    <main class="main-container" role="main">
        <article class="article-container flex-container">
            <section class="main-content">
              <header>
                  <h1>The <code>&lt;main></code> element  </h1>
              </header>
              <p>As per the MDN definition:</p>
              <blockquote>
                  <p>The HTML Main Element (<code>&lt;main></code>) 
  represents&hellip;</p>
              </blockquote>
            </section>
 <aside class="side-content" role="complementary">
 <h2>What Does "Semantic HTML" Mean?</h2>
 <p>Semantic markup basically means that we use HTML tags 
 to describe what a specific piece of content is.</p>
 </aside>
         </article>
      </main>
</body>

Tip

Tangential content means that the content refers to the subject at hand, but it's not part of the main message. If this content inside the <aside> element is removed, the main message is not affected.

主站蜘蛛池模板: 南召县| 杭锦后旗| 民丰县| 松滋市| 河北省| 高尔夫| 安西县| 子长县| 凤冈县| 肥东县| 西贡区| 乌什县| 弋阳县| 通化市| 梁山县| 兴国县| 桃园县| 福鼎市| 永仁县| 南城县| 孝感市| 东乌| 昌图县| 巨野县| 类乌齐县| 西乌珠穆沁旗| 札达县| 香格里拉县| 裕民县| 陇南市| 吉安市| 深泽县| 墨脱县| 银川市| 张北县| 伊金霍洛旗| 英吉沙县| 金平| 敦煌市| 岚皋县| 云阳县|