Mobile app version of vmapp.org
Login or Join
Gail5422790

: How to use tags in the home page of a blog? I have a home page of a blog where I have the img, title, date, and a brief summary or intro for each post. Then a link to the full text

@Gail5422790

Posted in: #Articles #Blog #Html5 #Markup

I have a home page of a blog where I have the img, title, date, and a brief summary or intro for each post. Then a link to the full text in another page. I am not sure how I should use <article> tags in the home page of the blog.


Should I use article for each post? (remember here I do not have the fulltext)
I shouldn't use article at all? Perhaps I should use only section for each post?
Perhaps the article is the group of all the posts and each post is a section?


I am not sure how to apply what I have found:

W3C says: "The <article> element represents an independent item section of content"

w3schools says: "The tag specifies independent, self-contained content.
An article should make sense on its own and it should be possible to distribute it independently from the rest of the site."

<div id="all">

<article id="1">
<img src="img-1.png" alt="alt of the img" >
<h3>Title 1</h3>
<div>Last update 2017-04-13</div>
<div class="text">Summary or introduction of the post</div>
<a class="more" href="post-1">More</a>
</article>

<article id="2">
<img src="img-2.png" alt="alt of the img" >
<h3>Title 2</h3>
<div>Last update 2017-04-13</div>
<div class="text">Summary or introduction of the post</div>
<a class="more" href="post-2">More</a>
</article>

</div>

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Gail5422790

1 Comments

Sorted by latest first Latest Oldest Best

 

@Gretchen104

Your code sample is a correct use of the article tag. Essentially, it is a semantics thing and can be used whenever you have grouped content with a changing repeatable element.

To be fully (and pedantically) correct, you would also use a main tag around all of the article tags to introduce the main idea/grouping relationship of the articles but I very rarely see that and almost never use it personally.

At the end of the day, semantic markup can help the more advanced search engine spiders classify your content but there are so many other signals involved that forgoing it usually does not produce any significant penalties.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme