HTML and CSS Reference
In-Depth Information
A document title may contain standard text, but markup isn't interpreted in a <title>
tag, as shown here:
However, character entities such as &copy; (or, alternatively, &#169; ), which specifies a
copyright symbol, are allowed in a title:
<title> Simple HTML Title Example, &copy; 2010 WebMonopoly, Inc. </title>
For an entity to be displayed properly, you need to make sure the appropriate character
set is defined and that the browser supports such characters; otherwise, you may see boxes
or other odd symbols in your title:
To set the appropriate character set, you should include a <meta> tag before the page
title even though traditionally title is considered the first element.
N OTE Beyond character set concerns, think twice before using a special character such as a colon
(:), slash (/), or backslash (\) in a document title. An operating system might have a problem
with such a title if the document is saved to the local system. For example, the colon isn't allowed
within Macintosh filenames, and slashes generally aren't allowed within filenames, because they
indicate directories. Most modern browsers remove such special characters and reduce them to
spaces during the Save process. To be on the safe side, use dashes to delimit items in a page title.
<meta>: Specifying Content Type, Character Set, and More
A <meta> tag has a number of uses. For example, it can be used to specify values that are
equivalent to HTTP response headers. For example, if you want to make sure that your
MIME type and character set for an English-based HTML document is set, you could use
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
Because meta is an empty element, you would use the trailing-slash syntax shown here:
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
Search WWH ::

Custom Search