search
HomeWeb Front-endHTML TutorialMeta http-equiv属性_html/css_WEB-ITnose

http-equiv顾名思义,相当于http的文件头作用,它可以向浏览器传回一些有用的信息,以帮助正确和精确地显示网页内容,与之对应的属性值为content,content中的内容其实就是各个参数的变量值。 meat标签的http-equiv属性语法格式是:<meta http-equiv="参数" content="参数变量值"> ;其中http-equiv属性主要有以下几种参数:1、Expires(期限) 说明:可以用于设定网页的到期时间。一旦网页过期,必须到服务器上重新传输。 用法:<meta http-equiv="expires" content="Wed, 20 Jun 2007 22:33:00 GMT">注意:必须使用GMT的时间格式。 2、Pragma(cache模式) 说明:是用于设定禁止浏览器从本地机的缓存中调阅页面内容,设定后一旦离开网页就无法从Cache中再调出 用法:<meta http-equiv="Pragma" content="no-cache">注意:这样设定,访问者将无法脱机浏览。 3、Refresh(刷新) 说明:自动刷新并指向新页面。 用法:<meta http-equiv="Refresh" content="2;URL=http://www.net.cn/">注意:其中的2是指停留2秒钟后自动刷新到URL网址。4、Set-Cookie(cookie设定) 说明:如果网页过期,那么存盘的cookie将被删除。 用法:<meta http-equiv="Set-Cookie" content="cookievalue=xxx;expires=Wednesday, 20-Jun-2007 22:33:00 GMT; path=/">注意:必须使用GMT的时间格式。5、Window-target(显示窗口的设定) 说明:强制页面在当前窗口以独立页面显示。 用法:<meta http-equiv="Window-target" content="_top">注意:用来防止别人在框架里调用自己的页面。 6、content-Type(显示字符集的设定) 说明:设定页面使用的字符集。 用法:<meta http-equiv="content-Type" content="text/html;charset=gb2312">7、Pics-label(网页等级评定) 用法:<meta http-equiv="Pics-label" contect=""> 8、Page_Enter、Page_Exit 设定进入页面时的特殊效果<meta http-equiv="Page-Enter" contect="revealTrans(duration=1.0,transtion=12)">  设定离开页面时的特殊效果<meta http-equiv="Page-Exit" contect="revealTrans(duration=1.0,transtion=12)">    Duration的值为网页动态过渡的时间,单位为秒。  Transition是过渡方式,它的值为0到23,分别对应24种过渡方式。如下表:  0    盒状收缩    1    盒状放射  2    圆形收缩    3    圆形放射  4    由下往上    5    由上往下  6    从左至右    7    从右至左  8    垂直百叶窗    9    水平百叶窗  10    水平格状百叶窗    11垂直格状百叶窗  12    随意溶解    13从左右两端向中间展开  14从中间向左右两端展开    15从上下两端向中间展开  16从中间向上下两端展开    17    从右上角向左下角展开  18    从右下角向左上角展开    19    从左上角向右下角展开  20    从左下角向右上角展开    21    水平线状展开  22    垂直线状展开    23    随机产生一种过渡方式  说明:在IE的internet选项中有一项内容设置,可以防止浏览一些受限制的网站,而网站的限制级别就是通过meta属性来设置的。 9、清除缓存(再访问这个网站要重新下载!) <meta http-equiv="cache-control" content="no-cache">  10、设定网页的到期时间 <meta http-equiv="expires" content="0">  11、关键字,给搜索引擎用的 <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">  12.页面描述 <meta http-equiv="description" content="This is my page">  

 

Statement
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
HTML, CSS, and JavaScript: Examples and Practical ApplicationsHTML, CSS, and JavaScript: Examples and Practical ApplicationsMay 09, 2025 am 12:01 AM

The roles of HTML, CSS and JavaScript in web development are: 1. HTML is used to build web page structure; 2. CSS is used to beautify the appearance of web pages; 3. JavaScript is used to achieve dynamic interaction. Through tags, styles and scripts, these three together build the core functions of modern web pages.

How do you set the lang attribute on the  tag? Why is this important?How do you set the lang attribute on the tag? Why is this important?May 08, 2025 am 12:03 AM

Setting the lang attributes of a tag is a key step in optimizing web accessibility and SEO. 1) Set the lang attribute in the tag, such as. 2) In multilingual content, set lang attributes for different language parts, such as. 3) Use language codes that comply with ISO639-1 standards, such as "en", "fr", "zh", etc. Correctly setting the lang attribute can improve the accessibility of web pages and search engine rankings.

What is the purpose of HTML attributes?What is the purpose of HTML attributes?May 07, 2025 am 12:01 AM

HTMLattributesareessentialforenhancingwebelements'functionalityandappearance.Theyaddinformationtodefinebehavior,appearance,andinteraction,makingwebsitesinteractive,responsive,andvisuallyappealing.Attributeslikesrc,href,class,type,anddisabledtransform

How do you create a list in HTML?How do you create a list in HTML?May 06, 2025 am 12:01 AM

TocreatealistinHTML,useforunorderedlistsandfororderedlists:1)Forunorderedlists,wrapitemsinanduseforeachitem,renderingasabulletedlist.2)Fororderedlists,useandfornumberedlists,customizablewiththetypeattributefordifferentnumberingstyles.

HTML in Action: Examples of Website StructureHTML in Action: Examples of Website StructureMay 05, 2025 am 12:03 AM

HTML is used to build websites with clear structure. 1) Use tags such as, and define the website structure. 2) Examples show the structure of blogs and e-commerce websites. 3) Avoid common mistakes such as incorrect label nesting. 4) Optimize performance by reducing HTTP requests and using semantic tags.

How do you insert an image into an HTML page?How do you insert an image into an HTML page?May 04, 2025 am 12:02 AM

ToinsertanimageintoanHTMLpage,usethetagwithsrcandaltattributes.1)UsealttextforaccessibilityandSEO.2)Implementsrcsetforresponsiveimages.3)Applylazyloadingwithloading="lazy"tooptimizeperformance.4)OptimizeimagesusingtoolslikeImageOptimtoreduc

HTML's Purpose: Enabling Web Browsers to Display ContentHTML's Purpose: Enabling Web Browsers to Display ContentMay 03, 2025 am 12:03 AM

The core purpose of HTML is to enable the browser to understand and display web content. 1. HTML defines the web page structure and content through tags, such as, to, etc. 2. HTML5 enhances multimedia support and introduces and tags. 3.HTML provides form elements to support user interaction. 4. Optimizing HTML code can improve web page performance, such as reducing HTTP requests and compressing HTML.

Why are HTML tags important for web development?Why are HTML tags important for web development?May 02, 2025 am 12:03 AM

HTMLtagsareessentialforwebdevelopmentastheystructureandenhancewebpages.1)Theydefinelayout,semantics,andinteractivity.2)SemantictagsimproveaccessibilityandSEO.3)Properuseoftagscanoptimizeperformanceandensurecross-browsercompatibility.

See all articles

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

MantisBT

MantisBT

Mantis is an easy-to-deploy web-based defect tracking tool designed to aid in product defect tracking. It requires PHP, MySQL and a web server. Check out our demo and hosting services.

Atom editor mac version download

Atom editor mac version download

The most popular open source editor

MinGW - Minimalist GNU for Windows

MinGW - Minimalist GNU for Windows

This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.

Dreamweaver Mac version

Dreamweaver Mac version

Visual web development tools

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment