- Brick Marketing - Full Service SEO and SEM Company - a Boston based full service SEO and search engine marketing solutions firm that helps increase website visitors.
- Business OL - Search Engine Optimization Service - A search engine optimization and web marketing firm that builds businesses online from the ground up with SEO, design, content writing, usability consulting and a host of other web development services and solutions. San Diego, California.
- Captiva Marketing - Provides professional search engine marketing and optimized web design. St. Louis, Missouri.
SEO Companies United States
PMA05:38
SEO Tools
PMA03:56
- Keyword Discovery - Find popular keywords that your site should be targeting.
- Keyword Volume - Estimate how much search traffic a specific keyword receives each month.
- Keyword Density - Analyze how well a specific webpage is targeting a keyword.
- Backlink Trackers - Keep track of how many sites are linking to you.
HTML 4.01 and XHTML 1.0 and 1.1 standards
PMA03:44
As defined in the HTML 4.01 and XHTML 1.0 and 1.1 standards, a
<div> tag divides your document into separate, distinct sections.
It may be used strictly as an organizational tool, without any sort of
formatting
Html Grammar
PMA03:39
The rules are in alphabetical order. The starting rule for an
entire document is named html_document.
a_content
|
::=
|
heading
|
|
|
text
| |
a_tag
|
::=
|
<a>
|
{a_content}0
| ||
</a>
| ||
abbr_tag
|
::=
|
<abbr> text
</abbr>
|
acronym_tag
|
::=
|
<acronym> text
</acronym>
|
address_content
|
::=
|
p_tag
|
|
|
text
| |
address_tag
|
::=
|
<address>
|
{address_content}0
| ||
</address>
| ||
applet_content
|
::=
|
{<param>}0
|
body_content
| ||
applet_tag
|
::=
|
<applet> applet_content </applet>
|
b_tag
|
::=
|
<b> text
</b>
|
basefont_tag
|
::=
|
<basefont> body_content </basefont>
|
bdo_tag
|
::=
|
<bdo> text
</bdo>
|
big_tag
|
::=
|
<big> text
</big>
|
blink_tag
|
::=
|
<blink> text
</blink>
|
block
|
::=
|
{block_content}0
|
block_content
|
::=
|
<isindex>
|
|
|
basefont_tag
| |
|
|
blockquote_tag
| |
|
|
center_tag
| |
|
|
dir_tag
| |
|
|
div_tag
| |
|
|
dl_tag
| |
|
|
form_tag
| |
|
|
listing_tag
| |
|
|
menu_tag
| |
|
|
multicol_tag
| |
|
|
nobr_tag
| |
|
|
ol_tag
| |
|
|
p_tag
| |
|
|
pre_tag
| |
|
|
table_tag
| |
|
|
ul_tag
| |
|
|
xmp_tag
| |
blockquote_tag
|
::=
|
<blockquote> body_content </blockquote>
|
body_content
|
::=
|
<bgsound>
|
|
|
<hr>
| |
|
|
address_tag
| |
|
|
block
| |
|
|
del_tag
| |
|
|
heading
| |
|
|
ins_tag
| |
|
|
layer_tag
| |
|
|
map_tag
| |
|
|
marquee_tag
| |
|
|
text
| |
body_tag
|
::=
|
<body>
|
{body_content}0
| ||
</body>
| ||
caption_tag
|
::=
|
<caption> body_content </caption>
|
center_tag
|
::=
|
<center> body_content </center>
|
cite_tag
|
::=
|
<cite> text
</cite>
|
code_tag
|
::=
|
<code> text
</code>
|
colgroup_content
|
::=
|
{<col>}0
|
colgroup_tag
|
::=
|
<colgroup>
|
colgroup_content
| ||
content_style
|
::=
|
abbr_tag
|
|
|
acronym_tag
| |
|
|
cite_tag
| |
|
|
code_tag
| |
|
|
dfn_tag
| |
|
|
em_tag
| |
|
|
kbd_tag
| |
|
|
q_tag
| |
|
|
strong_tag
| |
|
|
var_tag
| |
dd_tag
|
::=
|
<dd> flow
</dd>
|
del_tag
|
::=
|
<del> flow
</del>
|
dfn_tag
|
::=
|
<dfn> text
</dfn>
|
dir_tag[b]
|
::=
|
<dir>
|
{li_tag}
| ||
</dir>
| ||
div_tag
|
::=
|
<div> body_content </div>
|
dl_content
|
::=
|
dt_tag dd_tag
|
dl_tag
|
::=
|
<dl>
|
{dl_content}
| ||
</dl>
| ||
dt_tag
|
::=
|
<dt>
|
text
| ||
</dt>
| ||
em_tag
|
::=
|
<em> text
</em>
|
fieldset_tag
|
::=
|
<fieldset>
|
[legend_tag]
| ||
{form_content}0
| ||
</fieldset>
| ||
flow
|
::=
|
{flow_content}0
|
flow_content
|
::=
|
block
|
|
|
text
| |
font_tag
|
::=
|
<font> style_text
</font>
|
form_content[c]
|
::=
|
<input>
|
|
|
<keygen>
| |
|
|
body_content
| |
|
|
fieldset_tag
| |
|
|
label_tag
| |
|
|
select_tag
| |
|
|
textarea_tag
| |
form_tag
|
::=
|
<form>
|
{form_content}0
| ||
</form>
| ||
frameset_content
|
::=
|
<frame>
|
|
|
noframes_tag
| |
frameset_tag
|
::=
|
<frameset>
|
{frameset_content}0
| ||
</frameset>
| ||
h1_tag
|
::=
|
<h1> text
</h1>
|
h2_tag
|
::=
|
<h2> text
</h2>
|
h3_tag
|
::=
|
<h3> text
</h3>
|
h4_tag
|
::=
|
<h4> text
</h4>
|
h5_tag
|
::=
|
<h5> text
</h5>
|
h6_tag
|
::=
|
<h6> text
</h6>
|
head_content
|
::=
|
<base>
|
|
|
<isindex>
| |
|
|
<link>
| |
|
|
<meta>
| |
|
|
<nextid>
| |
|
|
style_tag
| |
|
|
title_tag
| |
head_tag
|
::=
|
<head>
|
{head_content}0
| ||
</head>
| ||
heading
|
::=
|
h1_tag
|
|
|
h2_tag
| |
|
|
h3_tag
| |
|
|
h4_tag
| |
|
|
h5_tag
| |
|
|
h6_tag
| |
html_content
|
::=
|
head_tag body_tag
|
|
|
head_tag
frameset_tag
| |
html_document
|
::=
|
html_tag
|
html_tag
|
::=
|
<html> html_content </html>
|
i_tag
|
::=
|
<i> text
</i>
|
ilayer_tag
|
::=
|
<ilayer> body_content </ilayer>
|
ins_tag
|
::=
|
<ins> flow
</ins>
|
kbd_tag
|
::=
|
<kbd> text
</kbd>
|
label_content[d]
|
::=
|
<input>
|
|
|
body_content
| |
|
|
select_tag
| |
|
|
textarea_tag
| |
label_tag
|
::=
|
<label>
|
{label_content}0
| ||
</label>
| ||
layer_tag
|
::=
|
<layer> body_content </layer>
|
legend_tag
|
::=
|
<legend> text
</legend>
|
li_tag
|
::=
|
<li> flow
</li>
|
listing_tag
|
::=
|
<listing> literal_text </listing>
|
map_content
|
::=
|
{<area>}0
|
map_tag
|
::=
|
<map> map_content
</map>
|
marquee_tag
|
::=
|
<marquee> style_text </marquee>
|
menu_tag[e]
|
::=
|
<menu>
|
{li_tag}0
| ||
</menu>
| ||
multicol_tag
|
::=
|
<multicol> body_content </multicol>
|
nobr_tag
|
::=
|
<nobr> text
</nobr>
|
noembed_tag
|
::=
|
<noembed> text
</noembed>
|
noframes_tag
|
::=
|
<noframes>
|
{body_content}0
| ||
</noframes>
| ||
noscript_tag
|
::=
|
<noscript> text
</noscript>
|
object_content
|
::=
|
{<param>}0
|
body_content
| ||
object_tag
|
::=
|
<object> object_content </object>
|
ol_tag
|
::=
|
<ol>
|
{li_tag}
| ||
</ol>
| ||
optgroup_tag
|
::=
|
<optgroup>
|
{option_tag}0
| ||
</optgroup>
| ||
option_tag
|
::=
|
<option> plain_text </option>
|
p_tag
|
::=
|
<p> text
</p>
|
physical_style
|
::=
|
b_tag
|
|
|
bdo_tag
| |
|
|
big_tag
| |
|
|
blink_tag
| |
|
|
font_tag
| |
|
|
i_tag
| |
|
|
s_tag
| |
|
|
small_tag
| |
|
|
span_tag
| |
|
|
strike_tag
| |
|
|
sub_tag
| |
|
|
sup_tag
| |
|
|
tt_tag
| |
|
|
u_tag
| |
pre_content
|
::=
|
<br>
|
|
|
<hr>
| |
|
|
a_tag
| |
|
|
style_text
| |
pre_tag
|
::=
|
<pre>
|
{pre_content}0
| ||
</pre>
| ||
q_tag
|
::=
|
<q> text
</q>
|
s_tag
|
::=
|
<s> text
</s>
|
samp_tag
|
::=
|
<samp> text
</samp>
|
script_tag[f]
|
::=
|
<script> plain_text </script>
|
select_content
|
::=
|
optgroup_tag
|
|
|
option_tag
| |
select_tag
|
::=
|
<select>
|
{select_content}0
| ||
</select>
| ||
server_tag [g]
|
::=
|
<server> plain_text </server>
|
small_tag
|
::=
|
<small> text
</small>
|
span_tag
|
::=
|
<span> text
</span>
|
strike_tag
|
::=
|
<strike> text
</strike>
|
strong_tag
|
::=
|
<strong> text
</strong>
|
style_tag
|
::=
|
<style> plain_text </style>
|
sub_tag
|
::=
|
<sub> text
</sub>
|
sup_tag
|
::=
|
<sup> text
</sup>
|
table_cell
|
::=
|
td_tag
|
|
|
th_tag
| |
table_content
|
::=
|
<tbody>
|
|
|
<tfoot>
| |
|
|
<thead>
| |
|
|
tr_tag
| |
table_tag
|
::=
|
<table>
|
[caption_tag]
| ||
{colgroup_tag}0
| ||
{table_content}0
| ||
</table>
| ||
td_tag
|
::=
|
<td> body_content
</td>
|
text
|
::=
|
{text_content}0
|
text_content
|
::=
|
<br>
|
|
|
<embed>
| |
|
|
<iframe>
| |
|
|
<img>
| |
|
|
<spacer>
| |
|
|
<wbr>
| |
|
|
a_tag
| |
|
|
applet_tag
| |
|
|
content_style
| |
|
|
ilayer_tag
| |
|
|
noembed_tag
| |
|
|
noscript_tag
| |
|
|
object_tag
| |
|
|
physical_style
| |
|
|
plain_text
| |
textarea_tag
|
::=
|
<textarea> plain_text </textarea>
|
th_tag
|
::=
|
<th> body_content
</th>
|
title_tag
|
::=
|
<title> plain_text </title>
|
tr_tag
|
::=
|
<tr>
|
{table_cell}0
| ||
</tr>
| ||
tt_tag
|
::=
|
<tt> text
</tt>
|
u_tag
|
::=
|
<u> text
</u>
|
ul_tag
|
::=
|
<ul>
|
{li_tag}
| ||
</ul>
| ||
var_tag
|
::=
|
<var> text
</var>
|
xmp_tag
|
::=
|
<xmp> literal_text </xmp>
|
six HTML heading tags
PMA03:38
heading ::= h1_tag | h2_tag | h3_tag | h4_tag | h5_tag | h6_tag
The heading rule tells us that wherever the
heading nonterminal appears in a rule, you can replace it with exactly
one of the actual heading tags.
text-shadow
PMA03:36
Shadows are another common feature of modern Web designs. Shadows add an
element of depth to a page, but they can also enhance readability (if used properly)
to lift a headline from the page. The text-shadow attribute was technically
part of CSS2, but it has only recently been supported by major browsers:
h2 {
font-size: 300%;
text-shadow: 3px 3px 5px #666666;
}
element of depth to a page, but they can also enhance readability (if used properly)
to lift a headline from the page. The text-shadow attribute was technically
part of CSS2, but it has only recently been supported by major browsers:
h2 {
font-size: 300%;
text-shadow: 3px 3px 5px #666666;
}
Natural Link Acquisition
PMA02:06
Nothing is better than natural link acquisition. This occurs when people who are genuinely
interested in your site link to it. Information travels fast on the Internet. As long
as your site is of great quality, you will reach a tipping point where it will no longer be
necessary to invest much effort in link building. This is something any site owner should
desire: having a site that is so infectious that it becomes the buzz.
interested in your site link to it. Information travels fast on the Internet. As long
as your site is of great quality, you will reach a tipping point where it will no longer be
necessary to invest much effort in link building. This is something any site owner should
desire: having a site that is so infectious that it becomes the buzz.
P ARSING XML
PMA02:01
Two techniques are used for parsing XML documents in PHP:
SAX(Simple API for XML) andDOM
(Document Object Model). By using SAX, the parser
goes through your document and fires events for every start and stop tag or
other element found in your XML document. You decide how to deal with the
generated events. By using DOM, the whole XML file is parsed into a tree that
you can walk through using functions from PHP. PHP 5 provides another way
of parsing XML: the SimpleXML extension. But first, we explore the two
mainstream methods.
We now leave the somewhat boring theory behind and start with an example.
Here, we’re parsing the example XHTML file we saw earlier. We do that by
using the XML functions available in PHP (http://php.net/xml
)
. First, we create
a parser object:
$xml = xml_parser_create('UTF-8');
xml_set_element_handler($xml, 'start_handler', 'end_handler');
xml_set_character_data_handler($xml, 'character_handler');
function start_handler ($xml, $tag, $attributes)
{
global $level;
echo "\n". str_repeat(' ', $level). ">>>$tag";
foreach ($attributes as $key => $value) {
echo " $key $value";
}
$level++;
}
DOM
Parsing a simple X(HT)ML file with a SAX parser is a lot of work. Using the
DOM (http://www.w3.org/TR/DOM-Level-3-Core/) method is much easier, but
you pay a price—memory usage. Although it might not be noticeable in our
small example, it’s definitely noticeable when you parse a 20MB XML file with
the DOM method. Rather than firing events for every element in the XML file.
<?php
$dom = new DomDocument();
$dom->load('test2.xml');
$root = $dom->documentElement;
process_children($root);
function process_children($node)
{
$children = $node->childNodes;
foreach ($children as $elem) {
if ($elem->nodeType == XML_TEXT_NODE) {
if (strlen(trim($elem->nodeValue))) {
echo trim($elem->nodeValue)."\n";
}
} else if ($elem->nodeType == XML_ELEMENT_NODE) {
process_children($elem);
}
}
}
?>
The output is the following:
XML Example
Moved to
example.org
.
foo & bar
SAX(Simple API for XML) andDOM
(Document Object Model). By using SAX, the parser
goes through your document and fires events for every start and stop tag or
other element found in your XML document. You decide how to deal with the
generated events. By using DOM, the whole XML file is parsed into a tree that
you can walk through using functions from PHP. PHP 5 provides another way
of parsing XML: the SimpleXML extension. But first, we explore the two
mainstream methods.
We now leave the somewhat boring theory behind and start with an example.
Here, we’re parsing the example XHTML file we saw earlier. We do that by
using the XML functions available in PHP (http://php.net/xml
)
. First, we create
a parser object:
$xml = xml_parser_create('UTF-8');
xml_set_element_handler($xml, 'start_handler', 'end_handler');
xml_set_character_data_handler($xml, 'character_handler');
function start_handler ($xml, $tag, $attributes)
{
global $level;
echo "\n". str_repeat(' ', $level). ">>>$tag";
foreach ($attributes as $key => $value) {
echo " $key $value";
}
$level++;
}
DOM
Parsing a simple X(HT)ML file with a SAX parser is a lot of work. Using the
DOM (http://www.w3.org/TR/DOM-Level-3-Core/) method is much easier, but
you pay a price—memory usage. Although it might not be noticeable in our
small example, it’s definitely noticeable when you parse a 20MB XML file with
the DOM method. Rather than firing events for every element in the XML file.
<?php
$dom = new DomDocument();
$dom->load('test2.xml');
$root = $dom->documentElement;
process_children($root);
function process_children($node)
{
$children = $node->childNodes;
foreach ($children as $elem) {
if ($elem->nodeType == XML_TEXT_NODE) {
if (strlen(trim($elem->nodeValue))) {
echo trim($elem->nodeValue)."\n";
}
} else if ($elem->nodeType == XML_ELEMENT_NODE) {
process_children($elem);
}
}
}
?>
The output is the following:
XML Example
Moved to
example.org
.
foo & bar
PEAR class: System
PMA01:54
The System PEAR class is available as part of the basic PEAR install:
<?php
require_once "System.php";
$tmp_file = System::mktemp();
copy("http://php.net/robots.txt", $tmp_file);
$pear_command = System::which("pear");
?>
PEAR class: OS_Guess
The OS_Guess class uses the php_uname() function to determine on which
operating system it is running. It also provides ways of generalizing and comparing
OS signatures:
<?php
require_once "OS/Guess.php";
$os = new OS_Guess;
print "OS signature: " . $os->getSignature() . "\n";
if ($os->matchSignature("linux-*-i386")) {
print "Linux running on an Intel x86 CPU\n";
}
?>
Example output:
OS signature: linux-2.4-i386-glibc2.1
Linux running on an Intel x86 CPU
<?php
require_once "System.php";
$tmp_file = System::mktemp();
copy("http://php.net/robots.txt", $tmp_file);
$pear_command = System::which("pear");
?>
PEAR class: OS_Guess
The OS_Guess class uses the php_uname() function to determine on which
operating system it is running. It also provides ways of generalizing and comparing
OS signatures:
<?php
require_once "OS/Guess.php";
$os = new OS_Guess;
print "OS signature: " . $os->getSignature() . "\n";
if ($os->matchSignature("linux-*-i386")) {
print "Linux running on an Intel x86 CPU\n";
}
?>
Example output:
OS signature: linux-2.4-i386-glibc2.1
Linux running on an Intel x86 CPU