How To Use Section Tag In Html5
The html section tag is used to represent a section within an article.
How to use section tag in html5. The section tag was introduced in html 5. A rule of thumb is that a section should logically appear in the outline of a document. The section tag also supports the global attributes in html.
If it makes sense to separately syndicate the content of a section element use an article element instead. This is what div is for especially when the sectioning is only for styling purposes. If a part of the content deserves its own heading and that heading would be listed in a theoretical or actual table of contents it should be placed in a section.
Here is a brief explanation of each sectioning element and how they are used. Html section tag previous complete. Html5 has seen the introduction of a number of sectioning elements that can be used to mark up your web pages.
It can be used within articles in the header or footer or to define navigation. Most browsers will display the section element with the following default values. According to w3c s html documentation.
According to the html5 specification. Body is also kind of a sectioning element since all content lying inside of it is part of the default document section. The article element represents a section of content that forms an independent part of a document or site.
The section tag also supports the event attributes in html. The section element defines a section in a document. In this post you ll learn how to use these sectioning elements in your own web sites.