How Your Pages Should Be Laid Out

This is intended to be a quick tutorial explaining how you should lay out your HTML pages to ensure that your site works properly for all visitors and search engines. This tutorial assumes that you already have a general knowledge of HTML and CSS.

Your document should begin with the head section, followed by the main content of your page, then any navigation menus you want included. Finally, at the bottom of your document, you should include any javascript files and functions that need to be present.

Redirecting and Duplicating Content Properly

There are certainly times when all Web developers and “information architects” find themselves in a situation where they need to move content from one page to another. When you do so, you need to redirect visitors from the old location to the new location, and you need to do so properly. To do that, you need to make sure that the old location returns the correct status code (301 – Moved Permanently). There are a number of ways to do this. The most efficient way, for apache users, is to set up a redirect inside of your .htaccess file. However, if you don’t have permission to set up redirects within .htaccess, you can use PHP (or any other server-side scripting language) to do so. Using meta refresh tags and javascript is not generally the best way to redirect your visitors.

Accessibly Use Image Headers

A while ago, I heard rumors that the next incarnation of HTML would include support for easily replacing HTML elements (such as headers) with images by simply adding a “src” attribute to the HTML tag. For instance, you might be able to do something like:

<h1 src="myimage.png">This is my alt text</h1>

However, it seems that the advent of this type of thing, if it ever happens, is still quite a ways off. Therefore, if you’re looking for an easy way to replace a plain text header with a nice image, for instance, a banner, you need to find another way of doing so.

This article will briefly explain how to do so using purely CSS.

Eight Links – April 22

Here are today’s Eight Links — links for web developers:

  1. JsPDF – create PDF files completely using JavaScript
  2. The Database Rant – begins with “It’s time for SQL to die.”
  3. iPhone app sales – a developer explains the income his app has generated and how changing pricing didn’t change sales
  4. Why writing software is like writing
  5. 18 Seriously Helpful Cheat Sheets for Easier Coding
  6. Google Analytics API Launched
  7. Finding and Fixing Memory Leaks in Python
  8. A Design for a Distributed Transaction Layer for Google App Engine

Web Development Links for February 19

Here are some great resources for today:

Internet Explorer and “Quirks Mode”

A few years ago, someone at Microsoft had a brilliant idea to create something called “Quirks Mode” for Internet Explorer. The reasoning behind it is still a bit beyond me, but apparently it has to do with trying to make the browser render old Web sites the way they were initially intended to look. Basically, “quirks mode” turns all versions of IE into IE 4 (as it essentially attempts to render the page the way it would have been rendered with IE 4, ignoring quite a bit of CSS and XHTML).

Pages: