10 Jul HTML5 article Tag
The tag <article> introduced in HTML5 and can be used for a blog post, article, comment etc. As the name suggests, the HTML5 article tag specifies self-contained content.
Here’s the structure how <article> is used,
1 2 3 4 5 6 7 8 9 10 11 12 13 |
<!DOCTYPE html> <html> <head> <title></title> </head> <body> <article> … </article> </body>] </html> |
Example
Here’s an example showing the working of the HTML5 <article> element,
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
<!DOCTYPE html> <html> <head> <title>Understanding HTML5 article tag</title> </head> <body> <article> <h1>One Day International</h1> <p>It is a form of cricket played between two teams. The overs are limited (fixed) and the match has international status. It goes on for a day.</p> </article> </body> </html> |
Here’s the output,
No Comments