The head part of HTML is detailed

Source: Internet
Author: User
Tags script tag

Open a Web page, right-click to view the page source code, always see

1. Title Tag

Title is a closed tag that appears in pairs in the head. That is <title>...</title>. When you open a Web page, the text above the page is the title section.

Title is a summary of the core idea of the entire page, but also a very important part of the setup of SEO. Title section as many times as possible to appear keywords: key keywords and long tail keywords. Specifically how to write the title part, depending on the needs. There is no standard for this.

2. Link label

The link tag is placed in

For example:

Introducing an external CSS style: <link rel= "stylesheet" type= "Text/css" href= "http://www .../style.css"/>

Set website small icon (favorite icon): <link rel= "shortcut icon" type= "Image/x-icon" href= "Http://....../favicon.ico"/>

Rel: What defines the relationship between the document and the linked document "Here is the external CSS style sheet, which is stylesheet. ”

Type: Specifies what type of open external linked document is, and the CSS in link is "type=" text/css. "Link in the website small icon notation" type= "Image/x-icon". ”

HREF: is an external CSS address.

3. Script Tag

Used in the head header tag, the function is to invoke the external JS file. The label is a closed tag, written in the same way as the div tag. In addition, the label can be used not only within the head header tag, but also anywhere inside the body tag. The end result is the same, usually in the head tag.

Example: <script src= "Http://www...../index.js" type= "Text/javascript" ></script>

SRC is called the JS file address. Type specifies how the JS file is opened.

4. Meta tags

Meta tags are often used as descriptive labels for Web page keywords, page descriptions, authors, page encodings, robots, and auto-jumps. This can be seen everywhere, with the use of META tags in any Web page.

4.1 Web page Display character Set page encoding

English: <meta http-equiv= "Content-type" content= "Text/html;charset=utf-8"/>

Traditional Chinese: <meta http-equiv= "Content-type" content= "text/html; Charset=big5 "/>

English: <meta http-equiv= "Content-type" content= "text/html; Charset=iso-8859-1 "/>

4.2 Web Creator Information

<meta name= "Author" content= "Evance"/>

4.3 Web page keywords

<meta name= "keywords" content= "Michael,blog"/>

4.4 Description of the page

<meta name= "description" content= "Michael,blog"/>

4.5 Prevent others from calling your page in the frame <meta http-equiv= "Window-target" content= "_top"/>

4.6 Auto Jump ( This label usage allows the page to automatically jump from the current page to another page or Web page after a few seconds ) <meta http-equiv= "Refresh" content= "5; url=http://www. Domain name. com "/> (useful!) )

Content followed by value is the current page in how many times jump

URL value to jump to a specific Web site

4.7. The Web page tells the Search Robot Wizard to work on this page (to tell the search robot which pages need to be indexed, which pages do not need to be indexed) <meta name= "Robots" content= "all"/>

The content parameters are all,none,index,noindex,follow,nofollow. The default is all. If you do not add this label to a page by default content= "All" means search and ingest crawl crawl this page and this page points to the page.

None: Search engines will ignore this page, equivalent to Noindex,nofollow.

Noindex: Search engines do not index this page.

Nofollow: The search engine does not continue to search for other pages through the link index of this page.

All: The search engine will index this page with a link to continue through this page, equivalent to Index,follow.

Index: Search engine indexes this page.

Follow: The search engine continues to search for other pages through the link index of this page.

5. Style Label

Common style tags are labeled as placing a CSS style with the place JavaScript (JS) code.

First <style></style> is a pair of closed tags with a start and end.

5.1 Placing CSS Styles

<style type= "Text/css" >...</style> middle for CSS style code.

CSS code in HTML will only take effect if it is placed within its <style type= "text/css" > tag.

5.2 Placing JS Code

<style type= "Text/javascript" >...</style>

In HTML The JS code is generally placed in the <style type= "Text/javascript" > tag.

The head part of HTML is detailed

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.