<meta http-equiv="..."/>
The <meta http-equiv="..."/>
tag in HTML 5
<meta http-equiv="default-style"/>
The http-equiv="default-style"
metatag specifies the default style sheet for the page. For example, this could be a site-wide template:
Examples
<meta http-equiv="default-style" content="/site-template.xsl ; type=application/xslt+xml"/>
<meta http-equiv="refresh"/>
The http-equiv="refresh"
metatag can be used to refresh the current page at regular intervals or redirect to a different page after a given period of time. The first parameter of content
is the time to wait, in seconds. The second parameter is the URL of the next page to be displayed and is optional.
Examples
<meta http-equiv="refresh" content="10"/> <meta http-equiv="refresh" content="0; url=http://www.ExampleOnly.com/"/>
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="refresh" content="0; url=http://www.ExampleOnly.com/new-page.html"> </head> <body> <p>This page has moved to <a href="http://www.ExampleOnly.com/new-page.html" >http://www.ExampleOnly.com/new-page.html</a>. If you are not redirected to the new location within a few seconds, please click on the URL shown in the link above. </p> </body> </html>
http-equiv Metatag for Other HTTP Headers
Other frequently used http-equiv
metatags for HTTP headers include:
Cache-Control
- which indicates how long the page should remain in the client's cache
Content-Disposition
- which indicates how or when the content should be displayed
Content-Type
- which indicates how the document is encoded, in terms of both the character encoding used and the syntax of the content.
Expires
- which is an alternative way of indicating when the content should expire from cache
X-UA-Compatible
X-UA-Compatible
is used to indicate to an IE browser which version of the rendering engine should be used to display the page. This metatag does not affect other browsers such as Firefox and Opera, which in general attempt to avoid bloating the size of the browser code by displaying web pages only one way according to established standards (Supporting multiple rendering engines presents some major challenges, especially when content rendered by one engine accesses embedded content rendered by a different engine).
Examples
<meta http-equiv="Cache-Control" content="no-cache"/> <meta http-equiv="Cache-Control" content="max-age=120"/> <meta http-equiv="Content-Disposition" content="inline; filename=spreadsheet.xls"/> <meta http-equiv="Content-Type" content="application/xhtml+xml;charset=UTF-8"/> <meta http-equiv="Expires" content="Day, dd Mon yyyy hh:mm:ss GMT"/> <meta http-equiv="X-UA-Compatible" content="IE=8"/> <meta http-equiv="X-UA-Compatible" content="IE=edge"/>
Differences between HTML 5 and earlier versions
http-equiv="Content-Language"
has been deprecated. The lang attribute should be used instead.