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 arenon-search areas are appraised:Understanding your Organisation’s Online Business StrategyGood SEO requires a through understanding of your organisation’s overall businessstrategy. How does search fit in with activities such as advertising, e-mail and directmarketing? Is there a marketing plan? What does it say about objectives, strategy andbudgets? What is the overall direction...
Table basics in HTML
PMA06:32
It’s reasonably straightforward to create a simple table when hand-coding markup. Thebare essentials of a single table is an opening <table> tag, followed by at least one tablerow (a <tr>), followed by at least one table cell (a <td>, meaning “table data”). Here’s anexample:<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’reunlikely to create a table with only one item of data, so let’s make things a touch moreinteresting....
Anatomy of an XHTML document
PMA06:24
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 declarationFirst we see a doctype declaration. A doctype declaration provides an indication as towhat Document Type Definition (DTD)...
XHTML vs. HTML
PMA05:06
The question of whether to use XHTML or HTML will often not even come up in an averageweb project; most web designers these days will naturally gravitate toward XHTML, asit 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 thechapter is to discuss exactly how XHTML differs from earlier versions of HTML, debunksome myths and misconceptions about XHTML and HTML, examine the issues behindMIME types, and cover when it is (and isn’t)...
id and class attributes
PMA05:03
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,...
Divs and spans
PMA05:02
Divs and spans are two tags that, when used well, can help give your page a logical structureand some extra hooks to apply any CSS or DOM scripting that you might need later. Whenused badly, they can litter your document unnecessarily and make your markup, styling, andscripting 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...
CSS and Canvas HTML5
PMA03:39
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 goodexample, 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 mayalready be familiar with from CSS. Colors and fonts, for example, use the same notation on the contextthat they use throughout any HTML or CSS document.Browser...
Overview of HTML5 Canvas
PMA03:37
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 setother 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 anyway you want. You can add graphics, lines, and text to it; you can draw on it; and you can even addadvanced animations to it.The Canvas API supports the...
Using the Selectors API HTML5
PMA03:32
getElementById() -Returns the element with the specified id attribute value<div id="foo">getElementById("foo");
getElementsByName() -Returns all elements whose nameattribute has the specified value<input type="text" name="foo">getElementsByName("foo");
getElementsByTagName() Return all elements whose tag namematches the specified value<input type="text">getElementsByTagName("input");
With the new Selectors API, there are now more precise ways to specify which elements you wouldlike to retrieve without resorting to looping...
CSS File for the HTML5 Page
PMA03:29
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:...