The new HTML5 section element can be somewhat confusing. If you've been building HTML documents before HTML5, chances are you are already using the element to create structural divisions within your pages and then style the pages with them. So it might seem like a natural thing to simply replace your existing DIV elements with section elements. But this is technically incorrect.
The 'section' Element Is a Semantic Element
The SECTION element is a semantic element; it provides meaning to both user agents and humans about what the enclosed content is — specifically, a section of the document.
https://www.mitsubishi-forum.cz/koupe-ojeteho-vozu/koupe-mitsubishi-oulander-t5251.html
https://www.mitsubishi-forum.cz/koupe-ojeteho-vozu/liftback-versus-hatchback-t255911.html
https://www.mitsubishi-forum.cz/l200/koupe-ojeteho-l200-t48.html
https://www.dacia-forum.cz/logan/nevraci-se-spojkovy-pedal-t8434.html
https://www.dacia-forum.cz/koupim/shanim-nove-ci-pouzite-nahradni-dily-na-dacii-1300-t8426.html
https://www.dacia-forum.cz/prodam/n-autosklo-stripek-vymeny-autoskel-zdarma-bonus-az-2tis-t36.html
This may seem like a very general description, and that's because it is. There are other HTML5 elements that provide more semantic distinctions to your content that you should use first before you use the section element:
- Article
- Aside
- Nav
https://www.dacia-forum.cz/logan-van/dacia-logan-van-t10.html
When to Use the 'section' Element
Use the article element when the content is an independent part of the site that can stand alone and be syndicated like an article or blog post. Use the aside element when the content is tangentially related to either the content of the page or the site itself, such as sidebars, annotations, footnotes, or associated site information. Use the nav element for content that supports site navigation.
http://welcome2solutions.com/forum/topics.aspx?ID=32874
http://welcome2solutions.com/forum/topics.aspx?ID=32397
http://welcome2solutions.com/forum/topics.aspx?ID=32413
http://welcome2solutions.com/forum/topics.aspx?ID=32524
https://www.mitsubishi-forum.cz/tz-novinky/recenze-hella-pojistka-t255926.html
https://www.mitsubishi-forum.cz/servis/oprava-vyfuku-t255930.html
https://www.mitsubishi-forum.cz/tuning/wrap-folie-co-pouzivate-k-aplikaci-t255924.html
The section element is a generic semantic element. Use it when none of the other semantic container elements are appropriate. It combines portions of your document into discrete units that you can describe as related in some way. If you can't describe the elements in the section in one or two sentences, then you probably shouldn't use the element.
Instead, you should use the DIV element. The DIV element in HTML5 is a non-semantic container element. If the content you are trying to combine doesn't have a semantic meaning, but you still need to combine it for styling, then the DIV element is the appropriate element to use.
http://mrssodhi.com/discussions/showthread.php?tid=2291
https://elclubbilingue.com/forum/showthread.php?tid=366238
https://modelcarsforum.com/showthread.php?tid=24607
http://forum.naronanews.com/showthread.php?tid=6561
http://jirpg.net/showthread.php?tid=1165&pid=10322
http://forum.dawahfrontnigeria.com/showthread.php?tid=210441
http://forum.learninweb.com/showthread.php?tid=1065
https://hiztegia.labayru.eus/forum/showthread.php?tid=739
http://welcome2solutions.com/forum/topics.aspx?ID=32621
How the 'section' Element Works
A section of your document can appear as the outer container for articles and aside elements. It can also contain content that isn't part of an article or aside. A section element can also be found inside an article, nav, or aside. You can even nest sections to indicate that one group of content is a section of another group of content that is a section of an article or the page as a whole.
The section element creates items inside an outline of the document. And as such, you should always have a header element (H1 through H6) as a part of the section. If you can't come up with a title for the section, the DIV element is probably more appropriate.
https://www.volvo-forum.cz/prodam/prodam-volvo-850-t5-t258.html
https://www.volvo-forum.cz/v40/napinaci-kladka-t256.html
https://www.volvo-forum.cz/koupim/volvo-s60-klimakompresor-t236.html
https://www.volvo-forum.cz/tz-novinky/volvo-cx90-t2562.html
https://www.volvo-forum.cz/v70/vymena-skla-spatneho-zrkadla-t202.html
http://forum.shopheroes.com/viewtopic.php?t=2672
http://forum.shopheroes.com/viewtopic.php?t=7368
http://forum.shopheroes.com/viewtopic.php?t=717
https://www.redheronation.org/forums/showthread.php?tid=5701
https://www.actioncams.com.br/forum/showthread.php?tid=123919
If you don't want the section title to appear on the page, you can always mask it with CSS.
When Not to Use the 'section' Element
There is one purpose for which you should not use the section element: for style only.
In other words, if the only reason you're putting an element in that place is to attach CSS style properties, you should not use a section element. Find a semantic element or use the DIV element instead.
http://www.netfoos.com/forums/viewtopic.php?f=38&t=890
http://www.netfoos.com/forums/viewtopic.php?f=45&t=5247
https://www.toyota-forum.cz/auris/pojistkova-skrinka-t7752.html
https://www.toyota-forum.cz/prodam/topic-t7770.html
https://www.toyota-forum.cz/tz-novinky/prichazi-podzim-a-s-nim-i-mnoho-povinnosti-t7755.html
https://www.toyota-forum.cz/auto-hifi/subwoofer-do-kufru-t7758.html
https://www.toyota-forum.cz/avensis/problem-s-reproduktormi-avensis-t7724.html
https://www.peugeot-forum.cz/o-tomto-foru/air-jordan-1-t6476.html
https://www.peugeot-forum.cz/o-tomto-foru/nike-tavas-t6475.html
https://www.peugeot-forum.cz/o-tomto-foru/nike-air-jordan-1-t6547.html
Ultimately It May Not Matter
A difficulty in writing semantic HTML is that what is semantic to the browser may be utter nonsense to you. If you feel that you can justify using the section element in your documents, then you should use it. Most user agents don't care and will display the page as you might expect whether you style a DIV or a section.
https://mysourcetelevision.com/forum/showthread.php?tid=66730
https://www.redheronation.org/forums/showthread.php?tid=5735
https://www.actioncams.com.br/forum/showthread.php?tid=123606
http://mrssodhi.com/discussions/showthread.php?tid=65473
https://www.yousciences.it/forum/showthread.php?tid=802
http://forum.avazak.ir/showthread.php?tid=24621
http://forum.e-day.pl/viewtopic.php?f=29&t=502
http://forum.e-day.pl/viewtopic.php?f=29&t=446
http://forum.e-day.pl/viewtopic.php?f=29&t=113
http://forum.e-day.pl/viewtopic.php?f=9&t=451
http://forum.e-day.pl/viewtopic.php?f=76&t=1479
http://forum.e-day.pl/viewtopic.php?f=9&t=501
http://www.netfoos.com/forums/viewtopic.php?f=44&t=5223
For designers who like to be semantically correct, using the section element in a semantically valid way is important. For designers who just want their pages to work, that isn't as important. Writing semantically valid HTML is good practice and keeps the pages more future-proofed. But in the end, it's up to you.
Comments
Post a Comment