.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
 
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
Sharon Maxwell

Home >> Forum >> Others >> Post New QuestionBookmark and Share Subscribe to Forum

html5 question

Posted By: Mervin     Posted Date: December 28, 2015    Points:5   Category :Others
Can a <section> contain <article> elements? Can an <article> contain <section> elements? if someone could explain with the help of an example that would be very useful.

Responses
Author: yasminpriya             
Posted Date: October 05, 2016     Points: 20   

It's entirely acceptable to nest them either way. Although the document outline does not distinguish between a <section> and an <article>, from a semantic point of view they are two different things. That's the whole point of introducing them as two distinct semantic elements.

Use the first snippet if your page consists of multiple articles.

Use the second snippet when you have an article that's comprehensive enough to contain multiple sections.

You can even combine them both if using both fits your content, such that your markup looks like this:

<section><h1>section article?</h1>
<article><h1>art 1</h1>
<section><h1>sec 1.1</h1></section>
<section><h1>sec 1.2</h1></section>
<section><h1>sec 1.3</h1></section>
</article>
<article><h1>art 2</h1>
<section><h1>sec 2.1</h1></section>
<section><h1>sec 2.2</h1></section>
<section><h1>sec 2.3</h1></section>
</article>
<article><h1>art 3</h1>
<section><h1>sec 3.1</h1></section>
<section><h1>sec 3.2</h1></section>
<section><h1>sec 3.3</h1></section>
</article>
</section>
For details visit http://www.hongkiat.com/blog/html5-section-article-elements/
Hope this helps you lots..( https://www.gangboard.com/big-data-training/data-science-training | https://www.gangboard.com/big-data-training/hadoop-admin-training | https://www.gangboard.com/operating-system-training/devops-training )

[URL=https://www.gangboard.com/big-data-training/data-science-training]Data Science Training[/URL]


Post Reply

You must Sign In To post reply
 
 
Find more Forum Questions on C#, ASP.Net, Vb.Net, SQL Server and more Here
Quick Links For Forum Categories:
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  OOPs  SilverlightIISJQuery
JavaScript/VBScriptBiztalkWPFPatten/PracticesWCFOthers
www.DotNetSpark.comUnAnsweredAll

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend