Home  >  Article  >  Web Front-end  >  Detailed explanation on the use of

tag in html

Detailed explanation on the use of
tag in html

黄舟
黄舟Original
2017-06-19 15:57:3413685browse

23c3de37f2f9ebcb477c4a90aac6fffd tag is used to define some external content. For example, some netizens' contributions, journalists' articles, or information extracted from a blog, forum, and other media materials.

The content that users see does not correspond to a specific page of this website. 23c3de37f2f9ebcb477c4a90aac6fffd can be nested and the inner and outer content are related.

Sample code:

The
<html>
<body>
<article>
<h5>HTML5 项目</h5>
<p>HTML5是用于修正现在html的下一个网页规范</p>
<p>HTML5是万维网结构方面的标准</p>
</article>
</body>
</html>

article element represents independent, complete content in a document, page or application in website production that can be independently referenced. It can be a blog or newspaper article, a forum post, a user comment, or otherany independent content. In addition to the content section, an article element usually serves as its own title and sometimes its own footer.

The following is an example of the article element:

<article>
  <header>
    <h1>标题</h1>
    <p>发表日期:<time pubdate="pubdate">2011年7月10号</time></p>
  </header>
  <footer>
    <p>w3cmm 版权所有</p>
  </footer>
</article>

The article element can be nested, and the inner content needs to be related to the outer content in principle. For example, in a blog post, comments on the article can be nested using article elements. The article element used to present the comments is included in the article element that represents the overall content.

The following is a code example about the article element:

<article>
  <header>
    <h1>标题</h1>
    <p>发表日期:<time pubdate="pubdate">2011年7月10号</time></p>
  </header>
  <section>
    <h2>评论</h2>
    <article>
      <header>
        <h3>张三的评论</h3>
        <p>12分钟前</p>
      </header>
      <p>……</p>
    </article>
    <article>
      <header>
        <h3>李四的评论</h3>
        <p>15分钟前</p>
      </header>
      <p>……</p>
    </article>
  </section>
</article>
</article>

The following is a look at the nested code of the article tag:

<article> 
<header> 
<h1>article标签使用方法</h1> 
<p>发表日期:<time pubdate="pubdate">2015/8/1</time></p> 
</header> 
<p>怎样使用article标签?</p> 
<section> 
<h2>评论</h2> 
<article> 
<header> 
<h3>www.00h5.com零零H5</h3> 
<p><time pubdate datetime="2015-8-1T:21-26:00">1小时前</time></p> 
</header> 
<p>不错!</p> 
</article> 
<article> 
<header> 
<h3>零零H5www.00h5.com</h3> 
<p><time pubdate datetime="2011-12-23T:21-15:00">小时</time></p> 
</header> 
<p>对article解释</p> 
</article> 
</section> 
</article>

The above is the detailed content of Detailed explanation on the use of

tag in html. 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