HTML and CSS Reference
In-Depth Information
content on a document that was edited frequently, which may create an extra step of
maintenance without substantial gain. The choice is yours!
Some uses of the http-equiv attribute (known as a pragma directive ) provide
tasks such as setting cookies, specifying the character encoding, and so on, which are
redundant to better approaches available. Consequently, several of the values are not re-
commended in the HTML5 specification. Specifically, the content-language and
set-cookie directives are non-conforming and should not be used (the lang attrib-
ute should be used for setting the language of the content, and real HTTP headers should
be used for setting cookies). The other official pragma directives from the HTML5 spe-
cification are content-type , which is an alternative form of the charset attribute;
default-style , which is for setting the default CSS style sheet for the page (ex-
plained in Chapter 6 ) ; and refresh , which refreshes or redirects the page after a num-
ber of seconds, as shown in the code sample earlier.
Note To redirect the page after a pause, a URL is added to the content attribute
when using the refresh pragma directive. After the specified number of seconds, the
page is redirected to the URL. A redirect would look like so:
<meta
http-equiv="refresh"
content="3;
URL=homepage.html"> .
The full list of proposed values for the http-equiv and name attributes is large,
so you are best to consult a resource such as the WHATWG PragmaExtensions and
MetaExtensions wikis at http://wiki.whatwg.org/wiki/PragmaExten-
sions and http://wiki.whatwg.org/wiki/MetaExtensions , respect-
ively. In addition to the values listed at those web addresses, the HTML5 specification
also includes application-name as a value for the name attribute. This value al-
lows for a title to be given to a web application (not a standard web page but an actual
web application with scripted functionality added), which may be seen as an overarch-
ing title that is independent or supplementary to the page title (set using the title ele-
ment). This is provided since the page title may change while using the application to
reflect operations that are occurring, such as loading additional content, and so on.
Note Possibly more useful is the meta name keyword robots that instructs web
crawlers (the automated programs that Google and others use for indexing web pages)
on how to index the page. Information on this name value and others is available on the
aforementioned WHATWG MetaExtensions wiki at http://wiki.whatwg.org/
wiki/MetaExtensions .
Search WWH ::




Custom Search