All of the list constructs can nest, with each successive nesting level indented relative to the previous one. The HTML blockquote element, although not technically a list construct, nests with the other lists.
Lists have two rendering styles, regular
Which leaves a little space between the elements, and compact
Compact lists are normally a bit more scrunched together, but when converting to ASCII text there is no difference.
This is a summary of the list types:
Here is an example of an ordered list
The other two list styles are directory lists and menu lists. For now, directory lists are rendered excactly like unordered lists, because no-one uses them. Menu lists are also like un-ordered lists, but they're not supposed to nest, and they get a different list marker, like this:
Definition lists, ordered lists, and un-ordered lists can be freely intermingled (block quotes too). Menu lists and directory lists can be combined with the others, but officially only at the highest nesting level.
Call me Ishmael. Some years ago--never mind how long precisely --having little or no money in my purse, and nothing particular to interest me on shore, I thought I would sail about a little and see the watery part of the world. It is a way I have of driving off the spleen, and regulating the circulation.
item quantity price ---- -------- ----- A 27 $4.36 B 19 $2.84 C 11 $22.34Tabs within preformatted objects each take up half of an indent level. You can also use line breaks inside lists.
This is a new paragraph started inside a list element. In general, except where explicitly prohibited (or indicated otherwise), you may nest any tag within any other tag.
HTML has many tags that affect the font style, one can use either functional tags such as strong or cite, which is the prefered method, or markup tags, such as bold or italic.
The basic font style is a plain medium-roman font.
HTML defines many tags that alter the font style. The three primary style alterations are:
There are two additional styles that are deprecated, but still used in some contexts. They are
Font styles may be arbitrarily nested, to obtain combinations like bold italic or Underlined bold mono-spaced. all of the combinations are enumerated somewhere else.
The functional tags, which map to one of more of the combinations above are:
And here is a simple address (using the address
tag)
In HTML, the characters &, <, >, and " are special, and need to be represented as: &, <, >, and ".
In addition, the entire latin-1 character set can be represented similarly, such as ® (®) or ö (ö).
Inline images are ignored when converting to text unless the
alt
attribute is used, in which case the alternate text
given is output.
This file is distributed as part of HTML2text by Joe Moss (joe@morton.rain.com).