You are not just limited to inserting characters available on the keyboard into HTML documents. You can insert a non-keyboard character, or special character, using a character entity reference. Characters can be referenced from the ISO-8859-1 (Latin-1) character set or the Unicode character set. The ISO-8859-1 character set maps out 256 character positions that contain keyboard characters, unused characters, and special characters. Of these characters, 195 are special characters that are not included on the keyboard, including such characters as the copyright symbol and registered symbol, as well as many accented international characters.
Character entity references come in two forms: numeric and named. A numeric entity reference is inserted in the form of
where number corresponds to the character's numeric position either in the ISO-8859-1 or Unicode character set.
A named entity reference is inserted in the form of
where name corresponds to a symbolic name that has been assigned to a character in order to provide a more intuitive and mnemonic reference than is the case with a numeric entity reference. Named entity references are case-sensitive.
You can insert the copyright symbol using either a numeric entity reference or named entity reference. For instance, you insert the numeric entity reference for the copyright symbol as
where "169" corresponds to the numeric position of the copyright symbol in the ISO-8859-1 character set.
You insert the named entity reference for the copyright symbol as
where "copy" is the character name assigned to the copyright symbol.
Add a copyright statement to the example page that utilizes the numeric entity reference for the copyright symbol (see Figure 3.25):
Under U.S. copyright law, including a copyright statement is not required; all published documents are automatically copyrighted, whether or not a copyright statement is included. However, including a copyright statement puts visitors to your pages on notice that your work is copyrighted and can help to discourage unauthorized use. It also removes ignorance as a defense.
Including the copyright symbol is also optional under United States law, with "Copyright 2004 Dean Moriarity," for instance, being a perfectly legal copyright notice. Displaying the copyright symbol, however, may help to reinforce the seriousness of your claim. The copyright symbol can be inserted before or after the "Copyright" word. However, you should not rely only on the copyright symbol, leaving out the "Copyright" word, since some browsers may not display it, such as a Lynx text-only browser operating via terminal mode on a system utilizing the IBM PC character set (which is different from ISO-8859-1). Some earlier browsers also do not recognize the copyright symbol's named entity reference (©); to display the copyright symbol in the widest range of browsers, use its numeric entity reference (©).
You don't have to register your copyright to protect it, but doing so can allow you to seek statutory damages, which can make it easier to find a lawyer to take your case. The statement, "All rights reserved," is included in the example. This is not required under U.S. copyright legislation, but may be required by a few other countries to accord full copyright protection.
A registered symbol can be inserted to indicate a registered trademark. As with the copyright symbol, you can use a named entity reference (®) or a numeric entity reference (®). For instance, insert a reference in the example page to a registered trademark (see Figure 3.26):
<h3>Hormones, Antibiotics, and Genetic Engineering</h3> <p>Egg-laying hens are not given hormones, so you need not worry that hormones will find their way into any graded eggs you eat. Small amounts of antibiotics may be used to treat egg laying hens that become ill. They are rarely used, and as such are unlikely to contribute to antibiotic resistance. Genetic engineering is not used in the egg-laying industry, but only traditional selective breeding methods. If hens are fed genetically engineered feed, such as <b>FatBird®</b>, for instance, research has shown that their digestive processes guarantee that no genetically engineered materials find their way into their eggs.</p>
Browsers, old and new, should support inserting copyright and registered symbols using either their named or numeric entity references. Browsers also generally support the named entity references for the non-breaking space (&ndsp;), left angle (<), right angle (>), ampersand (&), double-quote ("), and most of the international accented characters (À, Õ, É and so on). To insert other special characters, you should stick to using their numeric entity references. For example, to insert a British Pound symbol, you should use £ and not £ as the entity reference.
The trademark symbol presents a problem. That is because it is not included among the allowed characters in the ISO-8859-1 character set, but it is included among the "unused" characters. The displayable characters in the ISO-8859-1 character set begin with the non-breakable space character ( ), while the trademark symbol (™) is positioned earlier in the character set, among the characters that are not supposed to be used. Most browsers, however, do support using the numerical entity reference for the trademark symbol (™). Some earlier browsers, such as Netscape 4 do not support using the named entity reference for the trademark symbol (™), so if you choose to insert the trademark symbol in this fashion, you should use its numerical and not its named entity reference.
The trademark symbol can also be inserted using its Unicode entity reference (™). Older browsers, however, may not support displaying Unicode characters. Netscape 4, for example, assumes ISO-8859-1 as the document's character set and, thus, will not display Unicode characters unless you specifically declare Unicode as the document's character set (see Appendix B, "Special Characters and Character Sets," for an example). A user also has to have a Unicode supporting font installed that includes the trademark symbol for it to be displayed using a Unicode entity reference.
If inserting a trademark symbol that will be displayable for all is important for legal reasons, there is a workaround that will do that. All you have to do is insert a superscripted (TM), like this (see Figure 3.27):
<p>Egg-laying hens are not given hormones, so you need not worry that hormones will find their way into any graded eggs you eat. Small amounts of antibiotics may be used to treat egg laying hens that become ill. They are rarely used, and as such are unlikely to contribute to antibiotic resistance. Genetic engineering is not used in the egg-laying industry, but only traditional selective breeding methods. If hens are fed genetically engineered feed, such as <b>FatBird<sup>(TM)</sup></b>, for instance, research has shown that their digestive processes guarantee that no genetically engineered materials find their way into their eggs.</p>
The left angle, right angle, and ampersand entity references are primarily of use for representing HTML code "as is" in Web pages. For instance, to display <h1> as it is in a Web page, you would insert the following code:
To display the named entity reference for the copyright symbol (©) as it is, you would insert the following code:
In general, you should not have to replace standalone left angles (<), right angles (>), or ampersands (&) with their character entity references, nor do you need to replace double-quote characters (") with the " named entity reference.
For a full run-down on all characters, and their corresponding entity references, that are part of the ISO-8859-1 character set, including which characters may not be displayed on Macintosh systems, see Appendix A, "HTML/XHTML Reference."
Special characters can also be inserted from the Unicode character set, which can give access to many thousands more special characters than are included in the ISO-8859-1 character set. For instance, the trademark symbol (not included among the displayable characters in the ISO-8859-1 character set) can be inserted using its Unicode entity reference (™). To display a Unicode character, however, a Unicode-supporting font must be installed on a user's system that contains the character; a browser that supports displaying Unicode characters must also be used.
For a full rundown on including ISO-8859-1 and Unicode special characters in Web documents, see Appendix B, "Special Characters and Character Sets."