Creating Web Pages with OpenOffice.org
OpenOffice.org is an office suite based on Star Office and released as open source. The suite contains standard office applications, such as a word processor and programs for spreadsheets, drawings and presentations. All of these applications can be used to create web pages, and this article will introduce their HTML capabilities.
Perhaps the most common application used to create web pages is OpenOffice.org's word processor, Writer. Writer's HTML capabilities include saving existing documents as HTML, creating new documents as HTML and creating several different types of web pages using a wizard.
The easiest way to create HTML documents is to start with an existing Writer document. You can view it as it will appear on a web page by selecting Online Layout from the View menu or by clicking on its toolbar button.
Links can be inserted and modified using the hyperlink editor. Display the editor by clicking on its toolbar button or clicking Hyperlink on the Insert menu. From the Hyperlink window (see Figure 1), you can choose the type of link, as well as specify the link's address, text and how it should be displayed (e.g., in a new window). To edit an existing link or turn existing text into a link, simply highlight it before opening the Hyperlink window. You have to click Apply to insert the link into your document before closing the window.
If you are satisfied with how your document looks in the Online Layout, select Save As from the File menu and specify Web Page as the file type. I saved several files as HTML, including ones with tables, and Writer did a pretty good job with them. One thing that Writer didn't do properly was replace multiple spaces in the original document with the HTML code for non-breaking spaces.
If you have a large document, Writer can save it as a series of HTML files with a table of contents page. To do this, decide which headings in the document should be on separate pages and make sure that they have the same formatting style (e.g., Heading 2). Then select Send on the File menu and click on Create HTML Document. A dialog box will appear allowing you to specify the file name to save the pages under and which style indicates a new page. Click Save to create your multipage HTML document. According to the DOCTYPE tag inserted by OpenOffice.org, the resulting HTML files conform to the HTML 3.2 standard.
In addition, you are not limited to dealing with files that reside on your computer. According to OpenOffice.org's help file, it is possible to specify a fully qualified URL or FTP address in the Open dialog and retrieve a document over a network. I have successfully opened a document using a URL, such as http://www.netperson.net/~rkrause/index.html, but I haven't been able to get the process to work with an FTP address.
When I tried suppling an FTP address a window appeared asking me for my user name followed by an error window. The OpenOffice.org Bugzilla database lists problems with transferring documents using FTP (IDs 3726, 3728), but there is no clear indication it has been fixed. There is also an unanswered letter in the User's forum addressing a problem transferring files with FTP.
OpenOffice.org's wizard, called AutoPilot, allows you to create several types of standard web pages. To use the AutoPilot, click AutoPilot and then Web Page... in the File menu.
A window will open (Figure 2) allowing you to select a template and layout to use. Templates define the structure of the web page, while layouts determine font styles, colors and page background. Some templates included with OpenOffice.org are A list with table of contents, Contact Form, Photo Album and Single column with subheading. The standard template provides a document with a page heading in large text, example links, space for body text and a line indicating when the document was last changed.
Changes in the template and layout selections are reflected in the document immediately so you can preview them. Occasionally the document doesn't update properly when a new layout is chosen, but choosing the Empty template and then selecting your original template takes care of this.
You can create a template based on your selections by placing a check in the Create template box. You then can use this template in the future by selecting Templates and Documents under New from the File menu.
Clicking the Create button closes the window and allows you to edit the document. If you elected to create a template, the Templates window will appear where you name your template.
Although Writer does a decent job of converting documents into HTML, there are times when you might have to tweak the code by hand. You edit the document's underlying HTML code by clicking on HTML Source on the toolbar or the View menu.
- Why choose a Flash based product?
32 min ago
12 hours 53 min ago
1 day 4 hours ago
- Thanks for clearing that up.
1 day 10 hours ago
- Nice coding on the cake. I
1 day 21 hours ago
- Baker's identity
2 days 2 hours ago
- Uber jealous
2 days 7 hours ago
- Reality is disapointing
2 days 18 hours ago
- Máy sấy quần áo
2 days 21 hours ago
- Services on GlusterFS
2 days 21 hours ago