# Alpha's HTML mode 2.1.3

### CSS mode 1.1 and JavaScript mode 1.1.1

C opyright 1996-1998 by J ohan L inde
<jlinde@telia.com>
<jl@theophys.kth.se>

November 1998

## Introduction

HTML mode is for editing HyperText Markup Language documents (suffix .html, .htm or .shtml). Whenever you open or save a file with a name with any of these suffixes, Alpha switches to HTML mode and inserts the HTML mode menus in the menu bar. You can also manually switch to HTML mode with the popup mode menu in the status bar, see the picture to the right. Alpha has many different modes giving you different features depending on which type of document you are editing. When you edit HTML documents, make sure you are using HTML mode.

The basic idea with this HTML environment is to save you time while typing, by providing powerful tools for editing HTML code. HTML mode does not teach you HTML. Therefore you have to know at least some HTML to use it. You don't have to be an expert and know every single element and every single attribute, but a knowledge of the basics is required to be able to use HTML mode.

If you do not know about HTML, I recommend that you read A Beginner's Guide to HTML. It is a good first text to read. I have collected some other links to HTML guides. See the section on HTML Tutorials and references.

This manual is only a manual for Alpha's HTML, JavaScript, and CSS modes. It does not descibe any of the many other modes Alpha has, and not any of Alpha's many other features. They are documented elsewhere. You can open many different help files under the system help menu. If you haven't used Alpha at all before I recommend that you at least read the Quick Start before reading this manual.

### JavaScript and Cascading Style Sheets

In HTML mode there are support for editing of both JavaScript and Cascading Style Sheets (CSS) within HTML documents. There are also a separate JavaScript mode for editing JavaScript documents (suffix .js) and a CSS mode for editing CSS documents (suffix .css).

Note that within HTML mode the coloring of JavaScript and CSS keywords is not enabled by default. This is because it's more convenient to have it disabled if you are not using JavaScript or CSS. Read the corresponding sections of this manual to see what to do to enable coloring of JavaScript and CSS keywords.

### HTML mode features

- HTML mode knows HTML 4.0 and both Netscape's and Microsoft's extensions to HTML.
- Tools to easily and quickly insert HTML elements and give them attributes.
- Tools to easily change or remove HTML elements.
- A clever word completion feature to save you time while typing.
- Customizable indentation of the code and a feature to reformat messy code to make it more readable.
- You can open windows with lists of files from where you can easily copy and paste to make links.
- Tools for building lists and tables.
- You can define colors with a color picker to use on your web pages.
- You can check that all links between your files are OK.
- You can move files between folders and automatically update all links between and in them.
- Support for dynamically included files.
- Conversion of NCSA and CERN image map files to client side image maps.
- Support for editing of JavaScript.
- Support for editing of Cascading Style Sheets.
- Translation of special characters, å, ó, ü etc. to and from their HTML entities.
- Files are sent to your browser with one key stroke.
- Any menu item can be bound to any single key stroke.
- You can define new HTML elements. Therefore you don't have to wait for Alpha to be updated to use it for new HTML.
- etc. etc.

### Acknowledgments

First of all, I would like to thank Pete Keleher for writing Alpha, the best editor in the world, without which my TCL code would be pretty useless. I am also indebted to Scott Brim who wrote an earlier version of Alpha's HTML mode. Some original ideas and tcl code were taken from html.el for GNU Emacs and latex.tcl for Alpha. François Pottier gave me lots of help with the code which makes Alpha talk to Big Brother. The algorithm for extracting the width and height of JPEG images were written by Alex Knowles and Andrew Tong. Many thanks to Michael O'Henly for making the wonderful Alpha HTML mode intro site. He has also sent me a list with corrections of the language in an earlier version of this manual. (Don't blame him for the new errors in this version!) And thanks to everybody who has sent me suggestions and bug reports. You know who you are.

### Feedback

All comments on HTML mode are welcome. Many features in HTML mode were suggested by HTML mode users. Don't hesitate to send me your ideas. Please tell me if you find a bug which annoys you. If you tell me about it I'll do my best to fix it. If you don't tell me about it I may not discover it myself.

### New releases

I have a page with information about HTML mode where you can download new versions before they are included in the general Alpha distribution.

I have two mailing list for information about updates, one for HTML mode and one for Frontier menu. If you want me to put you on my lists, send me a mail and tell me which lists you want to be on.

Johan Linde jlinde@telia.com jl@theophys.kth.se

### Legal stuff

All Tcl code I've written for Alpha is free. This means that it may be used freely, and distributed freely, as long as the receiver is not obligated in any way by receiving it. Don't do silly things like charging for it! The files I've written are html40.tcl, htmlCustom.tcl, htmlElems.tcl, htmlEngine.tcl, htmlEntities.tcl, htmlHomePageUtils.tcl, htmlMenu.tcl, htmlMode.tcl, htmlStatusBar.tcl, htmlUtils.tcl, cssMode.tcl, hctsmsl.tcl, hctsmslMenu.tcl, hctsmslShared.tcl, javaScriptMode.tcl, frontierMenu.tcl and the corresponding documentation.

However, Alpha itself is not free. It's shareware.

### A postcard, please...

Writing HTML mode has taken a considerable amount of time. Therefore, if you like HTML mode and use it a lot, I would very much appreciate it if you send me a colorful postcard and tell me that. It would give me new energy to add new features to HTML mode. Note that emails don't count as postcards. Emails are not pretty enough to put on the wall. My address is

Johan Linde
Näckrosvägen 27
SE-169 37 SOLNA
SWEDEN

## Language

My mother tongue is Swedish. Therefore you will, no doubt, find grammatical and other errors in this manual and in HTML mode.

But before you complain, I must tell you that I know that "color" is spelt "colour". :-)

### Link color

To give you a true feeling of reading an Alpha document, the color of the links in this manual is the same as the color of Alpha's hypertext links. If you don't like the link color, you can modify it by editing the style sheet file manual.css.