The following table lists commonly used HTML tags and character codes within ASDoc comments:
Modified 3/20/08: add missing carriage returns to Description column.
|
Tag or Code |
Description |
|---|---|
| <p> |
Starts a new paragraph. You must close <p> tags. Do not use <p> for the first paragraph of a doc comment (the paragraph after the opening /**) or the first paragraph associated with a tag. Use the <p> tag for subsequent; for example: /** * The first sentence of a main description. * * <p>This line starts a new paragraph.</p> * * <p>This line starts a third paragraph.</p> */ ASDoc ignores white space in comments; to add white space for readability in the AS file, do not use the <p> tag but just add blank lines. |
| class="hide" |
Hides text. Use this tag if you want to add documentation to the source file but do not want it to appear in the output. |
| <listing> |
Indicates a program listing (sample code). Use this tag to enclose code snippets that you format as separate paragraphs, in monospace font, and in a gray background to distinguish the code from surrounding text. You must close <listing> tags. |
| <pre> |
Formats text in monospace font, such as a description of an algorithm or a formula. Do not use <br/> tags at end of line. Use <listing> tag for code snippets. |
| <br> |
Adds a line break. You must close this tag. Comments for most tags are automatically formatted; you do not generally have to add line breaks. To create additional white space, add a new paragraph instead. This tag may not be supported in the future, so use it only if necessary. |
| <ul>, <li> |
Creates a list. You must close these tags. |
| <table> <th> <tr> <td> |
Creates a table. For basic tables that conform to ASDoc style, set the class attribute to innertable. Avoid setting any special attributes. Avoid nesting structural items, such as lists, within tables. ASDoc uses a standard CSS stylesheet that has definitions for the <table>, <th>, <tr> and <td> tags. You must close these tags. Use <th> for header cells instead of <td>, so the headers get formatted correctly. |
| <img> |
Inserts an image. To create the correct amount of space around an image, enclose the image reference in <p></p> tags. Captions are optional; if you use a caption, make it boldface. You must close the <img> tag by ending it with />, as the following example shows: <img src = "../../images/matrix.jpg" /> |
| <code> |
Applies monospace formatting. You must close this tag. |
| <strong> |
Applies bold text formatting. You must close this tag. |
| <em> |
Applies italic formatting. You must close this tag. |
| < |
Less-than operator (<) . Ensure that you include the final semicolon (;). |
| > |
Greater-than operator (>). Ensure that you include the final semicolon (;). |
| & |
Ampersand (&). Ensure that you include the final semicolon (;). |
| — |
Em dash. |
| ™ |
Trademark symbol (™) that is not registered. This character is superscript by default, so do not enclose it in <sup> tags. |
|   |
Nonbreaking space. |
| ® |
Registered trademark symbol (®). Enclose this character in <sup> tags to make it superscript. |
| ° |
Degree symbol. |
| @ |
Do not use an @ sign in an ASDoc comment; instead, insert the HTML character code: @. |