Skip to Content

Standards, standards, standards.

What standards?

A coding standard refers to a uniform format of markup or code that's adopted by the majority of designers or developers. A standard can be a preferred method for accomplishing a specific programming task, or a requirement regarding the number and location of spaces, blank lines, or tabs that appear in your code. When creating websites, it's likely that you'll use a combination of programming and markup languages such as (X)HTML, CSS and PHP / MySQL. When writing your code and markup, it's important that you adhere to applicable industry standards.

Web Standards

Web Standards

Each markup language, programming language, and development community may have its own standard. In the case of the more universal markup languages and styling methods such as (X)HTML and CSS, your standard will just be creating valid markup by W3C standards, that's the World Wide Web Consortium. On the other hand, standards for programming languages or development frameworks (think Code Igniter or Drupal) are often developed and maintained by the development community specific to the project. If the markup, language or framework you are using adheres to a standard, it will probably be easy to find in its documentation or by simply performing a google search.

Readability and Extensibility

One of the most important reasons to adhere to standards where possible is to create clean, readable code that fosters a flexible and extensible development environment. Through the use of standards in your code, you ensure that other developers in the future of the project are able to read and understand your work and build on it effectively. This concept works reciprocally as well, that is, understanding the standards for programming languages and development frameworks will give you an advantage in comprehending and extending other developer's code.

Browser compatibility

Browser compatibility refers to how compatible your website is with different web browsers. The majority of the Internet using populous uses one of several versions of about three altogether different browsers; these browsers are Firefox, Safari, and Internet Explorer. Unfortunately, each web browser has a sort of standard of its own in regards to how it translates markup into text and images. Because each browser interprets markup differently than the other, inconsistencies in how your website appears to different users can arise. In some cases, these markup interpretations can be drastically different, causing your website to appear totally normal in one browser and "broken" in another.

While it certainly doesn't fix how browsers interpret your markup, creating valid (X)HTML and CSS can go a long way in ensuring that browsers at least understand or parse your markup correctly. Because some browsers are vastly more forgiving of broken markup than others, it's very possible for your broken markup to work fine in one browser while it simply doesn't work at all in another. Fixing broken markup is definitely the first step in making your website browser compatible. So how can you tell if your markup is valid? Luckily, the W3C provides a validator that will tell you in clear terms if your markup is valid, and if not, how to fix it. You can take a look at the validator at http://validator.w3.org.

So how can you fix the problem altogether? Unfortunately, it's not very easy. The first step is identifying if you have a problem and what it is. For this, the easiest approach is to look at your website using each of the different browsers to make sure that it appears correctly. It can be really difficult to gain access to each version of each browser, though, so sometimes it is best to go with a browser testing application such as Litmus. Litmus browser testing (http://litmusapp.com) is a service that will render an image of your website as seen from each major version of each major browser.

The next step is actually changing the markup so that each browser renders your website the way you intended. The different ways that each browser interprets (X)HTML and CSS aren't documented in one consolidated source, so often you'll need to revert to some research of your own. Performing a google search about your problem, reading design blogs, participating in relevant forums, and of course, trial and error are all great approaches for learning more about browser compatibility issues.