英 [me?n]? ?美 [men]??

adj.主要的,最重要的;全力的

n.最主要的部分,重點;主要管道;體力;[航海]公海

復數(shù): mains

html main標簽 語法

作用:規(guī)定文檔的主要內(nèi)容。

說明:<main> 元素中的內(nèi)容對于文檔來說應當是唯一的。它不應包含在文檔中重復出現(xiàn)的內(nèi)容,比如側欄、導航欄、版權信息、站點標志或搜索表單。

注釋:在一個文檔中,不能出現(xiàn)一個以上的 <main> 元素。<main> 元素不能是以下元素的后代:<article>、<aside>、<footer>、<header> 或 <nav>。

html main標簽 示例

<!DOCTYPE html>
<html>
<body>

<main>
  <h1>Web Browsers</h1>
  <p>Google Chrome、Firefox 以及 Internet Explorer 是目前最流行的瀏覽器。</p>
 
</main> 

</body>
</html>

運行實例 ?

點擊 "運行實例" 按鈕查看在線實例