問題描述
問題
我已經編碼了一段時間,并意識到頭部和頭部看起來完全一樣.它們是否相同,它們之間有什么區別?有區別嗎?
經過一番研究,我找不到太多這方面的信息,我可能沒有深入挖掘.我發現的信息是 <head>
標記從 HTML 1 開始出現,因為 <header>
標記出現在 HTML5 中.一個比另一個更穩定嗎?
總結
我想了解這兩個標簽之間的區別.我想要一個可信的/或官方的消息來源.如果可以,請發布您獲得信息的鏈接.代碼示例也會有所幫助!我要問的主要問題是是否有區別,如果有,有什么區別.其中一個有好處嗎?感謝您抽出寶貴時間閱讀本文.
快速谷歌搜索顯示以下內容:
頭部標簽:
HTML <head>
元素提供有關文檔的一般信息(元數據),包括其標題以及腳本和樣式表的鏈接/定義.報紙標題"
編輯:更新了參考,正如psuedocoder提到的,W3Schools 并不總是完全可靠的.
The Question
I've been coding for a while and realized that the head and header look exactly the same. Are they the same, and what is the difference between them? Does it make a difference?
After researching a bit I couldn't find much info on this, I may not have been digging deep enough. The info I found was that the <head>
tag came out since HTML 1 as the <header>
tag came out in HTML5. Is one more stable from the other?
Summary
I would like to understand the difference between the two tags. I would like a creditable/ or official source. If you can please post the link of where you got the information. A example of the code would be helpful too! The main question I am asking is whether there is a difference and if so what difference is there. Is there a benefit from one of them? Thank you for taking the time to read this.
A quick Google search reveals the following:
Head tag:
The HTML <head>
element provides general information (metadata) about the document, including its title and links to/definitions of scripts and style sheets. (HTML MDN)
Header tag:
The HTML <header>
element represents a group of introductory or navigational aids. It may contain some heading elements but also other elements like a logo, wrapped section's header, a search form, and so on. (HTML MDN)
-
In other words; the head tag is used for document title, styling, scripts, etc.
Whereas the header tag is used for headers as seen in articles.
Newspaper 'header'
EDIT: Updated reference, as psuedocoder mentioned, W3Schools is not always fully reliable.
這篇關于“頭"和“頭"之間的真正區別是什么?和“標題"標簽?的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!