Skip to main content

When to Use the HTML5 'section' Element


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.

http://forum.equestionnaire.ru/viewtopic.php?f=4&t=5284

https://registerm88.com/forum/viewtopic.php?id=256493

https://registerm88.com/forum/viewtopic.php?id=169634

https://registerm88.com/forum/viewtopic.php?id=211054

https://registerm88.com/forum/viewtopic.php?id=211261

https://registerm88.com/forum/viewtopic.php?id=156370

https://registerm88.com/forum/viewtopic.php?id=256136

http://forum.equestionnaire.ru/viewtopic.php?f=5&t=5261

http://www.80scartoons.net/forum/viewtopic.php?t=38043

http://www.80scartoons.net/forum/viewtopic.php?t=38191

http://www.80scartoons.net/forum/viewtopic.php?t=38230

http://www.80scartoons.net/forum/viewtopic.php?t=38530

http://www.80scartoons.net/forum/viewtopic.php?t=38257

http://www.80scartoons.net/forum/viewtopic.php?t=38370

http://www.80scartoons.net/forum/viewtopic.php?t=38234

http://forum.equestionnaire.ru/viewtopic.php?f=4&t=5213

http://3c-malabry.fr/phpBB3/viewtopic.php?f=6&t=2650

http://3c-malabry.fr/phpBB3/viewtopic.php?f=6&t=2889

http://3c-malabry.fr/phpBB3/viewtopic.php?f=6&t=3206

http://3c-malabry.fr/phpBB3/viewtopic.php?f=6&t=3015


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.


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:


  1. Article
  2. Aside
  3. Nav

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.


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.


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.

http://3c-malabry.fr/phpBB3/viewtopic.php?f=6&t=3162

http://3c-malabry.fr/phpBB3/viewtopic.php?f=6&t=2877

http://3c-malabry.fr/phpBB3/viewtopic.php?f=6&t=2595

http://forum.equestionnaire.ru/viewtopic.php?f=4&t=5234

http://www.onlinearabic.net/forum/forum_posts.asp?TID=17353

http://www.onlinearabic.net/forum/forum_posts.asp?TID=13705

http://www.onlinearabic.net/forum/forum_posts.asp?TID=11105

http://www.onlinearabic.net/forum/forum_posts.asp?TID=12086

http://www.onlinearabic.net/forum/forum_posts.asp?TID=5841

http://www.onlinearabic.net/forum/forum_posts.asp?TID=9663

http://www.onlinearabic.net/forum/forum_posts.asp?TID=9731

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.


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.


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.

http://www.forum.konferencje.com/viewtopic.php?t=48939

http://www.forum.konferencje.com/viewtopic.php?p=132378

http://www.forum.konferencje.com/viewtopic.php?t=98521

http://www.forum.konferencje.com/viewtopic.php?t=97476

http://www.forum.konferencje.com/viewtopic.php?t=8167

http://forum.equestionnaire.ru/viewtopic.php?f=4&t=5227

http://www.flyingfish.nl/forum/viewtopic.php?p=2378208

http://www.flyingfish.nl/forum/viewtopic.php?p=2391592

http://www.flyingfish.nl/forum/viewtopic.php?p=2328874

http://www.flyingfish.nl/forum/viewtopic.php?p=2398382

http://www.flyingfish.nl/forum/viewtopic.php?p=2406921

http://www.flyingfish.nl/forum/viewtopic.php?p=2298445

http://www.flyingfish.nl/forum/viewtopic.php?p=2354755

http://www.flyingfish.nl/forum/viewtopic.php?p=2376152

http://forum.equestionnaire.ru/viewtopic.php?f=4&t=5230

https://www.gerancecenter.com/forum/viewtopic.php?id=913

https://www.gerancecenter.com/forum/viewtopic.php?id=4379

https://www.gerancecenter.com/forum/viewtopic.php?id=113

http://wildfire-pro.com/Forum/viewtopic.php?t=362679

http://wildfire-pro.com/Forum/viewtopic.php?t=289424

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

Popular posts from this blog

How to Get Classic Solitaire for Windows 10

Ever since Windows 3.0 was released in 1990, a free version of solitaire has been included with the Windows operating system. In fact, it was once the application for Windows. https://www.burnleychat.co.uk/forum/showthread.php?tid=7&pid=8 http://omniwebit.com/KevinForum/Upload/showthread.php?tid=209605 https://imaginoproject.com/bb/showthread.php?tid=3523 http://www.scifidig.com/forums/showthread.php?tid=221961&pid=296689#pid296689 http://freebitcoin.co/forum/showthread.php?tid=841295 http://nhulit2.nhu.edu.tw/community/viewtopic.php?CID=4&Topic_ID=75 https://thehiphophub.ning.com/forum/topics/http-t-rexmuscleadvice-com-stack-testo-boost-360-16 Solitaire is actually a name referring to any card game played by a single person with a single deck of cards. Classic solitaire is a specific version, also known as Klondike.What Is Classic Solitaire? In classic solitaire, 28 cards are dealt face-down into seven columns with one card in the first column, two in th...

How to Use the Free ClamAV Linux Antivirus Software

Linux is considered by many people to be more secure than Windows, but like any computer, it can be vulnerable to Though the risk for contracting viruses on Linux may be somewhat low, it is still present, and many people don't use antivirus software on their Linux systems. As cybersecurity and attacks increase in prevalence, it is worth adding the extra peace of mind that antivirus software offers. That doesn't mean you have to spend a lot, however. This is where ClamAV comes in. http://www.voiphelp24.com/viewtopic.php?t=246366 https://forum.rufox.ru/?Act=viewtopic&tid=2622&p=73 https://www.imaginedragonsmusic.com/videos/imagine-dragons-thunder-live-ellen-degeneres-show2017 A Free Antivirus Solution ClamAV is an open-source antivirus software toolkit that is used to detect malicious software and viruses on a variety of operating systems, including Linux.  https://blackthen.com/dr-william-bill-key-slave-renowned-veterinarian/  It is often used on mail servers ...

How to Activate Disney+ on Your Device: A Simple Guide

 Disney+ offers an extensive collection of content, including beloved movies and shows from Disney, Pixar, Marvel, Star Wars, and National Geographic. Whether you're looking to catch up on classics or explore new releases, activating your Disney+ account on your device is the first step. Here’s a step-by-step guide to help you get started. How Do I Sign Up for Disney+? Before activating Disney+ on any device, you need to have an active subscription. If you’re new to Disney+, head over to Disney+ and sign up. You’ll need to provide your email address and select a subscription plan that fits your preferences. Once you’ve created your account, you’re ready to activate Disney+ on your devices. https://destinycard-com-activate.gorgias.help/en-US https://myuhccomcommunityplan.gorgias.help/en-US https://healthfirst-provider-portal.gorgias.help/en-US https://healthfirst-provider-portal.gorgias.help/en-US https://irs-8700-stimulus-check.gorgias.help/en-US https://cigna-provider-portal.gorgi...