HTML Notes (vii) head related elements <base> & <meta>

Source: Internet
Author: User
Tags html notes

The

Tags that can be added are:<title>, <base>, <link>, <meta>, <script>, and <style>.

    • <base> elements

The <base> tag specifies the default address of all links on the page or the default destination target.

<HTML><Head>    <Basehref= "http://www.w3school.com.cn/i/" />    <BaseTarget= "_blank" /></Head><Body>    <!--the head section has set a benchmark ur.  -    <imgsrc= "Eg_smile.gif" />    <P><ahref= "http://www.w3school.com.cn">W3school</a></P></Body></HTML>
    • <meta> elements

The <meta> element provides meta-information about the page meta-infomation, such as keywords for search engines and update frequency descriptions.

<mata> does not contain any content, and its properties define the key/value pairs associated with the document.

All servers must send at least one: content-type:text/html.

The Content property primarily provides values for key/value pairs. It must be used with the Name property or the Http-equiv property.

  ① The Name property and the Content property

The Name property primarily provides the names of keys for key/value pairs. Supported property values are:author, description, keywords, generator, revised, and others.

<Metaname= "Author"content= "X"/><Metaname= "Revised"content= "X,9/1/15"/><Metaname= "Generator"content= "Aptana 3.0"/><Metaname= "keywords"content= "Hello,speak,human,computer"/><Metaname= "description"content= "This is a test."/>

②HTTP-EQUIV Properties and Content properties

The Http-equiv property mainly provides the name of the key for the key/value pair. The supported property values are:content-type, expires, refresh, Set-cookie, and so on.

The Content property primarily provides values for key/value pairs. It must be used with the Name property or the Http-equiv property.

When the server sends a document to the browser, multiple key/value pairs are sent first.

More details

<Metahttp-equiv= "Content-type"content= "text/html/><meta http-equiv="CharSet "Content= "gb2312" /><Metahttp-equiv= "Expires"content= "Wed, June 22:33:00 GMT" /><Metahttp-equiv= "Refresh"content= "2;url=http://www.net.cn/"/><meta http-equiv= "Pragma"content= "No-cache"/><meta http-equiv= "Set-cookie"content= "Cookievalue=xxx;expires=wednesday, 20-jun-2007 22:33:00 GMT; path=/"  /><Metahttp-equiv= "Window-target"content= "_top"/>

HTML Notes (vii) head related elements <base> & <meta>

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.