Coding Styles
This page lists the different coding styles I use and states why i use them and how I use them.

XHTML

XHTML is the main type of code I use to actualy build the site. XHTML is an XML version of HTML which is the language used to create all web pages. XHTML offers more than HTML does, the main thing being better accessability. XHTML goes hand in hand with CSS, while XHTML defines the content and basic structure of the web page the CSS produces the style, look and feel of the website. The idea of XHTML is to make the website viewable on all devices and browsers, although the page make look different on different browsers it should still be viewable. I normaly keep to the XHTML1.1 guidlines which is the latest version of XHTML and should help future proof websites as much as possible so the XHTML does not need to be updated in the future to meet newer browser needs. There are problems with using XHTML, although the site is normaly better made than with standard HTML it does take longer to build. This is due to there being no margin for error as one error may break an entire site unlike HTML which could be coded very loosly.


CSS

CSS is what gives the web page its overall look and feel. The CSS sets all the colours that are used on the page, can define fonts, backgrounds, margins and borders as well as many other different features. Without the use of CSS the website would not have any style and would look similar to how it would look in a text browser. Although CSS can take a long time to get looking right and must be checked on as many different browsers as possible as different browsers render the CSS slightly differently the effort is worth while. Without the CSS a website would look very dull and boring, the website http://www.csszengarden.com/ shows just what can be done with css. If you look through the different pages you will see they are all very different yet the main page with the content is exactly the same for every different style.


PHP

PHP is what i use to make web pages dynamic. PHP is supported by most web hosts and for this reason is ideal to use. By dynamic web pages i mean the content can be generated on the fly or taken from a database of anywhere else on the web so the web page is constantly being updated with little, if any effort. With PHP a web page could be different every time you view it and when a website is constantly changing it gives the viewer more reasons to keep coming back to the site to see what changes have been made. I also use PHP to help build templates, this allows me to use one page and a css file to control the whole look of the entire site so if a link needs changing or the website is being revamped only the one file, and possibly the CSS file as well need to be changed and the whole site will change its look, rather than having to change every single page which leaves less room for errors. On this web site PHP is used for the user accounts which in turn is used mainly with the forum which was created in PHP and the blog system as well.


MySQL

MySQL is the database i normaly use online. I use MySQL as it is fast, secure and is on most web servers as well as working very well with PHP. I use the database to store most and with some websites all the content on the website. The most easiest example being the forum which has every post stored in the database with other relevent information such as the poster and time it was posted.