Penguin
Diff: RealWorldWebCompliance
EditPageHistoryDiffInfoLikePages

Differences between version 13 and predecessor to the previous major change of RealWorldWebCompliance.

Other diffs: Previous Revision, Previous Author, or view the Annotated Edit History

Newer page: version 13 Last edited on Friday, May 20, 2005 1:58:17 pm by AristotlePagaltzis Revert
Older page: version 11 Last edited on Monday, May 9, 2005 3:13:25 pm by JohnMcPherson Revert
@@ -8,20 +8,34 @@
  
 !! Dos and don'ts 
  
 * __Don't__ create browser detection pages that lock out browsers you think won't work, or browsers you don't recognise. New browsers and versions come out all the time, and you never know when one of them will be fixed. 
+  
 * Don't use markup purely because its default display suits what you want. Use markup that's suitable to the content, then style it using [CSS], instead. 
+  
 * Don't test your [CSS] padding/margin/width settings by only testing in IE. 
+  
 * Do test your [HTML] pages against http://validator.w3.org/ (or the free [sgmlnorm | http://openjade.sourceforge.net/doc-1.5.1/sgmlnorm.htm] program). 
-* Don't put stuff in a table without <tt><td></tt> tags around it (IE displays it, Moz might not). 
+  
+ * Don't put stuff in a table without <tt><td></tt> tags around it ([ IE] displays it, [Mozilla] might not).  
+  
 * Don't put tooltips in the <tt>alt</tt> attribute. They belong in <tt>title</tt>. 
-* Be careful with your comments: 
+  
+ Put an empty <tt>alt</tt> attribute on your images as a rule of thumb. Only contain when the image actually replaces part of a sentence or is otherwise part of the text should the <tt>alt</tt> attribute contain any text, which should be what the image replaces. Imagine your content being read aloud: would the content <tt>alt</tt> attribute make sense as part of the text? If not, its alternative text should be empty. This means decorative and even illustrative images should not containt alternative text.  
+  
+ * Be careful with your comments: <tt><! ></tt> by themselves delimit a __declaration block__, and the <tt>--</tt> double dashes can be used to open and close comments inside such a block. This means:  
+  
  * Don't use <tt><!--</tt> and <tt>--></tt> in <tt><script></tt> tags without making sure they are matched. InternetExplorer won't care, but [Mozilla] will consider the rest of your page commented out. 
- * The popular <tt><!----------></tt> style "separators" are dangerous. With an odd numbers of dashes, the comment does not close , so the rest of your page will be commented out. Best to avoid any more than single dashes altogether inside comments. (Actually, <! ... > is a __declaration__, and --... -- inside a declaration is a comment. So, putting -- inside it actually closes your comment, and another -- starts a new comment. So only use double dashes at the start and end of the comment!)  
+  
+ * The popular <tt><!----------></tt> style "separators" are dangerous. With any numbers of dashes that is not a multiple of four , you will leave an open comment section around , so the rest of your page will be commented out.  
+  
+ * Using <tt >--</tt> inside a comment actually closes it. The rest of what was supposed to be a comment will spill into your page . Best to only use double dashes at the start and end of the comment and avoid any more than space-separated single dashes altogether inside it.  
+  
 * Don't use <tt>document.all</tt> in your JavaScript 
+  
 * Don't use MSXMLDOC 
  
 See a [great guide on the specifics | http://nexgenmedia.net/evang/iemozguide/] and the [Mozilla Web Author FAQ | http://www.mozilla.org/docs/web-developer/faq.html]. 
  
 !! Should I support Netscape any more? 
  
 If you support [Mozilla], you're supporting Netscape 7 and up. These days it's realistic to drop support for any version of Netscape 4 or below.