Clean Coding
Designing, developing, and maintaining web pages can be tedious work, but nothing makes the work more difficult than sloppy coding. When pages are coded poorly, it can be a nightmare to modify the existing content or to debug a problem. This is compounded by the fact that someone other than you may have to edit the code, making it a point of courtesy to ensure that it is as understandable as possible.
Toward this end, there are several practices that you can institute to ensure that your code is clean and readable. First and foremost, web browsers ignore white spacing in code, but it can be a lifesaver to human eyes. Use consistent spacing and indentation to delineate major sections of the code. It is a common practice to increase the indentation for code within block-level HTML elements, such as table tags.
Secondly, all web browsers will ignore HTML comment tags, making them a wonderful way to leave useful notes within your code. If a complicated table respresents the header of your page, why not throw in a <!– Page header –!> just before it. Comment tags are great for giving meaning to otherwise generic HTML tags.
Thirdly, always be sure to validate your code after it is written or editted. The World Wide Web Consortium provides a convenient HTML Validator tool for this purpose. Remember, proper HTML 4.01 compliance will help your site’s cross-browser compatibility as well as make your site more friendly toward search engine spiders.
Lastly, be aware of the effect that WYSIWYG (What You See Is What You Get) editors such as FrontPage might have on your coding structure. Such programs often have their own standards that will be reflected in any HTML that they are used to edit. If you are planning on using an editor, it may be useful to learn and conform to its guidelines to ensure consistency. Otherwise, you may be better off editting the code directly with a text editor.