Forum Moderators: phranque
I've been playing around with web code for nearly two years now, and was rather thrown in at the deep end when the forum a group of gamers were using closed - meaning that we decided to set up one ourselves.
The forum itself is fine, but that's what you expect when it's just a case of installing the software and tweaking the colours/adding the content.
But the other parts of the site (away from the Database-driven forum) I imagine couldn't be viewed in the same light, there's no consistant style sheet, it's white text on a black background, and I'm sure there's many other things you're not meant to do located with the code.
The worst thing? It's all my code!
I'm asking for some helpful guidance, and a selection of things to Do (and Not Do) when building up a site - I've decided that it could all do with a re-write and so would like to start off on the RIGHT foot this time.
Any advice, links or gentle abuse (I'm not too keen on the harsher stuff) is much appreciated.
Browse around here and get the feel of what's NOT done any more. Things are indeed changing.
Get familiar with the W3C specs and where things are going, and program for the future to the best of your ability: for example, there have been recommendations against the font tag since long before CSS was widely supported. Take steps to eliminate depricated tags and elements.
Accessibility **IS** important. If you use Javascript, make it so your page works without it. If you use Flash, same deal, and do not bury links or other navigational elements in those tools. Basically any perks you add to your page - take them away and is the data still accessible?
Take the time to test your pages on as many browsers and platforms as possible. Build a list of Macintosh friends if you're windows-based. In spite of what people say, there are a lot of them out there.
And the absolute two best things you can do to your pages (IMH0)? Us a document definition type and run your pages through a good validator, such as the ones at W3C [validator.w3.org]. Many people still don't know that a) without a DDT, IE still goes into "quirks" mode which affects your presentation (Google for it) and b) if the DDT doesn't have a value for the URL parameter, it also goes into quirks mode.
The last is one that is still a bit controversial, sometimes because some of us (such as myself :-) ) still see the advantages of it. Tables are for tabular data, you should at least **try** to eliminate the use of tables for layout and strive for pure CSS. At the very least, for a site to pass accessibility guidelines, you should never have nested tables - tables in tables. There's a great deal of info in the CSS forum to help you along on that one.
Look around, take the recommendations of pages like this [useit.com], but sometimes you have to take them with a grain of salt. Reality and practical application often lies in a wide gray area between strict (dare I say fanatic? :-) ) and lazy. But if you read and heed, much of what's right will come up again and again, and you'll see the value.
Lastly, don't measure your progress or quality by what you see out there. People are still blindly plunking in font tags without regard to any of this, nesting tables six deep, publishing pages that will kick off hundreds of validation errors, and spewing unsupported or proprietary code (as in "only works for this or that browser") at a sickeningly astronomical rate, and the really disheartening part is many of them are far more successful than you or I. Ignore them and forge onward as right as you can.*
* I tell myself it will pay off in the end. GOD I hope I'm right. :-)