search
HomeWeb Front-endHTML TutorialHow to click the head tag in html? What elements are included in the head tag?

This article mainly tells you about the introduction of the HTML head tag, the introduction and usage instructions of the four elements contained in it, and the tutorial on how to find the head tag in the web page. Let’s start this article now

First of all, let’s solve the previous problem. How to click on the head tag?

The head tag of HTML cannot be seen in the web page, so how to find the head tag in the web page? First, we right-click on a web page and click View Source File. Here I use PHP Chinese website as an example:

How to click the head tag in html? What elements are included in the head tag?

How to click the head tag in html? What elements are included in the head tag?

As shown in the two pictures above, the head tag in the web page can be found.

Let’s take a look at the second question, the elements contained in the head tag

Today we mainly introduce the common usage of the four tags: title\meta\link\base

1.

The title tag is used to set the website title. When it is in the default state (not set), the current web page is in the browser The displayed website title is the name of the file.

2.

meta tag usually has the following three uses

1. Setting Web page encoding is used to tell the browser the encoding method of the current web page to prevent garbled characters

Usage:

2. Set web page keywords, Provide services for search engines.

Usage:

Note: name="keywords" is Fixed writing method; the attribute value of content is the keyword to be set, and the keywords are separated by commas.

3. Set the website description information to provide services for search engines. The corresponding description information will be displayed in In the website introduction of the search interface.

How to use:

The following is the search keyword "news" using Baidu When the result appears,

How to click the head tag in html? What elements are included in the head tag?

#3. tag

The link tag usually has the following two uses

1. Reference external style sheet

Usage:

Note:

You can reference multiple external css files at the same time through the link tag

2. Set the web icon

Usage:

Note: href points to the path of the image. Generally, the icon is placed in the root directory of the website to facilitate search engine crawling.

Note: The image is not required to be an ico file Files in image formats such as .jpg or png are also acceptable.

4. tag

The base tag is the declaration tag for the default opening method of the web page.

Usage:

The above is the entire content of this article, an introduction to the elements contained in the head tag in HTML. (If you want to know more about tags, welcome to the PHP Chinese website) If you have any questions, you can ask them below.

【Editor’s Recommendation】

html How to wrap p tag? Application of html p tag to add br line break tag

What is the function of form tag in HTML? Explanation of usage of HTML form tag

The above is the detailed content of How to click the head tag in html? What elements are included in the head tag?. 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
HTML超文本标记语言--超在那里?(文档分析)HTML超文本标记语言--超在那里?(文档分析)Aug 02, 2022 pm 06:04 PM

本篇文章带大家了解一下HTML(超文本标记语言),介绍一下HTML的本质,HTML文档的结构、HTML文档的基本标签和图像标签、列表、表格标签、媒体元素、表单,希望对大家有所帮助!

web前端笔试题库之HTML篇web前端笔试题库之HTML篇Apr 21, 2022 am 11:56 AM

总结了一些web前端面试(笔试)题分享给大家,本篇文章就先给大家分享HTML部分的笔试题(附答案),大家可以自己做做,看看能答对几个!

html5标签head和header有什么区别html5标签head和header有什么区别Jan 17, 2022 am 11:10 AM

区别:1、head标签用于定义文档头部,它是所有头部元素的容器,而header标签用于定义文档的页眉(介绍信息);2、浏览器都支持head标签,而旧版本浏览器均不支持header标签,需要IE9+以上浏览器才支持header标签。

Laravel中Head请求方法的常见应用场景Laravel中Head请求方法的常见应用场景Mar 06, 2024 pm 09:33 PM

Laravel中Head请求方法的常见应用场景在Laravel中,HTTP请求方法中的HEAD方法通常被用于获取资源的元数据而不获取实际的内容。HEAD请求和GET请求类似,但是不返回实际的响应主体内容,只返回响应头信息。这使得HEAD请求在一些特定的场景下非常有用,以下是一些常见的应用场景和相应的代码示例。验证链接的有效性使用HEAD请求方法可以用于验证链

总结HTML中a标签的使用方法及跳转方式总结HTML中a标签的使用方法及跳转方式Aug 05, 2022 am 09:18 AM

本文给大家总结介绍a标签使用方法和跳转方式,希望对大家有所帮助!

HTML5中画布标签是什么HTML5中画布标签是什么May 18, 2022 pm 04:55 PM

HTML5中画布标签是“<canvas>”。canvas标签用于图形的绘制,它只是一个矩形的图形容器,绘制图形必须通过脚本(通常是JavaScript)来完成;开发者可利用多种js方法来在canvas中绘制路径、盒、圆、字符以及添加图像等。

html中document是什么html中document是什么Jun 17, 2022 pm 04:18 PM

在html中,document是文档对象的意思,代表浏览器窗口的文档;document对象是window对象的子对象,所以可通过“window.document”属性对其进行访问,每个载入浏览器的HTML文档都会成为Document对象。

html5废弃了哪个列表标签html5废弃了哪个列表标签Jun 01, 2022 pm 06:32 PM

html5废弃了dir列表标签。dir标签被用来定义目录列表,一般和li标签配合使用,在dir标签对中通过li标签来设置列表项,语法“<dir><li>列表项值</li>...</dir>”。HTML5已经不支持dir,可使用ul标签取代。

See all articles

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

Repo: How To Revive Teammates
1 months agoBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
2 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island Adventure: How To Get Giant Seeds
1 months agoBy尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

Dreamweaver Mac version

Dreamweaver Mac version

Visual web development tools

mPDF

mPDF

mPDF is a PHP library that can generate PDF files from UTF-8 encoded HTML. The original author, Ian Back, wrote mPDF to output PDF files "on the fly" from his website and handle different languages. It is slower than original scripts like HTML2FPDF and produces larger files when using Unicode fonts, but supports CSS styles etc. and has a lot of enhancements. Supports almost all languages, including RTL (Arabic and Hebrew) and CJK (Chinese, Japanese and Korean). Supports nested block-level elements (such as P, DIV),

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment