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:
HTML code:
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 | IE | Firefox | Opera | Safari |
<section> | Yes | Yes | Yes | Yes | Yes |