Writing HTML

Because of the growing popularity of the World Wide Web, many people are marking up documents in Web format using HTML. HTML is simple ASCII text with tags that define characteristics about the text. HTML is not hard to write, and you could use Emacs alone to write the tags and the text. An HTML tag generally looks like this:

<tagname>text being tagged</tagname>

There are several add-on modes you can use for writing HTML in Emacs, including html mode, html-helper mode, html menus, and a variety of SGML tools including SGML mode and psgml mode. (HTML is an implementation of Standard Generalized Markup Language, or SGML.) Of these tools, we’ve chosen to describe html-helper mode.

Html-helper mode allows you to enter any tag, whether it is part of HTML 2.0, HTML 3.0, or an extension created by a third party. Because of this flexibility, html-helper mode can’t validate HTML. To check HTML documents, the best policy is to view them through several popular browsers.

In the following sections, we are not going to teach you to write HTML. (For more information on writing HTML, see HTML: The Definitive Guide by Chuck Musciano and Bill Kennedy, published by O’Reilly & Associates.) Rather, we’re going to teach you the rudiments of using html-helper mode to help you create HTML documents.

Get Learning GNU Emacs, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.