+ 1

<section> inside <article> is it really the case?

I have seen many use of <section>s typically used to contain few <div>s. I guess section is used for styling a web page properly. I didn't see much use of <article> but in the HTML course they are saying a <section> sould be declared inside an <article> tag. Which i have never seen. Does <article> tag have a real life use as a parent of <section> at all?

25th May 2019, 11:43 AM
Saifur Rahman Khan Saif
Saifur Rahman Khan Saif - avatar
1 Réponse
+ 2
You can use <section> to structure an article, or vice-versa, both need headings(h1-h6). I usually tend to use <section> inside <main> to place my content in the page and if I have some content like a blog post I put it in an <article> nested in a <section>. You can find more info here: - http://www.w3schools.com/tags/tag_article.asp - http://www.w3schools.com/tags/tag_section.asp
25th May 2019, 12:33 PM
‎‏‎‏‎Federico François
‎‏‎‏‎Federico François - avatar