HTML, XHTML and CSS All-In-One for Dummies - Andy Harris [33]
Changing the initial contents
When you create a new Web page in Aptana, a basic template appears. This is convenient, but it creates an HTML 4.0 doctype. Open template.html in a normal text editor, copy it, and paste it to the provided text area, and your pages will begin with the standard template.
Changing the view
Aptana allows you to split the screen with your code in one panel and a browser view in another. Every time you save your code, the browser view immediately updates. This is a really good tool, especially for a beginner, because you can get very quick feedback on how your page looks. In the HTML Editor Mode section in the Preferences dialog box (refer to Figure 3-9), you can indicate whether you want the browser preview to be in a separate tab, in a horizontal split screen, or in a vertical split screen. I use tabs because I like to see as much code as possible on-screen.
The latest version of Aptana tries to force you into a project mode, where you combine all your files into a large project. Although this is fine for large projects, it’s probably not what you want when you first get started. To build a file without a project, use the File tab (on the left) to move to the directory where you want to create the file. Right-click the directory and choose New.
Aptana issues
I use Aptana quite a bit, and it’s one of my favorite tools. However, it isn’t perfect; it’s a large program that can take some time to load. I have also run into some display bugs here and there, and the debugging model doesn’t always seem to cooperate the way it should. Aptana is quite a good tool, but if these things bother you, you might want to look at the following alternative.
Introducing Komodo Edit
Komodo Edit is another very powerful Web editor (similar to Aptana) that may suit some developers more. Komodo doesn’t try to do everything that Aptana does, but it’s faster and a bit more reliable. Mainly a text editor, Komodo does have some great features. My favorite part about Komodo is how easy it is to modify.
♦ Abbreviations: Although many editors have features like this, the abbreviations tool in Komodo is especially useful. Komodo comes with a huge number of abbreviations built in, and a very easy mechanism to use them. For example, if you type xhtml and then press Ctrl-T, Komodo will replace the text with a complete XHTML framework. Creating new abbreviations is very easy, so you can quickly customize.
♦ Macros: I think one of Aptana’s biggest weaknesses is the clumsy macro features. Aptana doesn’t have an easy way to record keystroke commands and play them back. (To be fair, Aptana has an incredibly powerful scripting system, but it isn’t super easy to use.) Komodo has a really super macro-recording feature.
♦ Snippets: Komodo has a terrific built-in library of code snippets containing the code you frequently use. Adding new snippets is easy, so soon enough you’ll have most of the code you use a lot available at your fingertips.
♦ Commands: Komodo allows you to define commands you can run from within the editor. For example, you can create a DOS command to list all the files in the current directory and run the command without leaving Komodo. This can be useful if you’re writing code that creates files (as you do in Book V, Chapter 7). It’s also used to run external programs, such as compilers (if you were writing code in a language like C or Java that requires such things).
Figure 3-10 shows Komodo Edit being used to modify a Web page.
Figure 3-10: Komodo Edit has many of the same features as Aptana, but it’s a little smaller and snappier.
Chapter 4: Managing Information with Lists and Tables
In This Chapter
Understanding basic lists
Creating unordered, ordered, and nested lists
Building definition lists
Building basic tables
Using rowspan and colspan attributes
You’ll often need to present large amounts of organized information, and XHTML has some wonderful tools to manage this task. XHTML has three kinds of lists and a powerful table