Home >Web Front-end >HTML Tutorial >Introduction to html head tag (webpage head tag) elements and complete usage examples

Introduction to html head tag (webpage head tag) elements and complete usage examples

寻∝梦
寻∝梦Original
2018-08-25 10:15:577129browse

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:

93f0f5c25f18dab9d176bd4f6de5d30e tag is used to define the head of the document, which is a container for all head elements. Elements within 93f0f5c25f18dab9d176bd4f6de5d30e 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: dde6fb694e6711ae5e6f381704c04ae4, 2cdf5bf648cf2f33323966d7f58a7f3f, e8e496c15ba93d81f6ea4fe5f55a2244, 3f1c4e4b6b16bbbd69b2ee476dc4f83a, c9ccee2e6ea535a969eb3f532ad9fe89, and b2386ffb911b14667cb8f0f91ea547a7.

b2386ffb911b14667cb8f0f91ea547a7 Defines the title of the document and is the only required element in the head section.

Tip: The 93f0f5c25f18dab9d176bd4f6de5d30e tag should be placed at the beginning of the document, immediately after 100db36a723c770d327fc0aef2ce13b1 and before the 6c04bd5ca3fcae76e30b72ad730ca86d tag or f900b4fc197b16ab214eecf015bb6bd2 tag.

Tip: Remember to always give your document a title!

HTML93f0f5c25f18dab9d176bd4f6de5d30e tag example

A simple HTML document with the most basic required elements:

<html>
<head>
  <title>文档的标题</title>
</head>
<body>
  文档的内容... ...
</body>
</html>

html Optional attributes of the head tag:

profile: URL: A space-separated list of URLs that contain metadata information about the page.

html The main content of the head tag:

93f0f5c25f18dab9d176bd4f6de5d30e tag is used to define the head of the document, which is a container for all head elements. Elements within 93f0f5c25f18dab9d176bd4f6de5d30e 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 document's title, location on the Web, and relationship with other documents. The data contained in the header of most documents will not actually be displayed to readers as content.

Head is located at the head of the html web page, the tag after 100db36a723c770d327fc0aef2ce13b1 and before 6c04bd5ca3fcae76e30b72ad730ca86d, and is an html tag that starts with 93f0f5c25f18dab9d176bd4f6de5d30e and ends with 9c3bca370b5104690d9ef395f2c5f8d1.

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.

b2386ffb911b14667cb8f0f91ea547a7 tag: The text content between the b2386ffb911b14667cb8f0f91ea547a7 and 6e916e0f7d1e588d4f442bf645aedb2f tags is the title information of the web page, which will appear in the title bar of the browser. The title tag of a web page is used to tell users and search engines what the main content of the web page is. Search engines can quickly determine the theme of the web page through the title of the web page. The content of each web page is different, and each web page should have a unique title.

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 93f0f5c25f18dab9d176bd4f6de5d30e tag.

【Editor's related recommendations】

What is the color attribute of the HTML font tag? Introduction to the usage of fontcolor (with color code table)

html5 What is the role of the details tag? a5e9d42b316b6d06c62de0deffc36939Introduction to the use of tags (with usage examples)

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!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn