home *** CD-ROM | disk | FTP | other *** search
/ RISC DISC 2 / RISC_DISC_2.iso / the_web / documents / spec / html_spec / blocks_sgm < prev    next >
Encoding:
Text File  |  1995-06-15  |  5.2 KB  |  154 lines

  1. <!-- $Id: blocks.sgm,v 1.9 1995/06/15 20:16:38 connolly Exp $ -->
  2. <h2>Block Structuring Elements
  3.  
  4. <p>Block structuring elements include paragraphs, lists, and block
  5. quotes. They must not contain heading elements, but they may contain
  6. phrase markup, and in some cases, they may be nested.
  7.  
  8. <h3>Paragraph: P
  9.  
  10. <p>The <tag/P/ element indicates a paragraph. The exact indentation,
  11. leading space, etc. of a paragraph is not specified and may be a
  12. function of other tags, style sheets, etc.
  13.  
  14. <p>Typically, paragraphs are surrounded by a vertical space of one
  15. line or half a line. The first line in a paragraph is indented in some
  16. cases.
  17.  
  18. <p>Example of use:
  19.  
  20. <listing><![CDATA[
  21. <H1>This Heading Precedes the Paragraph</H1>
  22. <P>This is the text of the first paragraph.
  23. <P>This is the text of the second paragraph. Although you do not 
  24. need to start paragraphs on new lines, maintaining this 
  25. convention facilitates document maintenance.</P>
  26. <P>This is the text of a third paragraph.</P>
  27. ]]></listing>
  28.  
  29. <h3 id=pre>Preformatted Text: PRE
  30.  
  31. <p>The <tag/PRE/ element represents a character cell block of text and
  32. is suitable for text that has been formatted for a monospaced font.
  33.  
  34. <p>The <tag/PRE/ tag may be used with the optional <attr/WIDTH/
  35. attribute. The WIDTH attribute specifies the maximum number of
  36. characters for a line and allows the HTML user agent to select a
  37. suitable font and indentation.
  38.  
  39. <p>Within preformatted text:
  40.  
  41. <ul>
  42. <li>Line breaks within the text are rendered as a move to the
  43. beginning of the next line.
  44. <NOTE>References to the "beginning of a new line" do not imply that
  45. the renderer is forbidden from using a constant left indent for
  46. rendering preformatted text. The left indent may be constrained by the
  47. width required.
  48. </note>
  49.  
  50. <li>Anchor elements and phrase markup may be used.
  51. <NOTE>Constraints on the processing of <tag/PRE/ content may may limit or
  52. prevent the ability of the HTML user agent to faithfully render
  53. phrase markup.
  54. </note>
  55.  
  56. <li>Elements that define paragraph formatting (headings, address,
  57. etc.) must not be used.
  58. <NOTE>Some historical documents contain <tag/P/ tags in <tag/PRE/
  59. elements.  User agents are encouraged to treat this as a line break. A
  60. <tag/P/ tag followed by a newline character should produce only one
  61. line break, not a line break plus a blank line.
  62. </note>
  63.  
  64. <li>The horizontal tab character (code position 9 in the HTML document
  65. character set) must be interpreted as the smallest positive nonzero
  66. number of spaces which will leave the number of characters so far on
  67. the line as a multiple of 8. Documents should not contain tab
  68. characters, as they are not supported consistently.
  69. </ul>
  70.  
  71. <p>Example of use:
  72.  
  73. <listing><![CDATA[
  74. <PRE>
  75. Line 1.
  76.        Line 2 is to the right of line 1.     <a href="abc">abc</a>
  77.        Line 3 aligns with line 2.            <a href="def">def</a>
  78. </PRE>
  79. ]]></listing>
  80.  
  81. <h4 id=xmp>Example and Listing: XMP, LISTING
  82.  
  83. <p>The <tag/XMP/ and <tag/LISTING/ elements are similar to the
  84. <tag/PRE/ element, but they have a different syntax. Their content is
  85. declared as CDATA, which means that no markup except the end-tag open
  86. delimiter-in-context is recognized (see 9.6 "Delimiter Recognition" of
  87. [SGML]).
  88. <note>In a previous draft of the HTML specification, the syntax
  89. of <tag/XMP/ and <tag/LISTING/ elements allowed closing tags to
  90. be treated as data characters, as long as the tag name was not
  91. <tag/XMP/ or <tag/LISTING/, respectively.
  92. </note>
  93.  
  94. <p>Since CDATA declared content has a number of unfortunate
  95. interactions with processing techniques and tends to be used and
  96. implemented inconsistently, HTML documents should not contain
  97. <tag/XMP/ nor <tag/LISTING/ elements — the <tag/PRE/ tag is more
  98. expressive and more consistently supported.
  99.  
  100. <p>The <tag/LISTING/ element should be rendered so that at least 132
  101. characters fit on a line. The <tag/XMP/ element should be rendered so
  102. that at least 80 characters fit on a line but is otherwise identical
  103. to the <tag/LISTING/ element.
  104. <note>
  105. In a previous draft, HTML included a <tag/PLAINTEXT/ element that
  106. is similar to the <tag/LISTING/ element, except that there is
  107. no closing tag: all characters after the <tag/PLAINTEXT/ start-tag
  108. are data.
  109. </note>
  110.  
  111. <h3>Address: ADDRESS
  112.  
  113. <p>The <tag/ADDRESS/ element contains such information as address,
  114. signature and authorship, often at the beginning or end of the body of
  115. a document.
  116.  
  117. <p>Typically, the <tag/ADDRESS/ element is rendered in an italic
  118. typeface and may be indented.
  119.  
  120. <p>Example of use:
  121.  
  122. <listing><![CDATA[
  123. <ADDRESS>
  124. Newsletter editor<BR>
  125. J.R. Brown<BR>
  126. JimquickPost News, Jimquick, CT 01234<BR>
  127. Tel (123) 456 7890
  128. </ADDRESS>
  129. ]]></listing>
  130.  
  131. <h3>Block Quote: BLOCKQUOTE
  132.  
  133. <p>The <tag/BLOCKQUOTE/ element contains text quoted from another
  134. source.
  135.  
  136. <p>A typical rendering might be a slight extra left and right indent,
  137. and/or italic font. The <tag/BLOCKQUOTE/ typically provides space
  138. above and below the quote.
  139.  
  140. <p>Single-font rendition may reflect the quotation style of Internet
  141. mail by putting a vertical line of graphic characters, such as the
  142. greater than symbol (>), in the left margin.
  143.  
  144. <p>Example of use:
  145.  
  146. <listing><![CDATA[
  147. I think the poem ends
  148. <BLOCKQUOTE>
  149. <P>Soft you now, the fair Ophelia. Nymph, in thy orisons, be all 
  150. my sins remembered.
  151. </BLOCKQUOTE>
  152. but I am not sure.
  153. ]]></listing>
  154.