How do I point out the head tag in HTML? What are the elements contained in the head tag?

Source: Internet
Author: User
This article is about the introduction of the head tag of HTML, the introduction and use of the four elements, as well as a tutorial on how to find the head tag in the Web page. Now, let's start with this article.

First we solve the previous problem, how to point out the head tag?

HTML head tag can not be seen in the page, how to find the head tag in the Web page, first we in a page right click, click on the source file, here I use topic.alibabacloud.com as an example:

As shown in the above two charts, this will find the head tag in the Web page.

To take a look at the second question, the elements contained in the head tag

Today's main introduction, title\meta\link\base four kinds of tags common usage

First, <title>

The title tag is used to set the title of the Web site, and when it is the default (not set), the current Web page displays the name of the file in the browser.

Second, <meta>

Meta tags usually have the following three uses

1. Set the page encoding to tell the browser how to encode the current page, to prevent garbled

How to use: <meta charset= "Utf-8" >

2. Set Web page keywords to provide services for search engines.

How to use: <meta name= "keywords" content= "keyword 1, keyword 2" >

Note: name= "keywords" is a fixed notation; The Content property value is the keyword to be set, and the keywords are separated by commas.

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

How to use: <meta name= "description" content= "page description content" >

The following is the use of Baidu search keyword "News" when the results appear

Third, <link> label

The link label usually has the following two usage

1. Referencing an external style sheet

How to use: <link rel= "stylesheet" type= "Text/css" href= "1.css" >

Attention:

Multiple external CSS files can be referenced simultaneously through the link tag

2. Set the page icon

How to use: <link rel= "icon" href= "Favicon.ico" >

Note: href points to the path of the picture, the icon is generally placed in the root directory of the site, easy search engine crawl.

Note: Pictures are not mandatory for ico files. jpg or PNG files can also be used in image format.

Iv. <base> Labels

The base tag is the declaration label for the Web page's default open mode.

How to use: <base target= "_blank" >

The above is the entire content of this article, about the elements contained in the head tag in HTML. (Want to see more label knowledge, Welcome to topic.alibabacloud.com) There are questions can be asked below.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.