Home > Web Front-end > CSS Tutorial > Lesson02_05 Header Element_Basic Tutorial

Lesson02_05 Header Element_Basic Tutorial

WBOY
Release: 2016-05-16 12:08:46
Original
5451 people have browsed it

The head element refers to the element located between the tag pair, which mainly includes:

Content displayed on the title bar

Used to specify the base address of all hyperlinks in the web page to change the base address of all URLs that use relative addresses in the web page.
tag is used in the following form:
Attribute table
Attribute name Zuo Yong
href Set the base address of the relative URL address of all HTTP protocols in the web page. If the web page has the following code:
Lesson01_03
, it will open when clicked at this time Http://www.loncer.cn/JStudy/Lesson01_03.html
target Used to set the target window displayed by all hyperlinks in the web page, so that you can omit the need to add the target attribute to all hyperlinks

Defines the relationship between the current document and another document or resource

Attribute nameeffecthref defines the URL address of another resource, required rel and rev Defines the relationship type between the two resources linked by . You must choose one of the two titleDescribes the relationship between links, or it can be a string describing the target resource, which is optionaltypeGive the mime type of the target resource, for example: mediaPage-EnterPage-Exit

There are mainly two types of divided by different attribute names, namely: name and http-equiv.

name attribute:

is used to add some descriptive information about the webpage to the webpage. Its format is as follows:
# ## Robots Tell the search engine how the robots released can be based on the settings in content, which can be the following values Generator is used to describe the tools used to edit this web page, and the content is the tool name Author is used to describe the author of the web page, and the content is the author Copyright is used for copyright statement, and content is copyright statement

http-equiv attribute:

Used to simulate the response header of the HTTP protocol in the HTML document. When the browser reads the tag with the Http-equiv attribute in the web page file, it will process the response header sent by the WWW server in the same way. Come treat.

Attribute table
HTML is: "text/html"
CSS is: "text/css"
JavaScript is: "text/javascript"
# ##
Used to specify the medium or media to receive the target data. The output will only work on the specified one. screen: On the computer screen (default)
    print:printer
  • projection:projector
  • aural:speaker
  • braile: embossed tactile sensing device (for blind people)
  • tty:Teletypewriter
  • tv:TV
  • all: The above equipment used
The effect when loading a web page
The effect displayed when leaving the web page
name attribute table
name content
Keywords Tell the robot or spider released by the search engine to add the content filled in the content attribute to the search engine as the keywords of the web page. Multiple keywords in the content attribute can be separated by commas, for example:
Description Add the content in content to the search engine as a content description of this webpage. If not, display the first few lines of the webpage under the link to the page in the search results list.
    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 search down.
  • nofollow: Don’t let it go down
  • none:Nothing can be done
  • all: Anything is OK
# ## RefreshSpecify to automatically refresh the web page after a certain period of time, for example: ExpiresSpecify the expiration time of the web page in the browser. If the time of the computer where the browser is located exceeds the time specified in content, you must re-download it from the server when accessing. Note: the > setting in the content attribute GMT time format must be used, for example: Windows-Target Force the page to be displayed in a certain window. For example, use the following code to prevent your web page from being used as a frame page by others calling Pragma# ##
http-equiv attribute table
Attribute name effect
Content-Type Describe the MIME type of the web page content and the character set encoding used for the text content, for example:
refreshes the web page once per second
You can also add a URL after the time , jump to this webpage within the specified time, for example:


Note: Separate the URL and time with commas


Note: Set content to 0, You can disable the browser from using cached pages
## #
Used to prevent the browser from caching this web page on the local computer, as follows:
Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template