I always put in the trailing semicolon and would ask that this practice be adopted by any team I work in even though it is not required.
When I wasn't particular about putting it in, I found that when the CSS was later edited by either myself or other maintainers that inevitably a bug in the CSS would be introduced because someone would add several new properties at the end of a rule but overlook terminating the previous property with a semicolon -- irritating. Getting in the habit of always adding the trailing semicolon has pretty much eliminated that ever happening.
As Lindsay mentioned earlier, either you or someone else will have to read/edit/debug your code sooner or later and its important that it is readable and easy to follow. Following widely used coding practices just causes less pain and leaves less to trip over for whoever has to work with your code after you've left the building.
Cheers, chris
On 15/04/2004, at 4:13 PM, Hugh Todd wrote:
theGrafixGuy said,
You do not need the “;” after the last attribute in each style
I know this is technically true (browsers will accept it) but I understood that good coding practice is to put the semicolon even after the last attribute. Anyone else know anything about this?
-Hugh Todd
***************************************************** The discussion list for http://webstandardsgroup.org/ See http://webstandardsgroup.org/mail/guidelines.cfm for some hints on posting to the list & getting help *****************************************************
