Cheap VPS & Xen Server


Residential Proxy Network - Hourly & Monthly Packages

HTML Section Tag


The HTML <section> tag is used to define sections in a document. When you put your content on a web page, it may contains many chapters, headers, footers, or other sections on a web page that is why HTML <section> tag is used.

HTML <section> is a new tag introduced in HTML5.


HTML section tag example

CSS code:

  1. section{
  2. border:1px solid pink;
  3. padding:15px;
  4. margin:10px;
  5. }

HTML code:

  1. <h2> Indian Leader</h2>
  2. <section>
  3. <h3> Jawaharlal Nehru </h3>
  4. <p> Jawaharlal Nehru was the first Prime Minister of India and a central figure in
  5. Indian politics for much of the 20th century. He emerged as the paramount leader of the Indian
  6. independence movement under the tutelage of Mahatma Gandhi. -Source Wikipedia </p>
  7. </section>
  8. <section>
  9. <h3>Subhas Chandra Bose </h3>
  10. <p>Subhas Chandra Bose was an Indian nationalist whose attempt during World War II to rid India of
  11. British rule with the help of Nazi Germany and Japan left a troubled legacy.
  12. The honorific Netaji (Hindustani language: “Respected Leader”), first applied to Bose in Germany,
  13.  by the Indian soldiers of the Indische Legion and by the German and Indian officials
  14.  in the Special Bureau for India in Berlin, in early 1942, is now used widely throughout India. -source Wikipedia</p>
  15. </section>

Test it Now

Output:

Indian Leader

Jawaharlal Nehru

Jawaharlal Nehru was the first Prime Minister of India and a central figure in Indian politics for much of the 20th century. He emerged as the paramount leader of the Indian independence movement under the tutelage of Mahatma Gandhi. -Source Wikipedia

Subhas Chandra Bose

Subhas Chandra Bose was an Indian nationalist whose attempt during World War II to rid India of British rule with the help of Nazi Germany and Japan left a troubled legacy. The honorific Netaji (Hindustani language: “Respected Leader”), first applied to Bose in Germany, by the Indian soldiers of the Indische Legion and by the German and Indian officials in the Special Bureau for India in Berlin, in early 1942, is now used widely throughout India. -source Wikipedia


The <section> tag supports global and event attributes in HTML 5.


Supporting Browsers

Element chrome_browser Chrome ie_browser IE firefox_browser Firefox opera_browser Opera safari_browser Safari
<section> Yes Yes Yes Yes Yes

Comments

comments