Snoogie
03-08-2004, 02:15 PM
Any tuts/tips/sugesstions so I can make my code XHTML conform?
Is there something better then XHTML conform?
Arch Stanton
03-09-2004, 10:53 AM
Any tuts/tips/sugesstions so I can make my code XHTML conform?
Is there something better then XHTML conform?
Basically XHTML is HTML with all tag and attributes in lower case. Each tag must have a closing tag. All attributes should be quoted. For tags that do not wrap around content, like <br> and <img> you can close the tag in itself: <br />
<img src="image.jpg" alt="Alternate Description" />
Thats essentially it, although each XHTML doctype has different attributes and tags that are compliant. A lot of deprecated tags are no longer available. There are tools out there to convert html to xhtml (http://www.w3.org/People/Raggett/tidy/), but I just follow the above rules and then validate with the w3c validator (http://validator.w3.org/)
To code good xhtml, you should also have a really good understanding of proper CSS implementation (http://www.ucit.ca/htmlcss/).
Snoogie
03-10-2004, 04:56 AM
Thanks for the tip!
What is the best "standart" to follow when coding html?
Arch Stanton
03-10-2004, 10:16 AM
The easiest doctype to use is 4.01 transistional. It has support for a lot of deprecated tags that you may be using to get your sites to work with older browsers. If, however, you are excluding 4.x browsers from your list of supported technologies, 4.01 strict and xhtml transitional should be good.