Posts Tagged ‘W3C’

Valid Flash Embed – Make That YouTube Embed Valid!

Hola! It’s been a while. I’ve got another gripe, and this time it’s with Flash embed code!

Most of the embed code I see for Flash movies is invalid, usually containing the non-existent embed element or some-such. Even the code provided by YouTube for embedding videos contains embed. This can easily be thrown out and will—probably most of the time—instantly make your code valid.

Here’s an example (in XHTML) of a valid Flash embed that works in at least IE6+, Firefox, and Safari:

<object data="flash.swf" type="application/x-shockwave-flash" width="320" height="240">
<param name="movie" value="flash.swf" />
</object>

That’s all there is to it. Adjust the parameters and add additional param elements as necessary. If your Flash movie requires variables, just add an extra param as follows:

<param name="flashvars" value="arg1=foo&amp;arg2=bar" />

If you place additional elements inside the object element, it will act as a fallback, displaying if the Flash plugin isn’t installed. For example:

<object data="flash.swf" type="application/x-shockwave-flash" width="320" height="240">
<param name="movie" value="flash.swf" />
<img src="fallback.jpg" alt="Flash Didn't Load!" />
</object>

That’s all for now. Happy coding!

—Kyle Blizzard

Basic SEO For Everyone Chapter 3

[ Basic SEO: OneTwoThreeFourFive ]

As promised this will be about onpage and under the hood SEO basics. Starting at the top (of the html) we have the……… nope not the title, first let’s take a look at the Doctype. What does the Doctype have to do with SEO? Almost nothing but why not start out by telling the spiders what type of page you attempted to make and what type of code you are trying to write? It can’t hurt and might help them parse the page better. If you aren’t sure what the Doctype is then run over to the web standards authority and check it out and also read SEO and Validation.

OK, now the Title, what makes a good title? How is it used? The title will show in the title bar of most web browsers. There are not really any good statistics I’m aware of for how many people look at page titles when they are on your site but when they search, they are generally served your title in the Search Engine Results Page (SERP). We also know that Google, Yahoo, and Bing look at and put enough weight on your page title that it really matters. You can change your page title and only your page title and watch some of your search positions change, that’s how important the title is. If that’s true then why not SPAM the title? Simple, if I need a jack and the search results at position 4 is Jack : Lift : Heavy : Duty : Ultimate : Hydraulic and the position 5 result is The Ultimate Heavy Duty Hydraulic Jack by the JackMan then which one do you think gets more clicks? Another reason to make good titles is because the algorithms are very good at detecting SPAM and chances are you will do more harm than good if you just create stuffed titles. Moving on let’s decide what the page is about and craft a good title for humans and bots. For humans we need to strive for a complete sentence that makes sense and draws attention or demands action. Pick the topic of the page and try to get the main keywords or phrase in the first half of the title. Wow! All that in less than 70 characters including spaces, good luck. Good titles can be  a challenge but you will be rewarded for your effort. Try it, pick a product or service and try creating a title that would make you click it. After all, that is the goal, we want clicks because clicks equal traffic.

What about the page description meta tag? The search engines will most likely use your description to form the SERP description. Don’t copy the title, don’t use special characters. Include the main keywords or phrase for the page content. There is no penalty per se for a short description but you might be missing out on some keyword opportunities. Too little content could get a bot generated description that misses the point of your page. Take the opportunity to sell your product, service, or idea and use between 30 and 150 characters as a guideline.

The once powerful and now dusty and often forgotten keyword meta tag can still be useful so don’t completely neglect it. Put in your secondary keywords and key phrases, the ones that aren’t in your title and description. Limit duplicate words in phrases to 3. You can even include common typos. You can use up to 500 characters as a guideline but that’s probably more time than it deserves. I can’t tell you what search engine spyders still look at the keywords meta but there is some indication that Bing (Formerly MSN – Live Search) will grade your keywords but the weight is probably very low.

Well, I’m out of time so we will get to heading element, page content and copy writing in the next chapter.

—David Blizzard

Web Standards Again

Greetings! Many times we have clients that have trouble understanding the role of web standards and why they are important. So I created this high level explanation that I hope will suffice. It is, by its very nature, simplified and incomplete, so don’t stone me to death. Here goes…

The World Wide Web Consortium (www.w3.org) is the standards body for the internet. They define the standard “language” or markup that web pages are written in. All of our documents are written in the strict flavor of XHTML (eXtensible Hypertext Markup Language) 1.0 which is very intolerant of errors. Conforming to these standards has several practical benefits. First, the site is easier to update since all of the content is easy to read and logically organized. This reduces cost for updates to the site. The W3 provides a validator to check pages against the XHTML standard and report any errors that it finds.

Secondly, strict XHTML mandates that the graphical presentation of the page (how it looks) be separated from the actual content of the page. So there is a separate file we create called a “stylesheet” that determines how the page will look. All of the graphics, colors, and layout are determined by this stylesheet. This is a benefit because it makes for smaller, faster loading pages which can rank higher in search engines than bloated pages that are slow to load. It also makes it easier to update how the site looks. For example, as autumn approaches you could change the entire look of the site by changing the colors in the stylesheet to fall colors. This is much more efficient than redesigning a site in the old days when each individual page had to be changed at great expense.

Lastly, search engines look for unique, relevant content that is organized well. By keeping all of the content in a separate file, the content can be organized so that the most important information is close to the top of the document while repetitive elements such as the navigation links are closer to the footer.

Be sure to read this post about HTML validation for SEO

There is a great FAQ on web standards and their importance at: http://www.webstandards.org/learn/faq/

Good Luck!

—Alan

Logical Structures and Happy Designers

While valid markup and CSS are necessary, they’re not the only things we web designers require to keep our sanity. One can create a valid page that is still difficult to work on. For example, using absolutely positioned elements for page layout is even worse than just using tables. When you add content to one element, the ones below it are not pushed down because they are no longer in the “flow” of the page. This causes overlap of content and makes it extremely difficult and frustrating to add anything to the page. Utilities such as Yahoo! SiteBuilder create pages like this.

A markup structure that is built to logically represent the content of the page and not to facilitate the appearance of the page is much more easily edited and future-proof than the “HTML soup” sites of old. I wistfully say “old”, but the truth of the matter seems to be that HTML soup is still the preferred meal of the majority of so-called web designers. A lot of the web sites we’ve moved to our servers are a pain to work with and rarely validate, and they were, sadly, created by professional web designers!

Another couple things that are bad practice but not invalid are the use of inline style and CSS classes with names that tie them to a particular stylesheet such as “red-text” or “left-side”. What if you change the stylesheet some day and that “red-text” is now supposed to be blue or the “left-side” spans the bottom of the page? The World Wide Web Consortium themselves discourage the naming of CSS classes like this. They also have some other useful tips that all web designers should read and keep in mind.

If you’re a fledgling web designer or perhaps someone who is just looking into having a web site created and wondering what valid code and good design practices can do for you, check out the CSS Zen Garden site, an excellent example that is logically structured and able to accept stylesheets of wildly different appearances without the need for markup changes.

—Kyle Blizzard

Valid code and happy designers

Writing valid XHTML and CSS takes a little extra time but can save a client money and a designer their sanity. In the relatively brief history of web design there has been a great deal of controversy concerning web standards. Designers like to make money and making money means completing projects quickly. Typically, if the client liked it and it rendered correctly then the project is done. The major browser manufacturers carry some of the blame in their efforts to have the latest and greatest features they have implemented web page design elements in their own way. Rather than engendering innovation they have had the effect of creating a Tower of Babel of incompatible tags. In the old days,  some designers used any hack necessary to get a page to display properly in the the most popular web browsers of the time. However, in the past several years, the web standards community has been increasingly vocal about incompatible code and rendering problems. This has been especially true with IE-only sites that will not render properly or at all in alternative browsers such as Firefox, Safari, Opera, and Chrome. However, a standards compliant site provides greater interoperability for the same content on different platforms.

Another additional benefit of writing valid code is that it is easier to read, edit, and redesign. Separating the presentation of a site from its content using stylesheets seems like a no brainer. Theoretically you could redesign an entire site just by editing the stylesheet and the graphics without ever touching the XHTML. We have a number of clients who move to us from other hosts and the amount of spaghetti code that we are asked to edit sometimes makes us want to pull our hair out.

The point is, you can write sloppy code if you want to. You could even use <blink> tags in a site designed entirely in tables and transparent gifs if you were so inclined. But where is the return on investment for the client? There is a high probability that you are not the last one that will ever touch their website. So have a heart and validate your XHTML and CSS. You will get faster at making lean, mean standards compliant sites that look good on any browser.

—Alan