Code Assist

There are a couple of functions that are intended to save you some time when coding HTML in the source editors:

Automatic End Tags

Whenever you enter an XML tag, the editor will immediately place a closing tag. For example, typing "<p>" will result in:

<p></p>

The cursor will be positioned between the two tags, ready for you to enter text.

Sometimes you will find that you wish to add such tags after the text already exists. For example, suppose you decide to italicize the phrase "add the updated information" in the following sentence:

I decided to add the updated information to the report.

When you create the italics tag, you will see this:

I decided to <i></i>add the updated information to the report.

In this case, the editor is being just a little too helpful. To handle this situation, immediately hold the shortcut key (CTRL for Windows), press the k key, and the closing tag will be extracted and copied to your clipboard. This same function is invoked from the right-click menu, if no text is selected. You can then position the cursor in the correct position, right-click and select PASTE to insert the closing tag.

There is no need to highlight the tag to use this function; the only requirement is that the cursor be positioned immediately in front of the closing tag, which it would be in this case. You can use this key combination any time the cursor is positioned in front of a valid closing tag.

Note: The preferred method for enclosing a section of text between HTML tags is to highlight the text, right-click the document and select Format. You can then enter the tag (and any attributes) that will automatically surround the selection.

Automatic Quotes for Attributes

Since attributes must be quoted in html 5, whenever you type the equals sign inside an opening tag, quotes are added automatically. Thus, when you type:

<p style=
the editor enters:

<p style=""

with the cursor positioned between the quotes, ready for you to enter the attribute.

SiteLinker Basics Editors Creating Web Pages Site Map
HTML Source Editors