Characters and entities
« Previous: Forms | Next: Search Engine Optimisation »
While it is not strictly required, it is best to specify a character encoding for all your pages.
This is done by inserting a <meta> tag into the <head> element of your document,
like this:
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
Dreamweaver, and many other html editors, will insert this code automatically into the <head>
element of any new documents. The contents of this tag should be the same for all pages in your site,
so you don’t need to worry too much about what these attributes actually mean.
However, just in case you’re interested, the essence is this:
the <meta> tag contains information about the current document,
which is not displayed directly to users but which can make it easier for browsers and search engines to understand
the page. The attributes tell the browser that this is an html text file, and also specify the character encoding,
which defines a range of characters that can be added to the page.
These include not only the alphanumeric characters which are most commonly used in page text,
but also a further range of special characters such as ©, &, ½, “, ”, <, >.
These characters are known as html entities.
All entities begin with an ampersand (&) and end with a semicolon (;). For example, & is represented in code as &, © as ©, and < and >as < and >. There are many more entities that can be used; for a more comprehensive listing, see the w3schools html entity reference.