Using Macros for Coding

Since I started developing Web sites six years ago, I have frequented many online forums. I started right here at the HTMLHelp Forums, and I eventually founded the International Web Developers Network with my two business partners.

During those six years, my Web development skills have progressed, and with that progression I have moved from asking the questions to answering the questions on any number of forums.

Often, the best way to answer a question is to give a practical example, so I’ll often find myself opening up Textpad and coding a quick example.

These examples always require the basic structure of a HTML Web page, starting with a document type, a title, a style sheet, and a body. So, wouldn’t it make sense to be able to quickly bring up that basic structure each time, rather than typing it? Of course it would! That’s where macros come in handy.

Textpad is a very basic text editor, but it does have everything a HTML coder like myself needs. Just last week I realised it had a macro function, so I quickly recorded a macro for the basic structure of a HTML Web page. Now, when I open Textpad to code a quick example (or start some coding for a customer), I can run that macro and have the structure in place within a couple of seconds.

But why stop there? A friend of mine, Martin Ridgway from Ardent House, has one structure which he uses for all his Web sites. His HTML never changes. He just uses a different style sheet which controls how that HTML structure is presented.

Does your coding program of choice offer a macro function? If so, maybe it’s time you started using it. Time is money. Tedious tasks should be kept to a minimum!