search
HomeWeb Front-endHTML TutorialDetailed explanation on the use of tag in html

Detailed explanation on the use of tag in html

Jun 19, 2017 pm 03:57 PM
htmluseaboutLabel

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.

can be nested and the inner and outer content are related.

Sample code:

The
<html>
<body>
<article>
<h5 id="HTML-nbsp-项目">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 id="标题">标题</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 id="标题">标题</h1>
    <p>发表日期:<time pubdate="pubdate">2011年7月10号</time></p>
  </header>
  <section>
    <h2 id="评论">评论</h2>
    <article>
      <header>
        <h3 id="张三的评论">张三的评论</h3>
        <p>12分钟前</p>
      </header>
      <p>……</p>
    </article>
    <article>
      <header>
        <h3 id="李四的评论">李四的评论</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 id="article标签使用方法">article标签使用方法</h1> 
<p>发表日期:<time pubdate="pubdate">2015/8/1</time></p> 
</header> 
<p>怎样使用article标签?</p> 
<section> 
<h2 id="评论">评论</h2> 
<article> 
<header> 
<h3 id="www-h-com零零H">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 id="零零H-www-h-com">零零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
Understanding HTML, CSS, and JavaScript: A Beginner's GuideUnderstanding HTML, CSS, and JavaScript: A Beginner's GuideApr 12, 2025 am 12:02 AM

WebdevelopmentreliesonHTML,CSS,andJavaScript:1)HTMLstructurescontent,2)CSSstylesit,and3)JavaScriptaddsinteractivity,formingthebasisofmodernwebexperiences.

The Role of HTML: Structuring Web ContentThe Role of HTML: Structuring Web ContentApr 11, 2025 am 12:12 AM

The role of HTML is to define the structure and content of a web page through tags and attributes. 1. HTML organizes content through tags such as , making it easy to read and understand. 2. Use semantic tags such as, etc. to enhance accessibility and SEO. 3. Optimizing HTML code can improve web page loading speed and user experience.

HTML and Code: A Closer Look at the TerminologyHTML and Code: A Closer Look at the TerminologyApr 10, 2025 am 09:28 AM

HTMLisaspecifictypeofcodefocusedonstructuringwebcontent,while"code"broadlyincludeslanguageslikeJavaScriptandPythonforfunctionality.1)HTMLdefineswebpagestructureusingtags.2)"Code"encompassesawiderrangeoflanguagesforlogicandinteract

HTML, CSS, and JavaScript: Essential Tools for Web DevelopersHTML, CSS, and JavaScript: Essential Tools for Web DevelopersApr 09, 2025 am 12:12 AM

HTML, CSS and JavaScript are the three pillars of web development. 1. HTML defines the web page structure and uses tags such as, etc. 2. CSS controls the web page style, using selectors and attributes such as color, font-size, etc. 3. JavaScript realizes dynamic effects and interaction, through event monitoring and DOM operations.

The Roles of HTML, CSS, and JavaScript: Core ResponsibilitiesThe Roles of HTML, CSS, and JavaScript: Core ResponsibilitiesApr 08, 2025 pm 07:05 PM

HTML defines the web structure, CSS is responsible for style and layout, and JavaScript gives dynamic interaction. The three perform their duties in web development and jointly build a colorful website.

Is HTML easy to learn for beginners?Is HTML easy to learn for beginners?Apr 07, 2025 am 12:11 AM

HTML is suitable for beginners because it is simple and easy to learn and can quickly see results. 1) The learning curve of HTML is smooth and easy to get started. 2) Just master the basic tags to start creating web pages. 3) High flexibility and can be used in combination with CSS and JavaScript. 4) Rich learning resources and modern tools support the learning process.

What is an example of a starting tag in HTML?What is an example of a starting tag in HTML?Apr 06, 2025 am 12:04 AM

AnexampleofastartingtaginHTMLis,whichbeginsaparagraph.StartingtagsareessentialinHTMLastheyinitiateelements,definetheirtypes,andarecrucialforstructuringwebpagesandconstructingtheDOM.

How to use CSS's Flexbox layout to achieve centering alignment of dotted line segmentation effect in menu?How to use CSS's Flexbox layout to achieve centering alignment of dotted line segmentation effect in menu?Apr 05, 2025 pm 01:24 PM

How to design the dotted line segmentation effect in the menu? When designing menus, it is usually not difficult to align left and right between the dish name and price, but how about the dotted line or point in the middle...

See all articles

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
3 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Best Graphic Settings
3 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. How to Fix Audio if You Can't Hear Anyone
3 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
WWE 2K25: How To Unlock Everything In MyRise
3 weeks agoBy尊渡假赌尊渡假赌尊渡假赌

Hot Tools

SublimeText3 Linux new version

SublimeText3 Linux new version

SublimeText3 Linux latest version

DVWA

DVWA

Damn Vulnerable Web App (DVWA) is a PHP/MySQL web application that is very vulnerable. Its main goals are to be an aid for security professionals to test their skills and tools in a legal environment, to help web developers better understand the process of securing web applications, and to help teachers/students teach/learn in a classroom environment Web application security. The goal of DVWA is to practice some of the most common web vulnerabilities through a simple and straightforward interface, with varying degrees of difficulty. Please note that this software

ZendStudio 13.5.1 Mac

ZendStudio 13.5.1 Mac

Powerful PHP integrated development environment

SecLists

SecLists

SecLists is the ultimate security tester's companion. It is a collection of various types of lists that are frequently used during security assessments, all in one place. SecLists helps make security testing more efficient and productive by conveniently providing all the lists a security tester might need. List types include usernames, passwords, URLs, fuzzing payloads, sensitive data patterns, web shells, and more. The tester can simply pull this repository onto a new test machine and he will have access to every type of list he needs.

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use