“头部"与“头部"之间的真正区别是什么?和“标题"标签? [英] What is the real difference between the "head" and "header" tag?
问题描述
我已经编码了一段时间,并意识到头部和头部看起来完全一样.它们是相同的,它们之间有什么区别?有区别吗?
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?
在进行了一些研究之后,我找不到更多的信息,我可能还没有进行足够深入的研究.我发现的信息是<head>
标记自HTML 1开始出现,而<header>
标记在HTML5中出现.一个比另一个更稳定吗?
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?
我想了解两个标签之间的区别.我想要一个可靠的/或官方消息来源.如果可以,请发布获得信息的链接.代码示例也将有所帮助!我要问的主要问题是,是否存在差异,以及是否存在差异.他们其中之一有好处吗?感谢您抽出宝贵的时间阅读这篇文章.
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.
推荐答案
通过Google的快速搜索可以发现以下内容:
A quick Google search reveals the following:
头标签:
HTML <head>
元素提供有关文档的常规信息(元数据),包括其标题以及脚本和样式表的链接/定义. (HTML MDN)
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)
标题标签:
HTML <header>
元素代表一组入门或导航帮助.它可能包含一些标题元素,但也包含其他元素,例如徽标,包装部分的标题,搜索表单等. (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)
-
换句话说; head标签用于文档标题,样式,脚本等.
如文章中所见,header标签用于标题.
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.
报纸的标题"
编辑:更新了参考,如 psuedocoder 所述,W3Schools并不总是完全可靠的.
EDIT: Updated reference, as psuedocoder mentioned, W3Schools is not always fully reliable.
这篇关于“头部"与“头部"之间的真正区别是什么?和“标题"标签?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!