This won’t be a full-fledged tutorial, but a list of things you can do or should bear in mind when designing your web sites.
- Use <div>s to position your content.
- Always use alt descriptors for your images. For unimportant images, just leave it blank, but make sure it’s there.
- CSS is your styling friend. Don’t hardcode your styles in HTML elements.
- Flash can be made XHTML compliant. Here’s an example on how to embed it for compliancy:
-
<div class="flashholderdiv">
<object type="application/x-shockwave-flash" data="http://your.url/yourdir/flashitem.swf" width="778" height="98">
<param name="movie" value="http://your.url/yourdir/flashitem.swf" />
</object>
</div>
-
- Ensure all XHTML tags are closed properly. For standalone tags like <br /> and <hr />, add the terminating slash within the tag itself.
- If you have problems validating pages with JavaScript, try enclosing them in block level elements.
Additional related reading:










February 15th, 2006 at 2:03 pm
Yeah, add the terminating slash within”g” the examples shown.
Quoting you:
If you have problems validating pages with JavaScript, try enclosing them in block level elements.
You could put your JS inside and be done with it.
February 16th, 2006 at 9:19 am
Yup, JavaScript can be in an external file and be src’d. Forgot about that too.
However, there are some JavaScripts that you just have to put in your pages “as is”. AdSense code is one of the obvious example.