HTML Scripts
When you hear people talking about scripts, the first thing you should understand is that scripts are executable code - like little programs. Unlike most other programs, however, the role of scripts is to create web-page content. Sometimes entire web pages are generated by scripts, sometimes interactive elements are controlled by scripts. In short, scripts are executable code that usually generate web pages.
The second thing you will need to understand is that there are two basic types of scripts: Server-side and client-side. This refers to where the script actually runs. Server-side scripts run entirely on the web server and they usually generate a web page which your browser downloads. Client-side scripts are downloaded and then run inside your browser (the client).
Server-Side vs. Client-Side HTML Scripts
For example, a PHP or ASP web page is actually a web page that contains server-side script. The scripting is run on the server and results in a web page which your browser downloads. An example of client-side scripting are the common JavaScript drop-down menus you see so often nowadays. The menu code is written in JavaScript and run inside your browser - providing an interactive menu.
Although this tutorial will not cover teach you how to write your own scripts, it is important that you understand these basic concepts which you will run into quite a lot. For example, in the previous section you learned a bit about HTML Forms -- which would normally be used with a server-side script which would process the information inputed in the form. The server-side script would take the incoming form data and do things like process a sale, initiate a search or send an email.
Free HTML Scripts
Thankfully, you don't have to learn JavaScript completely before integrating your own client-side scrips. The web has tons of free script collections which you can simply copy and paste into your own web pages! Here are a few good sources:
- The JavaScript Source - free javascripts and javascript tutorials
- Free-Javascripts.com - 100s of free scripts
- JavaScript Kit - Comprehensive JavaScript tutorials
For those interested in writing server-side scripts, fortunately, this is not difficult to learn and you can learn more about the basics and where to find websites for PHP Web Hosting and ASP Web Hosting.
Let's Wrap it up!
As you've seen in this brief tutorial, HTML is not very hard at all and can be written effectively with a simple text editor like Notepad (this entire website is written in notepad). It can be very handy in the beginning to have a good HTML Reference Guide on hand. One of the problem with reference guides is that they try to be complete -- which is usually a good thing but not with HTML. HTML has all kinds of old, outdated and simply useless tags which are kept for compatibility with old old websites. The last thing you need when learning HTML is to wade through useless outdated tags.
I've tried to cut the list down to the bare essentials and fit it all into a one-page cheat-sheet which you should print out and keep nearby while learning. Go ahead to the next page to print or download the guide. I hope you find it useful!
