个性化阅读
专注于IT技术分析

HTML section标签

本文概述

HTML <section>标记用于定义文档中的部分。当你将内容放在网页上时, 它可能包含网页上的许多章节, 页眉, 页脚或其他部分, 这就是使用HTML <section>标记的原因。

HTML <section>是HTML5中引入的新标记。


HTML部分标签示例

CSS代码:

section{
border:1px solid pink;
padding:15px;
margin:10px;
}

HTML代码:

<h2> Indian Leader</h2>
<section>
<h3> Jawaharlal Nehru </h3>
<p> 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 </p>
</section>
<section>
<h3>Subhas Chandra Bose </h3>
<p>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</p>
</section>

立即测试

输出:

印度领袖

贾瓦哈拉尔·尼赫鲁(Jawaharlal Nehru)

贾瓦哈拉尔·尼赫鲁(Jawaharlal Nehru)是20世纪大部分时间的印度第一任总理, 也是印度政治的中心人物。在圣雄甘地的监护下, 他成为印度独立运动的最高领导人。来源维基百科

苏珊·钱德拉·波塞(Subhas Chandra Bose)

苏巴·钱德拉·玻色(Subhas Chandra Bose)是印度民族主义者, 他在第二次世界大战期间企图在纳粹德国和日本的帮助下摆脱印度对英国的统治, 这给他留下了困扰。尊贵的内塔吉语(印度斯坦语:“受尊敬的领导人”)最早于1942年由德国印地军团的印度士兵以及柏林印度特别局的德国和印度官员应用于德国的玻色。在整个印度广泛使用。源维基百科


<section>标记在HTML 5中支持全局和事件属性。


支持的浏览器

Element Chrome IE Firefox Opera Safari
<section> Yes Yes Yes Yes Yes
赞(0)
未经允许不得转载:srcmini » HTML section标签

评论 抢沙发

评论前必须登录!