HTML section: Main Tips
- HTML
section
tags surround a generic section of the content in a web page or application. - They were introduced in HTML5 and support global attributes.
- If you want to group elements to a generic container, use <div> tag instead.
- You must use both opening and ending
section
tags.
- Easy to use with a learn-by-doing approach
- Offers quality content
- Gamified in-browser coding experience
- The price matches the quality
- Suitable for learners ranging from beginner to advanced
- Free certificates of completion
- Focused on data science skills
- Flexible learning timetable
- Simplistic design (no unnecessary information)
- High-quality courses (even the free ones)
- Variety of features
- Nanodegree programs
- Suitable for enterprises
- Paid Certificates of completion
- A wide range of learning programs
- University-level courses
- Easy to navigate
- Verified certificates
- Free learning track available
- University-level courses
- Suitable for enterprises
- Verified certificates of completion
Using HTML section Tags
The HTML section
element, defined by section
tags, defines a section of a document, web page, or an application:
<section>
<h1>Section Heading</h1>
<p>The section tag can contain any elements.</p>
<img src="image.png" alt="section example">
</section>
Elements of a section are similar in theme and thus possible to group together logically. For example, a company's web site might have separate sections for contact information, news, or special offers.
For identification purposes, HTML sections usually have headings, like <h1>, <h2>, ... <h6>.
Note: HTML5 section is called a semantic element, because the tag defines its content. Such elements help browsers understand web pages correctly.