JavaScript values, variables

If you try to declare a variable that already exists, JavaScript will treat it as a simple assignment statement and assign any new value in the declaration statement to the variable. If the duplicate declaration has no assignment, then nothing happens. If you try to assign a value to a non-existent variable, JavaScript will create the variable for you.

<script type="text/javascript">
//Commented lines starting with the double


//First we will declare a few variables
//and assign values to them


myTxt = "Do IT";
mynum =13;
//Note that myTxt is a string and mynum is numeric.

//Next we will display these to the user.

document.write(myTxt);

//To concatenate strings in JavaScript, use the '+' operator 
document.write("My favourite number is "+ mynum);
</script>

Include Inline JavaScript code

To include inline JavaScript code, place JavaScript code inside the <script> element directly, as
follows:
<script type=”text/javascript”>
function sayHi(){
alert(“Hi!”);
}
</script>

When using inline JavaScript code, keep in mind that you cannot have the string “</script>” anywhere
in your code. For example, the following code causes an error when loaded into a browser:
<script type=”text/javascript”>
function sayScript(){
alert(“</script>”);
}
</script>

Because of the way that inline scripts are parsed, the browser sees the string “</script>” as if it
were the closing </script> tag. This problem can be avoided easily by escaping the “/” character,
as in this example:
<script type=”text/javascript”>
function sayScript(){
alert(“<\/script>”);
}
</script>

What Is JavaScript

What Is JavaScript? — Explains the origins of JavaScript: where it came from, how it
evolved, and what it is today. Concepts introduced include the relationship between
JavaScript and ECMAScript, the Document Object Model (DOM), and the Browser
Object Model (BOM). A discussion of the relevant standards from the European Computer
Manufacturer’s Association (ECMA) and the World Wide Web Consortium (W3C) is also
included.

Considered the JavaScript expert by many people in the development community, author Douglas Crockford identifies the abundance of good ideas that make JavaScript an outstanding object-oriented programming language-ideas such as functions, loose typing, dynamic objects, and an expressive object literal notation. Unfortunately, these good ideas are mixed in with bad and downright awful ideas, like a programming model based on global variables.

Robots Meta Tag

Not everyone has access to their web server, but they still want to have control over how crawlers
behave on their web site. If you’re one of those, you can still control the crawlers that come to your
site. Instead of using the robots.txt file, you use a robots meta tag to make your preferences known
to the crawlers.

The robots meta tag is a small piece of HTML code that is inserted into the <HEAD> tag of your
web site and it works generally in the same manner that the robots.txt file does. You include your
instructions for crawlers inside the tags. The following example shows you how your robots meta

tag might look:
<html>
<head>
<meta name=”robots” content=”noindex, nofollow”>
<meta name=”description” content=”page description.”>
<title>
Web Site Title
</title>
</head>
<body>

This bit of HTML tells crawlers not to index the content on the site and not to follow the links on
the site. Of course, that might not be exactly what you had in mind. You can also use several other
robots meta tags for combinations of following, not following, indexing, and not indexing:
<meta name=”robots” content=”index,follow”>
<meta name=”robots” content=”noindex,follow”>

Key Factors Effecting Link Quality

According to SEO convention and the information gleaned from the Google patents, there
are a number of factors affecting the quality of your inbound links.

Link Density
Links from pages with fewer outbound links have more influence than from pages where
there are huge numbers of links – see FFAs. Additional outbound links dilute the value of
existing links on a page. My suggestion is to accept links from pages with no more than
10 to 12 links. Avoid pages with 20+ external links.

Site and Page Relevance
A link from a site and page carrying similar content would carry more influence than
from a site without the similar content.

Google Page Rank
For Google ranking purposes a link from a high Page Rank site has even greater
influence. A link from a PR 6+ site is extremely valuable. At the other extreme, I suggest
you are prudent when exchanging links with sites of a PR of zero. The PR0 category
contains a number of banned sites.

Anchor Text
Anchor text is the text that contains or sits alongside a link. This text provides additional
relevance to the quality of a link. Anchor text is written in HTML. On-screen part of the
text shows up as highlighted (usually coloured) or underlined type and part in normal
type. The anchor text for your site could be written in HTML code as follows:
<a href="http://www.yoursite.com"> Your Site Title </a> - A short description of what
you do. <BR>


Link Age
A long established link is deemed by Google to have more value than a recent link. A
rapid build up in links may also be deemed spam. However Google apparently makes an
allowance for a rapid build-up of links generated by news stories.

How to Optimise Your Site

Search engine optimisation is a marketing discipline. It is not a stand alone function.
Before any specific optimisation activity is undertaken it is essential that two areas are
non-search areas are appraised:
Understanding your Organisation’s Online Business Strategy
Good SEO requires a through understanding of your organisation’s overall business
strategy. How does search fit in with activities such as advertising, e-mail and direct
marketing? Is there a marketing plan? What does it say about objectives, strategy and
budgets? What is the overall direction of the business and what can search contribute?

Researching your Market Category, Customers and Competitors
Good SEO also requires a thorough understanding of the market category within which
the search project and web site will compete. What is the category size and how is it
developing. What other channels to market are there? What information is available
regarding their behaviour and attitude of customers? What role in the buying process is
played by the search marketing? Who are current and likely competitors? Once the above
is fully grasped you can proceed to the first real activity of SEO; Keyword selection.

Keyword Selection - Factors
Keyword selection is the first search specific discipline. Having explained that spiders
read and index text, we find that some text is more important than others. That text is
keywords. Valuable keywords are the words or phrases that prospective customers use
when searching in your market category. Keyword selection is therefore crucial and has
implications for so much else within search. I have drawn up a list of factors that should
be taken into account when selecting keywords.
Category Priorities
The first thing to remember is that the number of keywords you can use on any one site
or page has a finite limit. A general recommendation is that there is an overall limit of 20

Table basics in HTML

It’s reasonably straightforward to create a simple table when hand-coding markup. The
bare essentials of a single table is an opening <table> tag, followed by at least one table
row (a <tr>), followed by at least one table cell (a <td>, meaning “table data”). Here’s an
example:
<table>
<tr>
<td>Some data</td>
</tr>
</table>

That’s about as minimalist as you can get when it comes to creating tables, but you’re
unlikely to create a table with only one item of data, so let’s make things a touch more
interesting. The following markup is for a two-column table with four rows of data (the
presentational border attribute is just here as a visual aid to better distinguish the layout
of the table, and its effect should be replicated with CSS in a production environment):
<table border="1">
<tr>
<td>Name</td>
<td>Place of residence</td>
</tr>
<tr>
<td>Paul Haine</td>
<td>Oxford</td>
</tr>
<tr>
<td>Vikki Roberts</td>
<td>Bracknell</td>
</tr>
<tr>
<td>Leon Boardman</td>
<td>London</td>
</tr>
<tr>
<td>Emma Sax</td>
<td>Peaslake</td>
</tr>
</table>

Anatomy of an XHTML document

Finally, let’s look at how a strict XHTML 1.0 document is laid out:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Our title</title>
</head>
<body>
<p>Our content</p>
</body>
</html>
Let’s now go through this markup one line at a time.
Doctype declaration
First we see a doctype declaration. A doctype declaration provides an indication as to
what Document Type Definition (DTD) you’re going to be writing your markup to. A
DTD is basically a page detailing the rules and grammar of the markup. It can look a little
daunting, but let’s break it down and examine each piece. The doctype starts off like this:
<!DOCTYPE
Nothing much more to say here; this is just how a doctype begins. The root element of the
document that will appear after the doctype declaration—the <html> element—needs to
be specified immediately after the opening of the declaration:
<!DOCTYPE html
Note that we can use html or HTML, depending on the version of (X)HTML we’re writing to
and how we’re writing it. For all XHTML doctypes, the root element should be in lowercase,
but for HTML doctypes the root element may be uppercase if the rest of your tags
are written so.
Following that, we have the word PUBLIC:
<!DOCTYPE html PUBLIC
This indicates that the DTD we’re about to reference is publicly available. If the DTD was
private, then we would use SYSTEM instead (as in “a system resource,” probably a locally
held resource somewhere on your network).
Next we have the Formal Public Identifier (FPI), which describes details about both the DTD
and the organization behind the DTD.

XHTML vs. HTML

The question of whether to use XHTML or HTML will often not even come up in an average
web project; most web designers these days will naturally gravitate toward XHTML, as
it is perceived as being new, advanced, and the “X” makes it sound cool. The truth is,
XHTML isn’t as different from HTML as people think, and the purpose of this section of the
chapter is to discuss exactly how XHTML differs from earlier versions of HTML, debunk
some myths and misconceptions about XHTML and HTML, examine the issues behind
MIME types, and cover when it is (and isn’t) appropriate to use XHTML over HTML.

Differences between XHTML and HTML

There are several rules that apply to XHTML that do not apply to HTML. These are fairly
straightforward and you may know some (or all) of them already, but to reiterate:

The <html>, <head>, and <body> tags are all required in XHTML.

The <html> tag must have an xmlns attribute with a value of http://www.w3.org/
1999/xhtml.

All elements must be closed. I touched upon this earlier, but just remember that an
opening tag must have either an equal closing tag (if it’s a container tag) or a selfclosing
space-plus-slash.

All tags must be written in lowercase.

All attribute values must be quoted with either single quotes or double quotes.
Thus, class=page is invalid but class="page" and class='page' are both fine.

All attributes must have values. Some attributes, such as the selected attribute
used with the <option> tag, could be written in a shortened form in HTML—that is,
<option selected>data</option> would be valid. In XHTML, however, you must
write <option selected="selected">data</option>.

Ampersands should be encoded. That is, you should write &amp; instead of just &.
This is true wherever the ampersand is: in your content or in a URL.

id and class attributes

The id attribute is used to identify elements and mark up specific functional areas of a
website, and the class attribute is used to classify one or more elements. These important
attributes help you target elements when it comes to styling or scripting. I refer to both of
these attributes throughout the book, but for now all you need to know is that a specific
id attribute value can be used just once per page, whereas a class attribute value can be
used multiple times (the attributes themselves can be used multiple times per page). For

example, say you begin a document with this:
<body id="homepage">

You would then not be able to use an id attribute value of homepage anywhere else on the
same page. However, if you do this:
<body class="homepage">

then you are free to use the class attribute value of homepage as many times as you like
throughout the same page, but bear in mind that it still applies the same CSS, no matter
what tag you apply it to.

<div id="rightColumn">
<strong class="redText">
<p class="big">

Divs and spans

Divs and spans are two tags that, when used well, can help give your page a logical structure
and some extra hooks to apply any CSS or DOM scripting that you might need later. When
used badly, they can litter your document unnecessarily and make your markup, styling, and
scripting needlessly complicated.


<div id="header">
...
</div>
<div id="mainContent">
...
</div>
<div id="secondaryContent">
...
</div>
<div id="footer">
...
</div>

A span is used for marking out sections within a block element and sometimes inside
another inline element. It is an inline element, just the same as <em>, <strong>, or <a>,
except without any semantic meaning—it is simply a generic container. It can itself contain
further inline elements, including more spans. For example, say you wish to color the first
two words of a paragraph red, keeping the rest of the paragraph black. You can use a
<span> for this:
<p><span class="leadingWords">The first</span> two words of this å
paragraph can now be styled differently.</p>
A span cannot contain a block element—that is, you cannot place a <div> within a <span>
and expect it to work the way you want.

CSS and Canvas HTML5

As with most HTML elements, CSS can be applied to the canvas element itself to add borders, padding,
margins, etc. Additionally, some CSS values are inherited by the contents of the canvas; fonts are a good
example, as fonts drawn into a canvas default to the settings of the canvas element itself.
Furthermore, properties set on the context used in canvas operations follow the syntax you may
already be familiar with from CSS. Colors and fonts, for example, use the same notation on the context
that they use throughout any HTML or CSS document.
Browser Support for HTML5 Canvas
With the arrival of Internet Explorer 9, all browser vendors now provide support for HTML5 Canvas, and
it is already in the hands of a majority of users. This is a major milestone in web development, allowing
2D drawing to thrive on the modern Web.
In spite of the dwindling market share of previous versions of Internet Explorer, it is still a good idea
to first test whether HTML5 Canvas is supported before you use the APIs. The section “Checking for
Browser Support” later in this chapter will show you how you can programmatically check for browser
support.

Overview of HTML5 Canvas

When you use a canvas element in your web page, it creates a rectangular area on the page. By default,
this rectangular area is 300 pixels wide and 150 pixels high, but you can specify the exact size and set
other attributes for your canvas element.  A Basic Canvas Element
<canvas></canvas>
Once you have added a canvas element to your page, you can use JavaScript to manipulate it any
way you want. You can add graphics, lines, and text to it; you can draw on it; and you can even add
advanced animations to it.
The Canvas API supports the same two-dimensional drawing operations that most modern
operating systems and frameworks support. If you have ever programmed two-dimensional graphics in
recent years, you will probably feel right at home with the Canvas API because it is designed to be similar
to existing systems. If you haven’t, you’re about to discover how much more powerful a rendering
system can be than the previous images and CSS tricks developers have used for years to create web
graphics.
To programmatically use a canvas, you have to first get its context. You can then perform actions on
the context and finally apply those actions to the context. You can think of making canvas modifications
as similar to database transactions: you start a transaction, perform certain actions, and then commit
the transaction.

Using the Selectors API HTML5

getElementById() -Returns the element with the specified id attribute value
<div id="foo">
getElementById("foo");

getElementsByName() -Returns all elements whose name
attribute has the specified value
<input type="text" name="foo">
getElementsByName("foo");

getElementsByTagName() Return all elements whose tag name
matches the specified value
<input type="text">
getElementsByTagName("input");

With the new Selectors API, there are now more precise ways to specify which elements you would
like to retrieve without resorting to looping and iterating through a document using standard DOM. The
Selectors API exposes the same selector rules present in CSS as a means to find one or more elements in
the page. For example, CSS already has handy rules for selecting elements based on their nesting,
sibling, and child patterns.

CSS File for the HTML5 Page

body {
background-color:#CCCCCC;
font-family:Geneva,Arial,Helvetica,sans-serif;
margin: 0px auto;
max-width:900px;
border:solid;
border-color:#FFFFFF;
}
header {
background-color: #F47D31;
display:block;
color:#FFFFFF;
text-align:center;
13
}
header h2 {
margin: 0px;
}
h1 {
font-size: 72px;
margin: 0px;
}
h2 {
font-size: 24px;
margin: 0px;
text-align:center;
color: #F47D31;
}
h3 {
font-size: 18px;
margin: 0px;
text-align:center;
color: #F47D31;
}
h4 {
color: #F47D31;
background-color: #fff;
-webkit-box-shadow: 2px 2px 20px #888;
-webkit-transform: rotate(-45deg);
-moz-box-shadow: 2px 2px 20px #888;
-moz-transform: rotate(-45deg);
position: absolute;
padding: 0px 150px;
top: 50px;
left: -120px;
text-align:center;
}
One last thing to keep in mind is that browsers may seem to render things as if they actually
understand these new elements. The truth is, however, that these elements could have been renamed
foo and bar and then styled, and they would have been rendered the same way (but of course, they
would not have any benefits in search engine optimization). The one exception to this is Internet
Explorer, which requires that elements be part of the DOM. So, if you want to see these elements in IE,
you must programmatically insert them into the DOM and display them as block elements.

Submitting to directories

By now you’ve figured out that directories work differently from search engines. You must complete
the submission process to have your site included in most directories. But even when you’re submitting
information about your site, there’s an art to doing it.
How you list your site can mean the difference between the site being included in the directory or
not. Before you even begin to create your listing, it’s usually a good idea to navigate through the
directory that you’re submitting to. Look at other listings and make note of what works in them.
Keywords are of little importance when you’re creating your directory listing. Instead, what will make
the difference is the content on your web site. So if you’re faced with listing in a directory that’s strict
about reviewing sites before they are listed, make sure you have fresh content on your site. And it’s
also a good practice to keep that content fresh by updating it regularly.
Links can also be important when your site is being reviewed for inclusion in a directory, so be sure
you keep your links updated. Broken links can be detrimental to your site, and links that lead to
unrelated pages won’t reflect well either.
Other elements of your listing that editors evaluate for include:
1. Appropriate categorization
2. Accurate titles and descriptions
3.Title and descriptions relevant to the subject of the web site
4.Domain names that match site titles
5.Secure ordering capabilities on e-commerce sites
6.Contact information that’s easily accessible
7.Links to privacy policies, return policies, and product or service guarantees
8.Working and appropriate links to other sites and resources
9.Images that display properly in the most common browser formats
10.JavaScript that’s free of errors

Yahoo! Search Marketing

Another type of search engine is the directory search engine. Directories don’t display search results
based on keywords; instead they display results by category and subcategory. Web sites are usually
categorized by the site, not by pages on the site. What this means is that your overall listing in directory
search results will depend largely on either paid placement or on correctly categorizing your site
as tightly as possible.
Yahoo! Search Marketing is a PPC program that’s similar to AdWords, but there’s one big difference.
Yahoo! is a very commercial search engine, which means that many of the search results are
paid placement ads or are web sites that have been added by the web-site owner. Editors usually
review and approve submitted listings before they are shown in search results.
Yahoo! is also a portal that contains many different services, such as instant messaging, e-mail, maps,
and much more (Google is structured in a similar manner). Being a portal means that Yahoo! has
many loyal users who are likely to see your ads once you begin a PPC campaign with Yahoo! Search
Marketing.
When you sign up with Yahoo! Search Marketing, you have two options for the type of account you’d
like to have. These options are different from Google, because you can have a free PPC plan that you
use, create, and maintain on your own, or you can choose to have a Yahoo! specialist help you create
your campaign. If you decide to use a Yahoo! specialist, there’s a one-time $199 set-up fee.
As with Google, there’s no reason you should pay to begin your PPC advertising with Yahoo! Search
Marketing.

Google AdWords

Google AdWords is the PPC company you’ve probably heard the most about. AdWords is one of
the top search engine marketing programs, and Google is one of the biggest providers of search,
and many other services as well.
Being biggest doesn’t always mean being the best, though. When you’re evaluating the PPC companies
you may use, be sure to check not only the traffic rate, but also the conversion rate if possible.
It’s great if your ads receive lots of impressions, but if those impressions don’t turn to clicks, you’ll
find your PPC campaign is not at all effective.
Google AdWords. You may have heard the name so often that you think there’s nothing else — and
certainly it’s one of the most diverse PPC companies out there. It not only offers search engine marketing,
but also includes marketing by radio and even a telephone service that potential customers
can use to call you. Google will soon begin offering purchase of TV, newspaper, and embedded video
advertising. Even the radio and phone models of AdWords are charged on a bid-per-keyword basis.
Additionally, AdWords is linked to Google’s AdSense program, which is an advertisement publishing
program in which web-site owners place ads on their web sites; when users click through those ads
and make purchases, the web-site owner gets paid a small amount. Many web-site owners use this
service to help offset the cost of having a site.
AdWords ads are shown when someone searches on Google, AOL Search, Ask.com, and Netscape.
This gives Google AdWords one of the largest markets for keyword advertisements. However, a
larger market doesn’t guarantee a higher quality lead, so when using AdWords, it’s essential that
you pay attention to the details that help your ads place when they’re most effective.

Improving Click-Through Rates

Some of the efforts you take to reduce the cost of your PPC campaigns can also lead to improved
click-through rates. It’s essential that you work toward increasing these rates. Even though more
clicks drive up the cost of your PPC campaign, they also lead to more sales or conversions.
Aside from the efforts that you’ve already seen (like dayparting and better targeting) you can also
improve your click-through rates by improving the ad copy in your PPC campaigns.

Include special offers or incentives in ad text. If you have coupons to offer, discounts
available, or even free gifts with purchase or other special offers and incentives, be sure
those are included in your PPC ad text. People are drawn to specials, and advertising them
should draw more people to your site.
Consider including price in ads for products and services. Many people shy away from
advertising their prices, but those prices (especially if they’re real bargains) can entice customers.
If you have great prices, tell the world. Just make sure you check out the competition
before you decide you have the best prices on the Internet.

Improve the structure of your URLs

Creating descriptive categories and filenames for the documents on your website can not only help
you keep your site better organized, but it could also lead to better crawling of your documents by
search engines. Also, it can create easier, "friendlier" URLs for those that want to link to your content.
Visitors may be intimidated by extremely long and cryptic URLs that contain few recognizable words

www.example.com/products/bike-14.html
www.example.com/bikes/red-bicycles 


URLs like these can be confusing and unfriendly. Users would have a hard time reciting the URL from
memory or creating a link to it. Also, users may believe that a portion of the URL is unnecessary,
especially if the URL shows many unrecognizable parameters. They might leave off a part, breaking
the link.

Some users might link to your page using the URL of that page as the anchor text. If your URL
contains relevant words, this provides users and search engines with more information about the
page than an ID or oddly named parameter would.

Good practices for page title tags

• Accurately describe the page's content - Choose a title that effectively communicates the
topic of the page's content.
Avoid:
• choosing a title that has no relation to the content on the page
• using default or vague titles like "Untitled" or "New Page 1"

• Create unique title tags for each page - Each of your pages should ideally have a unique
title tag, which helps Google know how the page is distinct from the others on your site.
Avoid:
• using a single title tag across all of your site's pages or a large group of pages

• Use brief, but descriptive titles - Titles can be both short and informative. If the title is too
long, Google will show only a portion of it in the search result.
Avoid:
• using extremely lengthy titles that are unhelpful to users
• stuffing unneeded keywords in your title tags
Make use

Create uniqueand accurate page titles

A title tag tells both users and search engines what the topic of a particular page is. The <title> tag
should be placed within the <head> tag of the HTML document. Ideally, you should create a unique
title for each page on your site.

A relevant, deeper page (its title is unique to the content of the page) on our site appears as a
result

If the user clicks the result and visits the page, the page's title will appear at the top of the
browser

Titles for deeper pages on your site should accurately describe the focus of that particular page and
also might include your site or business name.


Alt tags in graphic links

An example of an alt tag might be the description of a picture of the Mona Lisa on your web site.
Your alt tag, then, should look like this:
Alt=”Mona Lisa”
The alt tag usually falls at the end of the image tag. An image tag might look something like this:
<img width=”100”
height=”100”
src=”monalisa.jpg”
alt=”Mona Lisa”>
The image code breaks down like this:
<img width=”100”: The width (in pixels) of the image.
Height=”100”: The height (in pixels) of the image.
Src=”monalisa.jpg”: The source of the image file.
Alt=”Mona Lisa”>: The alternative text that’s displayed when the image is not.

One more note about alt tags: To be really effective, these tags should be used for every single image
on your web site. That could become an arduous task if your site hasn’t been properly coded to start
with (and depending on the number of images that you have on your site). However, the addition of
these tags should be advantageous to your SEO efforts as long as you don’t overstep the unspoken
boundaries of alt tags.

Character Entities

 Character Entities

The following table lists the defined standard and proposed character entities for HTML and XHTML, as well as several that are nonstandard but generally supported.
Entity names, if defined, appear for their respective characters and can be used in the character-entity sequence &name; to define any character for display by the browser. Otherwise, or alternatively for named characters, use the character's three-digit numeral value in the sequence &#nnn; to specially define a character entity. Actual characters, however, may or may not be displayed by the browser, depending on the computer platform and user-selected font for display.
Not all 256 characters in the International Organization for Standardization (ISO) character set appear in the table. Missing ones are not recognized by the browser as either named or numeric entities.
To be sure that your documents are fully compliant with the HTML 4.0 and XHTML 1.0 standards, use only those named character entities with no entries in the Conformance column. Characters with a value of "!!!" in the Conformance column are not formally defined by the standards; use them at your own risk.
Numeric entity
Named entity
Symbol
Description
Conformance
&#009;
Horizontal tab
&#010;
Line feed
&#013;
Carriage return
&#032;
Space
&#033;
!
Exclamation point
&#034;
&quot;
"
Quotation mark
&#035;
#
Hash mark
&#036;
$
Dollar sign
&#037;
%
Percent sign
&#038;
&amp;
&
Ampersand
&#039;
'
Apostrophe
&#040;
(
Left parenthesis
&#041;
)
Right parenthesis
&#042;
*
Asterisk
&#043;
+
Plus sign
&#044;
,
Comma
&#045;
-
Hyphen
&#046;
.
Period
&#047;
/
Slash
&#048;-&#057;
09
Digits 09
&#058;
:
Colon
&#059;
;
Semicolon
&#060;
&lt;
<
Less than sign
&#061;
=
Equals sign
&#062;
&gt;
>
Greater than sign
&#063;
?
Question mark
&#064;
@
Commercial at sign
&#065;-&#090;
A-Z
Letters A-Z
&#091;
[
Left square bracket
&#92;
\
Backslash
&#093;
]
Right square bracket
&#094;
Caret
&#095;
_
Underscore
&#096;
`
Grave accent
&#097;-&#122;
a-z
Letters a-z
&#123;
{
Left curly brace
&#124;
|
Vertical bar
&#125;
}
Right curly brace
&#126;
~
Tilde
&#130;
,
Low left single quote
!!!
&#131;
Florin
!!!
&#132;
"
Low left double quote
!!!
&#133;
...
Ellipsis
!!!
&#134;
Dagger
!!!
&#135;
Double dagger
!!!
&#136;
^
Circumflex
!!!
&#137;
Permil
!!!
&#138;
Capital S, caron
!!!
&#139;
<
Less than sign
!!!
&#140;
Œ
Capital OE ligature
!!!
&#142;
Capital Z, caron
!!!
&#145;
'
Left single quote
!!!
&#146;
'
Right single quote
!!!
&#147;
"
Left double quote
!!!
&#148;
"
Right double quote
!!!
&#149;
Bullet
!!!
&#150;
En dash
!!!
&#151;
Em dash
!!!
&#152;
~
Tilde
!!!
&#153;
Trademark
!!!
&#154;
Small s, caron
!!!
&#155;
>
Greater than sign
!!!
&#156;
œ
Small oe ligature
!!!
&#158;
Small z, caron
!!!
&#159;
Capital Y, umlaut
!!!
&#160;
&nbsp;
Nonbreaking space
&#161;
&iexcl;
¡
Inverted exclamation point
&#162;
&cent;
¢
Cent sign
&#163;
&pound;
£
Pound sign
&#164;
&curren;
¤
General currency sign
&#165;
&yen;
¥
Yen sign
&#166;
&brvbar;
Broken vertical bar
&#167;
&sect;
§
Section sign
&#168;
&uml;
¨
Umlaut
&#169;
&copy;
©
Copyright
&#170;
&ordf;
ª
Feminine ordinal
&#171;
&laquo;
«
Left angle quote
&#172;
&not;
¬
Not sign
&#173;
&shy;
­
Soft hyphen
&#174;
&reg;
®
Registered trademark
&#175;
&macr;
¯
Macron accent
&#176;
&deg;
°
Degree sign
&#177;
&plusmn;
±
Plus or minus
&#178;
&sup2;
2
Superscript 2
&#179;
&sup3;
3
Superscript 3
&#180;
&acute;
´
Acute accent
&#181;
&micro;
μ
Micro sign (Greek mu)
&#182;
&para;
Paragraph sign
&#183;
&middot;
·
Middle dot
&#184;
&cedil;
,
Cedilla
&#185;
&sup1;
1
Superscript 1
&#186;
&ordm;
º
Masculine ordinal
&#187;
&raquo;
»
Right angle quote
&#188;
&frac14;
¼
Fraction one-fourth
&#189;
&frac12;
½;
Fraction one-half
&#190;
&frac34;
¾
Fraction three-fourths
&#191;
&iquest;
¿
Inverted question mark
&#192;
&Agrave;
À
Capital A, grave accent
&#193;
&Aacute;
Á
Capital A, acute accent
&#194;
&Acirc;
Â
Capital A, circumflex accent
&#195;
&Atilde;
Ã
Capital A, tilde
&#196;
&Auml;
Ä
Capital A, umlaut
&#197;
&Aring;
Å
Capital A, ring
&#198;
&AElig;
Æ
Capital AE ligature
&#199;
&Ccedil;
Ç
Capital C, cedilla
&#200;
&Egrave;
È
Capital E, grave accent
&#201;
&Eacute;
É
Capital E, acute accent
&#202;
&Ecirc;
Ê
Capital E, circumflex accent
&#203;
&Euml;
Ë
Capital E, umlaut
&#204;
&Igrave;
Ì
Capital I, grave accent
&#205;
&Iacute;
í
Capital I, acute accent
&#206;
&Icirc;
Î
Capital I, circumflex accent
&#207;
&Iuml;
Ï
Capital I, umlaut
&#208;
&ETH;
Capital eth, Icelandic
&#209;
&Ntilde;
Ñ
Capital N, tilde
&#210;
&Ograve;
Ò
Capital O, grave accent
&#211;
&Oacute;
Ó
Capital O, acute accent
&#212;
&Ocirc;
Ô
Capital O, circumflex accent
&#213;
&Otilde;
Õ
Capital O, tilde
&#214;
&Ouml;
Ö
Capital O, umlaut
&#215;
&times;
x
Multiply sign
&#216;
&Oslash;
Ø
Capital O, slash
&#217;
&Ugrave;
Ù
Capital U, grave accent
&#218;
&Uacute;
Ú
Capital U, acute accent
&#219;
&Ucirc;
û
Capital U, circumflex accent
&#220;
&Uuml;
Ü
Capital U, umlaut
&#221;
&Yacute;
Ý
Capital Y, acute accent
&#222;
&THORN;
Capital thorn, Icelandic
&#223;
&szlig;
ß
Small sz ligature, German
&#224;
&agrave;
à
Small a, grave accent
&#225;
&aacute;
á
Small a, acute accent
&#226;
&acirc;
â
Small a, circumflex accent
&#227;
&atilde;
ã
Small a, tilde
&#228;
&auml;
ä
Small a, umlaut
&#229;
&aring;
å
Small a, ring
&#230;
&aelig;
æ
Small ae ligature
&#231;
&ccedil;
ç
Small c, cedilla
&#232;
&egrave;
è
Small e, grave accent
&#233;
&eacute;
é
Small e, acute accent
&#234;
&ecirc;
ê
Small e, circumflex accent
&#235;
&euml;
ë
Small e, umlaut
&#236;
&igrave;
ì
Small i, grave accent
&#237;
&iacute;
í
Small i, acute accent
&#238;
&icirc;
î
Small i, circumflex accent
&#239;
&iuml;
î
Small i, umlaut
&#240;
&eth;
Small eth, Icelandic
&#241;
&ntilde;
ñ
Small n, tilde
&#242;
&ograve;
ò
Small o, grave accent
&#243;
&oacute;
ó
Small o, acute accent
&#244;
&ocirc;
ô
Small o, circumflex accent
&#245;
&otilde;
õ
Small o, tilde
&#246;
&ouml;
ö
Small o, umlaut
&#247;
&divide;
÷
Division sign
&#248;
&oslash;
Small o, slash
&#249;
&ugrave;
ù
Small u, grave accent
&#250;
&uacute;
ú
Small u, acute accent
&#251;
&ucirc;
Û
Small u, circumflex accent
&#252;
&uuml;
ü
Small u, umlaut
&#253;
&yacute;
y
Small y, acute accent
&#254;
&thorn;
Small thorn, Icelandic
&#255;
&yuml;
ÿ
Small y, umlaut

Layers

Spacers and multiple columns are natural extensions to conventional HTML, existing within a document's normal flow. With version 4, Netscape took HTML into an entirely new dimension with layers. It transforms the single-element document model into one containing many layered elements that are combined to form the final document. Regrettably, layers are not supported by Netscape 6 or any version of Internet Explorer.
Layers supply the layout artist with a critical element missing in standard HTML: absolute positioning of content within the browser window. Layers let you define a self-contained unit of HTML content that can be positioned anywhere in the browser window, placed above or below other layers, and made to appear and disappear as you desire. Document layouts that were impossible with conventional HTML are trivial with layers.
If you think of your document as a sheet of paper, layers are like sheets of clear plastic placed on top of your document. For each layer, you define the content of the layer, its position relative to the base document, and the order in which it is placed on the document. Layers can be transparent or opaque, visible or hidden, providing an endless combination of layout options.

H.3.1. The <layer> Tag (Antiquated)

Each HTML document content layer is defined with the <layer> tag. A layer can be thought of as a miniature HTML document whose content is defined between the <layer> and </layer> tags. Alternatively, the content of the layer can be retrieved from another HTML document by using the src attribute with the <layer> tag.

<layer> (Antiquated)

Function
Defines a layer of content within a document
Attributes
above, background, below, bgcolor, class, clip, left, name, src, style, top, visibility, width, z-index
End tag
</layer>; never omitted
Contains
body_content
Used in
block

Regardless of its origin, Netscape 4 formats a layer's content exactly like a conventional document, except that the result is contained within that separate layer, apart from the rest of your document. You control the position and visibility of this layer using the attributes of the <layer> tag.
Layers can be nested, too. Nested layers move with the containing layer and are visible only if the containing layer itself is visible.

Multicolumn Layout

Multicolumn text formatting is one of the most common features of desktop publishing. In addition to creating attractive pages in a variety of formats, multiple columns let you present your text using shorter, easier-to-read lines. HTML page designers have longed for the ability to easily create multiple text columns in a single page, but they have been forced to use various tricks,
Netscape 4 neatly solved this problem with the unique <multicol> tag. While fancy unbalanced columns and straddling are not possible with this tag, as they are with tables, conventionally balanced text columns are easy to create with <multicol>. And while this capability is available only with Netscape 4, the <multicol> tag degrades nicely in other browsers.

H.2.1. The <multicol> Tag (Antiquated)

The <multicol> tag creates multiple columns of text and lets you control the size and number of columns.

<multicol> (Antiquated)

Function
Formats text with multiple columns
Attributes
class, cols, gutter, style, width
End tag
</multicol>; never omitted
Contains
body_content
Used in
block

The <multicol> tag can contain any other HTML content, much like the <div> tag. All of the content within the <multicol> tag is displayed just like conventional content, except that Netscape 4 places the contents into multiple columns rather than just one.
The <multicol> tag creates a break in the text flow and inserts a blank line before rendering its content into multiple columns. After the tag, another blank line is added and the text flow resumes using the previous layout and formatting.
Netscape 4 automatically balances the columns, making each approximately the same length. Where possible, the browser moves text between columns to accomplish the balancing. In some cases, the columns cannot be balanced perfectly because of embedded images, tables, or other large elements.
You can nest <multicol> tags, embedding one set of columns within another set of columns. While infinite nesting is supported, more than two levels of nesting are generally impractical and results in unattractive text flows.