September 9, 201312 yr Hello I am having a major debate with myself about when is appropriate to use the section and article tags with your document. After searching the web for hours I have found that it is not just me that is confused, most people even after reading the specification do not really know when exactly to use these tags. I'll give you an example of my webpage and a part of it where I think i could use the section and article tags and you can tell me whether or not you think it is appropriate. On my home page I have a section which is titled "recent work" and it has the 3 most current projects that I've been working on, now I personally think that the code could be written like so: <section> <h1>Recent Work</h1> <article> <h2>Project Title 1</h2> <p>Project Description 1</p> </article> <article> <h2>Project Title 2</h2> <p>Project Description 2</p> </article> <article> <h2>Project Title 3</h2> <p>Project Description 3</p> </article> </section> Please can someone tell me if this is correct or not, or what they think about this. Thanks Luke
September 9, 201312 yr There is no real 'correct' way when to use it as there are differing opinions depending on your actual content. As for scouring the web, while it's a few years old, this is a great link for clarity http://html5doctor.com/the-article-element/
September 9, 201312 yr Maybe you will find userfull to include <main> element in your layout. http://html5doctor.com/the-main-element/
September 13, 201312 yr I like having one <article> on the page for all body text, then divide the page up using <section>
September 27, 201312 yr Thanks for sharing valuable information about this topic really i like this post and i share to all my friends....
Create an account or sign in to comment