Home >Web Front-end >H5 Tutorial >How to use the aside tag in HTML5? Do you know how to use the HTML5aside sidebar?

How to use the aside tag in HTML5? Do you know how to use the HTML5aside sidebar?

寻∝梦
寻∝梦Original
2018-08-15 17:39:2311099browse

How to use the aside tag in HTML5? Do you know how to use the HTML5aside sidebar? This article mainly explains the definition and usage of the aside tag in HTML5, as well as the detailed explanation and precautions of the aside element in HTML5.

HTML 5 15221ee8cba27fc1d7a26c47a001eb9b tag definition and usage:

15221ee8cba27fc1d7a26c47a001eb9b tag defines content other than article. The content of aside should be related to the content of article.

Here are examples:

<p>This summer, I finally came to PHP Chinese net.</p>
<aside>
<h4>Online programming</h4>
PHP Chinese network is a great platform for online learning programming in China.
</aside>

Detailed explanation of the 15221ee8cba27fc1d7a26c47a001eb9b element in HTML5:

The HTML15221ee8cba27fc1d7a26c47a001eb9b element represents a part of a page, Its content is not closely related to other content on this page, or is not related and exists alone. The 15221ee8cba27fc1d7a26c47a001eb9b element is usually displayed as a sidebar or some inserted supplementary content. It is usually used to display some definitions in the sidebar, such as catalogs, indexes, glossaries, etc.; it can also be used to display related advertising, author introductions, web applications, related links, a brief introduction to the current page content, etc.

Notes on using the 15221ee8cba27fc1d7a26c47a001eb9b element:

Do not use the 15221ee8cba27fc1d7a26c47a001eb9b element to mark text in brackets, because this type of text is considered the main part of the content.

Two ways to use the aside tag in HTML5:

1. It is included in the article element as ancillary information part of the main content. The content can be related information related to the current article. , ranking explanation, etc.

<article>
  <h1>…</h1>
  <p>…</p>
  <aside>…</aside>
</article>

2. Use it outside the article element as a global subsidiary information part of the page or site. The most typical one is the sidebar, which contains friendly links, lists of other articles in the blog, advertising units, etc.

<aside>
  <h2>…</h2>
  <ul>
    <li>…</li>
    <li>…</li>
  </ul>
  <h2>…</h2>
  <ul>
    <li>…</li>
    <li>…</li>
  </ul>
</aside>

Tips and Notes:

Tip: The content of 15221ee8cba27fc1d7a26c47a001eb9b can be used as a sidebar for the article.

What is web in HTML5? What are the elements in web storage?

What are the attributes of the HTML IMG tag? Learn how to use the IMG tag


The above is the detailed content of How to use the aside tag in HTML5? Do you know how to use the HTML5aside sidebar?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn