This article introduces the various components of the html head, including some common tags used in the head in html. Later, it demonstrates the use of these tags to netizens on the PHP Chinese website through examples, and has a complete case display. The header code of a web page.
html The definition and usage of the head tag:
tag is used to define the head of the document, which is a container for all head elements. Elements within can reference scripts, instruct the browser where to find style sheets, provide meta information, and more.The header of the document describes various attributes and information of the document, including the title of the document, its location on the Web, and its relationship with other documents. The data contained in the header of most documents will not actually be displayed to readers as content.
The following tags can be used in the head section:
html Examples of using the head tag:
<!DOCTYPE HTML> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <title>认识head标签</title> </head> <body> <h1>欢迎来到PHP中文网</h1> </body> </html>
The header of the document describes various attributes and information of the document, including the title of the document, etc. The data contained in the header of most documents will not actually be displayed to readers as content.
html Example of the title tag in the head tag:
<head> <title>hello world</title> </head>
html Elements contained in the head tag:
title , base, link, meta, script, style and other common tags.
html Explanation of elements contained in the head tag:
title is the only title tag of the web page -title tag
base is the default opening method of the web page. The declaration tag base
link is a link tag, including external css file references, js file references, favicon.ico icon references, etc. Link introduction
meta includes a wide range of content tags, such as web page keywords, web page introduction, author, web page encoding, robots, automatic jump and other declaration and description tags. Meta introduction
script is to introduce external js files to directly embed the js or css file tags of the web page in
style.
Browser support
All browsers support the
tag.【Editor's related recommendations】
html5 What is the role of the details tag?
The above is the detailed content of Introduction to html head tag (webpage head tag) elements and complete usage examples. For more information, please follow other related articles on the PHP Chinese website!
tag? Detailed explanation of the definition and function of html p tag