HTML:
Tag - TechOnTheNet

TechOnTheNet Logo
  1. Home
  2. HTML
totn HTML HTML: <section> tag

This HTML tutorial explains how to use the HTML element called the <section> tag with syntax and examples.

Description

The HTML <section> tag is an HTML5 element that defines a generic section in the HTML document. This tag is also commonly referred to as the <section> element.

Syntax

In HTML, the syntax for the <section> tag is:

<body> <section> <h1>Heading for Section</h1> <p>Text that appears under section</p> </section> </body>

Attributes

Only the Global Attributes apply to the <section> tag. There are no attributes that are specific to the <section> tag.

Note

  • The HTML <section> element is an HTML5 element that is found within the <body> tag.
  • The <section> tag is typically used as a thematic grouping of content.
  • For IE browsers older than IE 9, use HTML5shiv which is a javascript workaround to provide support for the new HTML5 elements such as: <header>, <main>, <article>, <section>, <aside>, <nav>, <footer>.

Browser Compatibility

The <section> tag has basic support with the following browsers:

  • Chrome 5+
  • Android 2.2+
  • Firefox 4.0+ (Gecko 2.0+)
  • Firefox Mobile 4.0+ (Gecko 2.0+)
  • Internet Explorer 9.0+ (IE 9.0+)
  • IE Phone 9.0+
  • Opera 11.10+
  • Opera Mobile 11.0+
  • Safari 4.1+ (WebKit)
  • Safari Mobile 5.0+ (iOs 4.2+)

Example

We will discuss the <section> tag below, exploring examples of how to use the <section> tag in HTML5, HTML 4.01 Transitional, XHTML 1.0 Transitional, XHTML 1.0 Strict, and XHTML 1.1.

  • HTML5
  • HTML4
  • XHTML

HTML5 Document

If you created a new web page in HTML5, your <section> tag might look like this:

<!doctype html> <html> <head> <meta charset="UTF-8"> <title>HTML5 Example by www.techonthenet.com</title> </head> <body> <section> <h1>Heading for Section</h1> <p>Text that appears under section</p> </section> </body> </html>

In this HTML5 Document example, we have created a <section> tag that displays 2 tags - <h1> tag and <p> tag.

HTML 4.01 Transitional Document

You can not use the <section> tag in HTML 4.01 Transitional.

XHTML 1.0 Transitional Document

You can not use the <section> tag in XHTML 1.0 Transitional.

XHTML 1.0 Strict Document

You can not use the <section> tag in XHTML 1.0 Strict.

XHTML 1.1 Document

You can not use the <section> tag in XHTML 1.1.

previousNEXT: <header>next Share on:

Databases

  • SQL
  • Oracle / PLSQL
  • SQL Server
  • MySQL
  • MariaDB
  • PostgreSQL
  • SQLite

MS Office

  • Excel
  • Access
  • Word

Web Development

  • HTML
  • CSS
  • JavaScript
  • Color Picker

Programming

  • C Language

More

  • ASCII
  • Unicode
  • Linux
  • UNIX
  • Techie Humor
clear filter down caret

HTML Elements

  • <!DOCTYPE>
  • <a>
  • <abbr>
  • <address>
  • <area>
  • <article>
  • <aside>
  • <b>
  • <base>
  • <blockquote>
  • <body>
  • <br>
  • <button>
  • <canvas>
  • <caption>
  • <cite>
  • <code>
  • <col>
  • <colgroup>
  • <datalist>
  • <dd>
  • <del>
  • <dfn>
  • <div>
  • <dl>
  • <dt>
  • <em>
  • <embed>
  • <fieldset>
  • <footer>
  • <form>
  • <h1>
  • <h2>
  • <h3>
  • <h4>
  • <h5>
  • <h6>
  • <head>
  • <header>
  • <hr>
  • <html>
  • <i>
  • <iframe>
  • <img>
  • <input>
  • <ins>
  • <kbd>
  • <label>
  • <legend>
  • <li>
  • <link>
  • <main>
  • <map>
  • <mark>
  • <marquee>
  • <menu>
  • <meta>
  • <nav>
  • <noscript>
  • <object>
  • <ol>
  • <optgroup>
  • <option>
  • <p>
  • <pre>
  • <q>
  • <s>
  • <script>
  • <section>
  • <select>
  • <small>
  • <span>
  • <strong>
  • <style>
  • <sub>
  • <sup>
  • <table>
  • <tbody>
  • <td>
  • <tfoot>
  • <th>
  • <thead>
  • <time>
  • <title>
  • <tr>
  • <u>
  • <ul>
right caret

Deprecated HTML Elements

  • <acronym>
  • <basefont>
  • <big>
  • <center>
  • <font>
  • <strike>

Home | About Us | Contact Us | Testimonials | Donate

While using this site, you agree to have read and accepted our Terms of Service and Privacy Policy.

Copyright © 2003-2025 TechOnTheNet.com. All rights reserved.

Tag » What Is Section In Html