Publish in HTML Tutorial el 25/05/2025 16:06
The <section> element is a semantic HTML tag used to define thematic groupings of content in a document. Unlike generic containers like <div>, <section> carries meaning about the structure of your content, helping search engines and assistive technologies understand your page organization.
Key characteristics of <section>:
Here's the fundamental structure of a section element:
Use <section> for:
Avoid using <section> as a generic container - for that purpose, <div> is more appropriate.
This shows a simple section containing an article preview:
Demonstrating how sections can divide a long article into logical parts:
Showing how sections can be styled while maintaining semantic meaning:
Demonstrating how sections can be manipulated with JavaScript:
Showing how sections can be loaded dynamically via AJAX:
When using <section> elements:
By properly using <section> elements, you create more semantic, accessible, and maintainable HTML documents.
The <style> HTML element contains style information for a document, or part of a document. ...
The <strong> element is used to indicate that its content has strong importance, seriousnes...
The <span> element is an inline container used to mark up a part of a text or document. Unl...
The <source> element is used to specify multiple media resources for media elements like &l...
The <small> element is used to represent side-comments and small print, typically for discl...
The <script> HTML element is used to embed or reference executable code, typically JavaScri...