Code to Know for Website Design
Updated on July 28, 2007
If you want to create websites, you could just use a WYSIWYG website editor and let it do all the work. Unfortunately, while such programs do make life easier for the amateur, they tend to bulk up the code, which makes the web page file larger and increases the amount of time necessary to download the page. If you're a beginner who only plans on designing one or two small websites, you may not care about download time and bulky code, but if you want to do more than amateur work you absolutely must learn how to code web pages.
XHTML: The first code you need to know
HTML was good enough in the past, but now that we have so many different devices (computers, cell phones, PDAs, and even refrigerators) that access the Internet, which means your websites will need to be easily viewed by multiple browsers in multiple sizes. To make sure that we can do this, developers created a stricter code called XHTML.
If you already know HTML, then learning XHTML won't be much of a stretch. It just requires a stricter format for writing the code.
If you don't know HTML, then skip learning it and go straight to XHTML, so you don't develop any bad habits.
XHTML is the foundation of most web pages, regardless of the page extension (e.g. .htm, .asp, .php, etc.). It tells the browser what to display on the page.
CSS: The second code you should know
While XHTML tells a browser what to display or where to display it(most of the time), CSS tells it how to display it. For example, in XHTML, you tell the browser to display the sentence "I like dogs." In CSS, you tell the browser to display the sentence in red, bold, flashing letters, surrounded by a dashed, yellow border, and stick it all in the upper right corner of the screen.
By using CSS, you can create a more cohesive look to your website by having many pages that use the same template. You can also modify many pages at one time rather than changing every single page in a website. Even small websites with only a few pages can benefit from using CSS because it gives the code a cleaner look, making it easier to edit.
JavaScript: The first scripting code you should know
JavaScript can be used in browser-side scripting as well as server-side scripting, and it is supported by most browsers and server platforms. It's easy to learn, and with some practice, and with a few other codes under your belt, it can be a powerful tool.
While JavaScript is usually used for browser-side scripting, try to make most of your scripting server-side.
Server-Side Scripting: The optimal method of scripting
Server-side scripts are small programs that run on the server (instead of on your visitor's browser) and send the results to the website visitor. Server-side scripting is faster than browser-scripting, and you won't have to worry about what browsers your visitors are using or how fast their computer or Internet connections are.
There are a variety of server-side scripting technologies, and new ones appear frequently. The type of server-side scripting you choose depends on what your server can handle (either by default or by installing an appropriate script engine). ASP and ASP.net are usually used on Microsoft servers. PHP is usually used on Linux servers, but can often be found on other platforms as well. JSP is usually used on Sun servers. ColdFusion is a cross-platform technology.
Ultimately, you need to find out what server-side scripting your server supports.
XML: Working with data
XML is simply a code designed to store data. (It can almost be compared to a database.) It can be used in server-side or browser-side scripting, integrated with XHTML, and displayed with XSL documents.
Even if you don't plan on making any fancy applications and don't want to learn any scripting languages, learning XML is important for dealing with RSS, so at least try to learn the basics about XML.
RSS
Let's pretend you're a rock star. Your website is like your album. People need to go to the store to buy your album to listen to your music. If you play your music on the radio, though, you bring the music to them, and you hope they like it enough to go out and buy your album. Your fans don't need to keep going back to the music store to find out if you have something new out. They just listen to the radio and take notice when they hear a new song by you. RSS is like the radio. Visitors don't have to keep going back to your website to find out what's new. The content of your website (or at least the content you choose) gets sent to them.
It's syndication of your product (RSS = really simple syndication). Syndication is how you get more viewers / listeners / readers and ultimately more traffic to your website. It can be a great way to compliment or substitute your newsletter to remind people to come visit your site because there's new stuff to look at
RSS is written in XML, which is why it is wise to learn XML first.

