Lesson02_05 Head Element _ Basics Tutorial

Source: Internet
Author: User
Tags character set
The header element is the element that is located between the

<title></title>

What's displayed on the title bar

<base>

Used to specify the base address of all hyperlinks in a Web page to change the base address of all URLs that use relative addresses in a Web page.
The use of the <base> label is as follows:
<base href= "http://www.loncer.cn/JStudy/" target= "_blank" >
property sheet
Property name function
Href Set the base address of the relative URL address of all HTTP protocols in the Web page, if the page has the following code:
<a href= "lesson01_03.html" >Lesson01_03</a>
It will open Http://www.loncer.cn/JStudy/Lesson01_03.html when clicked
Target Lets you set the target window for all hyperlinks in a Web page so that you can omit all hyperlinks
Add Target attribute

<link>

Defines the relationship between the current document and another document or resource
property sheet
Property name function
Href Defines the URL address of another resource, required
Rel and Rev Defines the type of relationship between the two resources that are linked by <link>, both of which must be selected
Title Describes the link's relationship, or it can be a string that describes the target resource, is optional
Type Gives the MIME type of the target resource, for example:
HTML is: "Text/html"
CSS for: "Text/css"
JavaScript is: "Text/javascript"
Media The media or media used to specify the destination data to be received, only on the specified output
  • Screen: On computer screens (default)
  • Print: Printer
  • Projection: Projector
  • Aural: Speaker
  • Braile: Braille Tactile sensing equipment (for the blind)
  • TTY: Fax typewriter
  • TV: Television
  • All: The above equipment used
Page-enter Effects of loading Web pages
Page-exit The effect that appears when you leave a Web page

<meta>

There are two main types of <meta> divided by different attribute names, namely: Name and Http-equiv.

Name property:

Use to add some descriptive information about a Web page to the Web page in the following format:
<meta name= "A set value" content= "the information specifically added to this setting value"
Name property sheet
name content
Keywords Tell the search engine to release the robot or spider, the content attributes filled in as a Web page keyword added to the search engine, the content attribute of multiple keywords can be separated by commas, such as: <meta name= "keywords" content= "China it database, all kinds of information, download" >
Description Add content to the search engine as a description of the content of the page, or, if not, a few lines at the beginning of the page that appear below the link to the page in the search results list.
Robots Tell the search engine to release the robots can be based on the content of the settings in the manner used, can be the following values
  • Index: This page can be retrieved and included (default value)
  • NOINDEX: This page cannot be retrieved and included
  • Follow: Let Robots/spider follow the hyperlinks on this page to look down
  • Nofollow: Don't let down
  • None: Nothing can be done
  • All: Anything can
Generator Used to describe the tool used to edit this page, in the content as a tool name
Author Used to describe the author of a Web page, in content
Copyright For copyright notices, content in the copyright notice

HTTP-EQUIV Properties:

The response header used to simulate an HTTP protocol in an HTML document, which is treated in the same way as a response message header sent by the WWW server when the browser reads the <meta> label with the HTTP-EQUIV attribute in the Web page file.

Http-equiv Property sheet
Property name function
Content-type Describes the MIME type of Web page content and the character set encoding used for text content, for example:
<meta http-equiv= "Content-type" content= "text/html;charset=gb2312" >
Refresh Specifies that the page is automatically refreshed after a certain period of time, for example:
<meta http-equiv= "Refresh" content= "1" > One second Refresh page
You can also add a URL after the time to jump to this page at a specified time, for example:
<meta http-equiv= "Refresh" content= "1";url=http://www.thinkme.cn>
Note: The URL is separated from the time by a comma
Expires Specifies that the Web page's expiration time in the browser, such as when the browser is on a computer that exceeds the time specified in the content, must be downloaded to the server when it is accessed. Note that the > settings in the Content property must use GMT time format, for example:
<meta http-equiv= "Expires" content= "mon,12, May 2006 00:20:00 GMT" >
Note: Setting content to 0 prevents browsers from using cached pages
Windows-target Forces the page to appear in a window. For example, use the following code to prevent your Web page from being made a frame page call <meta http-equiv= "Windows-target" content= "_top" >
Pragma Used to prevent browsers from caching this page on the local computer as follows:
<meta http-equiv= "Pragma" content= "No-cache" >

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.