Книга: Learning GNU Emacs, 3rd Edition
8.3.2.3 Inserting an HTML template
8.3.2.3 Inserting an HTML template
HTML helper mode inserts a template for you every time you create a new HTML file.
Type: C-x C-f new.html
HTML helper mode inserts a template with all the basic elements needed for a valid HTML document (Windows).
The template contains all the basic HTML elements. The entire document is surrounded by <html></html>
tags. Then the head and the body are separated. Following an <hr>
tag that tells the browser to insert a horizontal line, called a horizontal rule, the <address>
tag leaves a place for the author to put in his or her email address. In these days of spam, it's unlikely you'll want to do that. (You can leave the <address>
tag blank or delete it.)
If you do want to include an email address, enter a line like this in your .emacs file (substituting your own email address, of course):
(setq html-helper-address-string
"<a href="mailto:[email protected] ">Charles Dickens</a>")
Type: C-x C-f newfile.html
Emacs inserts the HTML template, including the address.
Normally you begin filling out the template by entering title and a level-one header (these are often the same). You can then begin writing paragraphs of text. Before you start typing, press M-Enter. Emacs inserts <p></p>
and positions the cursor between them. You can see from the ending paragraph tag that HTML helper mode is working toward XHTML compliance.
Type: M-Enter
Emacs positions the cursor between <p>
and </p>
so you can start insert text.
- 8.3.2 Using HTML Helper Mode
- Применение PHP-технологий в программе HtmlPad
- Модульный HTML
- 2.1. Информация о версии HTML
- 19.2.4. Чтение и запись значений элементов HTML-форм
- HTML5 для веб-дизайнеров
- Handling HTML Forms
- 19.2.1. Чтение и запись значений HTML-атрибутов
- 1.2. Базовые понятия HTML
- 19.6.3 Общий формат HTML-документа
- Managing disk quota templates
- Using security templates