0

How do i know when to use <section> or <aside>?

For instance, if I want to create an online retail store, will the items displayed for sale be coded as sections of the article or asides of the article. And why?

24th Jan 2017, 2:36 PM
Cody Arthur
Cody Arthur - avatar
5 Respostas
+ 4
if you are making online retail store then I advise you that you do not use section or aside..instead use div tags. If you are writing an article..you can divide the article using section. Aside is used if you want to put material around the article.
25th Jan 2017, 12:31 PM
A Man Has No Name
A Man Has No Name - avatar
+ 2
The <section> element "is a thematic grouping of content, typically with a heading." ( W3C's HTML5 documentation ) The <article> element specifies independent, self-contained content. An article should make sense on its own, and it should be possible to read it independently from the rest of the web site. source: http://www.w3schools.com/html/html5_semantic_elements.asp You must use the new semantics html5 elements to follow W3C recommendations, and because they are helpfull to better organize your content ( you can also benefit from a better indexation by search engines )... However, the semantics meanings are almost subjective... I think the most important is to have a logical content structure, even if tags like <section> are so little bit different from the generic <div> ( which still and initially stand for DIVision -- My interpretation is to use <section> as mothers divisions, and <div> for subdivision ( to limit the nested sections ) and generic content box ).
25th Jan 2017, 7:34 AM
visph
visph - avatar
+ 1
I dont think people use that at all. Create divs and place them around with the help of CSS rules.
24th Jan 2017, 3:10 PM
Nedim Kanat
Nedim Kanat - avatar
+ 1
aside is used when you want to replicate code mostly, like a sidebar with common links, otherwise use section.
25th Jan 2017, 12:14 PM
Andre van Rensburg
Andre van Rensburg - avatar
0
Aside for side content, maybe used for sidebar, navigation, and within article. All depend on your page structure.
25th Jan 2017, 5:11 PM
Automatic
Automatic - avatar