HTML Coding Specifications

The following style guidelines are set forth by Digital Indigo Technologies. The specifications are in place to create a uniform coding technique across all Digital Indigo sites. These specifications follow general style rules, however they are designed to maintain maximum compatibility across the current infrastructure.

In various situations, such as maintenance to an existing site, they guidelines may not be applicable. However, all new sites produced, or co-authored by Digital Indigo and alliance or associated companies are expected to follow these style guidelines. Exceptions to this are permitted if a style change is requested by the customer, however the customer must be informed that maintenance and/or repairs to the site may have longer update times and that warranties from Digital Indigo may be void or altered due to syntax changes.

 
File Syntax
1. All files shall have complete extension names.
Truncated extensions such as .htm kludges unique to operating systems and are unacceptable.
2. Upper case characters are prohibited in file names.
Upper case text makes command line navigation more difficult. Upper case characters are to be avoided completely.
3. Spaces are prohibited in file names.
Spaces cause inconsistent appearances in directory listings. They also make navigation at the command line cumbersome. Spaces can cause errors in some browsers and/or HTML parse utilities.
4. Underscores are to be used to seperate multiple words.
Files should be written in a syntax such as primary_listing.html or large_logo.gif.
 
File/URL Reference
1. Initial files in a directory shall start with the index preface.
For example index.html, index.php. Other starting names, such as home.html are configured in our server, but are not examples of our acceptable design.
2. Individual directories will not have start pages specified in the URL reference.
For example, if referring to the directory some_directory/ the URL shall look be of the syntax some_directory/. Violations of this guideline would be URLs of the syntax some_directory/index.html.
3. URLs will not contain fully qualified domain names (FQDN) to link to the current site.
For example, if linking to the support directory from the Digital Indigo site the URL http://www.digitalindigo.com/support is unacceptable. Simply use the URL /support. The same is applicable to directory traversal. Use ../support to refer to the support directory from one directory level under the root, and so on.
 
General Rules
1. HTML pages should have meta tags for keywords.
Keyword meta tags help search engines find specific pages. This applies to both commercial and our local search engine.
2. All pages shall have titles.
Titles are extremely important for search engines, and bookmarks that users may add in their browser. Always add titles to Web pages.
3. Use common font names.
In particular, use sans-serif for sans-serif fonts. Many companies (especially those using FrontPage) use Ariel, which is not included on all platforms. The sans-serif font produces the same results and is compatible across all platforms.
4. Use fallback font names.
If using unique fonts, such as Ariel,  use fallback fonts in font description tags. For example use font="ariel,helvetica,sans-serif" to indicate proper fallback for fonts.
 
HTML Syntax
1. Index two (2) spaces for each code level.
HTML should have indentation. It is recommended that code has two spaces per level of indentation. However, we remain flexible on this guideline since various HTML utilities have their own indention techniques.
2. Escape necessary characters.
Characters such as &,<,> must be properly escaped. Follow current escape specifications set forth by HTML standards committee to determine character escaping syntax.
3. Use non-blanking spaces (&nbsp;) in empty table cells.
The use of the nbsp tag allows proper display of empty cells. All empty cells and potentially empty cells (in active HTML) should have at least one nbsp tag per cell.
 
Images
1. Use JPEG format for all photographs.
JPEG is specifically designed for photographs. It allows 16,777,216 possible colors for full color representation of a photo. Do not use JPEG for graphics, logos, and line art, as it will leave artifacts as well as take up significantly more space.
2. Use PNG in place of GIF on Intranets (not recommended for Internet use).
PNG is a much more efficient graphic format than GIF. However it is not supported in many older browsers. Only use PNG in places where you know everyone accessing the site will be using PNG-capable browsers. Internet use is not recommended at this time.
3. Use GIFs for logos, line art, and graphics.
GIF is optimized for line art images with only a few colors (255 or less). Due to its algorithm design GIF optimizes best on horizontally similar colors. Therefore a GIF with more horizontal lines (or horizontally similar components) will compress better than a GIF with vertical lines or components.
4. Alias all stand-alone graphics.
Graphics should not have ragged edges with the exception of graphics that are placed against a certain color background. In this case the graphic should still be aliased, but the perimeter background color should be cropped in non-aliased fashion.
5. Trim common colors (to transparent) and do not alias trim for graphics placed against a colored background.
If placing an image against a colored background, trim away excess common colors around the perimeter of the image. When trimming do not use aliasing. This will produce muti-colored perimeter lines which will have an unacceptable appearance when placed against a background. Always trip perimeter colors. Failure to do so will cause unsatisfactory viewing for users with limited colors on their browsers.
6. Use bgcolor tag as a backup when using background tag in tables.
When using background images in tables, it is necessary to specify a background color similar to the average color of the background image. Thus, if a browser without background image capabilities hits the page, the background color will substitute, providing a somewhat backward compatible viewing experience.