search

HTML Article Tag

Sep 04, 2024 pm 04:29 PM
htmlhtml5HTML TutorialHTML PropertiesHTML tags

HTML Article Tag has been introduced in HTML5 as a new edition. More specifically, they are found to represent an article. It is specified as independent data and probably used in forum posts, magazine publications, blogs, and user-enabled comments. It is represented by

tag. Moreover, defining a stylish element on a web page is similar to the
element. This article tag supports all types of browsers: Google Chrome, opera, internet explorer, and Edge. They are unlike a section tag of the general section but act as a standalone content part.

Syntax:

Here let’s see the immediate syntax of these tag elements.

<article>
<h1 id="">…</h1>
</article>

The structure follows the start tag. The next preceding section has

tag or

that forms a sub-heading, gives exact semantic information of the content, and provides much richer and more appropriate meaningful information. Like other tags, this article tag also supports HTML attributes like event attributes and global attributes for their appropriate class.

Example of

tag:

<article>
<h1 id="Introduction-to-CSS-demo">Introduction to  CSS demo</h1>
<p>CSS is a cascading Style Sheet helps to make a web page visually colored</p>
</article>

How Does Article Tag Work in HTML?

This section will discuss a simple article tag (self-contained content in a document) and see how it works on a web page. HTML 5 introduces new semantic content to enrich the content in search engines. They do support global and event attributes for the content. The tag’s content is considered an independent document from the other content part on the single page. They can define or demonstrate an article’s name on the page, author information, and publication date. This

tag can be used as a single element and multiple
elements.

A document having a single article element explains the main content of the document. It has individual unique single content, whereas, in the case of multiple

tags, a page has various contents; in another way, they are equivalent
elements. The main aim of the
tag is to help HTML code in cleaning the content by reducing the work of the
element.

Examples to Implement HTML Tag

Below are the examples of implementing HTML Tag:

Example #1

Example using Single

tag.

Code:



<title>HTML Article Tag demo</title>  

<article>
<h2 id="python">python</h2>
<p>Python is a new programming language</p>
</article>

Output:

HTML Article Tag

Example #2

An example illustrates using attribute

with the CSS style. It makes use of CSS  to display well in the web browser.

Code:


<title>Demo of article</title>


<article style="width: 200px; border: 1px solid black;
padding: 8px; border-radius: 8px;
margin:6px;">
<article>
<address>
Written by xxxxxx.<br>
refer me at: <br>
https://www.educba.com/ <br>
</address>
</article></article>

The below output shows the visitors the web page with the address to the link.

Output:

HTML Article Tag

Example #3

An example Demonstrating how to display a date and time with

.

Code:


<title>Demo of article tag</title>


<article style="width: 200px; border: 1px solid black;
padding: 8px; border-radius: 8px; color :green;
margin:6px;">
<article class="blog_post">
<p>My first article post. Stay tuned</p>
<footer>
<p>
Displayed on <time datetime="2019-12-24 20:00"> Dec 23</time> by tutor
</p>
</footer>
</article></article>

Output:

HTML Article Tag

Example #4

Example using multiple articles. The below code uses the semantic element

to specify the most significant header within the HTML content.

Code:

<style>
.JAN {
margin: 1;
padding: .2rem;
background-color: #D2691E;
font: 2rem 'Fira Sans', sans-serif;
}
.JAN > h1,
.day {
margin: .4rem;
padding: .2rem;
font-size: 1rem;
}
.day {
background: border-box no-repeat
gray;
}
.day > h2,
.day > p {
margin: .2rem;
font-size: 1rem;
}
</style>
<article class="JAN">
<h1 id="FEDERAL-HOLIDAYS-IN-USA">FEDERAL HOLIDAYS IN USA</h1>
<article class="day">
<h2 id="JAN">01 JAN 2020</h2>
<p>NEW YEAR DAY.</p>
<p> martin luther day </p>
</article>
<article class="day">
<h2 id="feb">18 feb 2020</h2>
<p>Presidents day.</p>
</article>
<article class="day">
<h2 id="May">05 May 2020</h2>
<h2 id="May">27 May 2020</h2>
<p>mothers day.</p>
<p>memorial day.</p>
</article>
</article>

Output:

HTML Article Tag

Example #5

We shall see the

tag is done with several
tags. Below are some pieces of code with output.

Code:

<style>
.art {
margin: 5;
padding: .3rem;
background-color: #DC143C;
font: 1rem 'italic', sans-serif;
}
</style>
<article class="art">
<section id="aim">
<p>[Main Objective]</p>
</section>
<section id="main_concept">
<p>[Content text]</p>
</section>
<section id="link page">
<ul>
<li><a href="tt.html">first link page</a></li>
<li><a href="th.html">second link page</a></li>
</ul>
</section>
</article>

Output:

HTML Article Tag

Example #6

Code:

<article>
<header>
<h1 id="On-this-page">On this page</h1>
<p>Published on 15th DEC 2019</p>
</header>
<p>WELCOME</p>
<p> EXAMPLES TOPIC</p>
<p>ILLUSTRATION</p>
<section>
<h2 id="Related-topics">Related topics</h2>
<article>
<footer>
<p>published by Mark winston</p>
</footer>
<p>This was a great article</p>
</article>
<article>
<footer>
<p>Posted by: Casey Brock</p>
</footer>
<p>What do you think about the topics with the comments please</p>
</article>
</section>
</article>

Here is a global header that contains web page headlines for any document with related content. Next comes the

tag, which links to the footer for a particular website and benefits SEO  by providing the company details in the footer section. Finally, the true way of using
tag is to embed or group the related contents of a page or, in another way; I can say that they are the autonomous section structure.

Output:

HTML Article Tag

Example #7

Article tag with the help of

tag.

Code:


<title>Demo of article tag</title>

<main>
<article>
<h1 id="Cloud-computing-Basics">Cloud computing Basics</h1>
<p>Used for data storage.</p>
<section>
<h2 id="Basic-and-syntax-part">Basic and syntax part</h2>
<p>With an example.</p>
</section>
<section>
<h2 id="Types-of-cloud-computing-services">Types of cloud computing services</h2>
<p>Private , public , hybrid</p>
</section>
</article>
</main>

Output:

HTML Article Tag

結論

結論として、この記事では Web ページで使用するためのいくつかのガイドについて説明します。これらは、単一の Web ページにドキュメント (独自に認識) またはコンテンツを含めるのに最適な選択肢であり、HTML5 では完璧なセマンティック要素であることが知られています。自己完結型のコンテキストであるため、最先端の Web サイトがこのタグを最大限に活用し始めたため、HTML5 で使用され、ブログや雑誌などのコンテンツを投稿する際にユーザーから報酬が得られます。

The above is the detailed content of HTML Article Tag. 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
How do you create a list in HTML?How do you create a list in HTML?May 06, 2025 am 12:01 AM

TocreatealistinHTML,useforunorderedlistsandfororderedlists:1)Forunorderedlists,wrapitemsinanduseforeachitem,renderingasabulletedlist.2)Fororderedlists,useandfornumberedlists,customizablewiththetypeattributefordifferentnumberingstyles.

HTML in Action: Examples of Website StructureHTML in Action: Examples of Website StructureMay 05, 2025 am 12:03 AM

HTML is used to build websites with clear structure. 1) Use tags such as, and define the website structure. 2) Examples show the structure of blogs and e-commerce websites. 3) Avoid common mistakes such as incorrect label nesting. 4) Optimize performance by reducing HTTP requests and using semantic tags.

How do you insert an image into an HTML page?How do you insert an image into an HTML page?May 04, 2025 am 12:02 AM

ToinsertanimageintoanHTMLpage,usethetagwithsrcandaltattributes.1)UsealttextforaccessibilityandSEO.2)Implementsrcsetforresponsiveimages.3)Applylazyloadingwithloading="lazy"tooptimizeperformance.4)OptimizeimagesusingtoolslikeImageOptimtoreduc

HTML's Purpose: Enabling Web Browsers to Display ContentHTML's Purpose: Enabling Web Browsers to Display ContentMay 03, 2025 am 12:03 AM

The core purpose of HTML is to enable the browser to understand and display web content. 1. HTML defines the web page structure and content through tags, such as, to, etc. 2. HTML5 enhances multimedia support and introduces and tags. 3.HTML provides form elements to support user interaction. 4. Optimizing HTML code can improve web page performance, such as reducing HTTP requests and compressing HTML.

Why are HTML tags important for web development?Why are HTML tags important for web development?May 02, 2025 am 12:03 AM

HTMLtagsareessentialforwebdevelopmentastheystructureandenhancewebpages.1)Theydefinelayout,semantics,andinteractivity.2)SemantictagsimproveaccessibilityandSEO.3)Properuseoftagscanoptimizeperformanceandensurecross-browsercompatibility.

Explain the importance of using consistent coding style for HTML tags and attributes.Explain the importance of using consistent coding style for HTML tags and attributes.May 01, 2025 am 12:01 AM

A consistent HTML encoding style is important because it improves the readability, maintainability and efficiency of the code. 1) Use lowercase tags and attributes, 2) Keep consistent indentation, 3) Select and stick to single or double quotes, 4) Avoid mixing different styles in projects, 5) Use automation tools such as Prettier or ESLint to ensure consistency in styles.

How to implement multi-project carousel in Bootstrap 4?How to implement multi-project carousel in Bootstrap 4?Apr 30, 2025 pm 03:24 PM

Solution to implement multi-project carousel in Bootstrap4 Implementing multi-project carousel in Bootstrap4 is not an easy task. Although Bootstrap...

How does deepseek official website achieve the effect of penetrating mouse scroll event?How does deepseek official website achieve the effect of penetrating mouse scroll event?Apr 30, 2025 pm 03:21 PM

How to achieve the effect of mouse scrolling event penetration? When we browse the web, we often encounter some special interaction designs. For example, on deepseek official website, �...

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

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

Atom editor mac version download

Atom editor mac version download

The most popular open source editor

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

SublimeText3 Linux new version

SublimeText3 Linux new version

SublimeText3 Linux latest version

EditPlus Chinese cracked version

EditPlus Chinese cracked version

Small size, syntax highlighting, does not support code prompt function

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor