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

  1. <h2>Phrase Markup
  2.  
  3. <p>Phrases may be marked up according to idiomatic usage,
  4. typographic appearance, or for use as hyperlink anchors.
  5.  
  6. <p>User agents must render highlighted phrases distinctly from plain
  7. text. Additionally, <tag/EM/ content must be rendered as distinct from
  8. <tag/STRONG/ content, and <tag/B/ content must rendered as distinct
  9. from <tag/I/ content.
  10.  
  11. <p>Phrase elements may be nested within the content of other phrase
  12. elements; however, HTML user agents may render nested phrase
  13. elements indistinctly from non-nested elements:
  14.  
  15. <listing><![CDATA[
  16. plain <B>bold <I>italic</I></B> may be rendered 
  17. the same as plain <B>bold </B><I>italic</I>
  18. ]]></listing>
  19.  
  20. <h3>Idiomatic Elements
  21.  
  22. Phrases may be marked up to indicate certain idioms.
  23. <note>
  24. User agents may support the <tag/DFN/ element, not
  25. included in this specification, as it has been deployed to some extent.
  26. It is used to indicate the defining instance of a term, and it is
  27. typically rendered in italic or bold italic.
  28. </note>
  29.  
  30. <h4>Citation: CITE
  31.  
  32. <p>The <tag/CITE/ element is used to indicate the title of a book or
  33. other citation. It is typically rendered as italics.  For example:
  34.  
  35. <listing><![CDATA[
  36. He just couldn't get enough of <cite>The Grapes of Wrath</cite>.
  37. ]]></listing>
  38.  
  39. <h4>Code: CODE
  40.  
  41. <p>The <tag/CODE/ element indicates an example of code, typically
  42. rendered in a mono-spaced font. The <tag/CODE/ element is intended
  43. for short words or phrases of code; the <tag/PRE/ block
  44. structuring element (<hdref refid=pre>) is more apropriate for
  45. multiple-line listings. For example:
  46.  
  47. <listing><![CDATA[
  48. The expression <code>x += 1</code>
  49. is short for <code>x = x + 1</code>.
  50. ]]></listing>
  51.  
  52. <h4>Emphasis: EM
  53.  
  54. <p>The <tag/EM/ element indicates an emphasized phrase, typically
  55. rendered as italics. For example:
  56.  
  57. <listing><![CDATA[
  58. A singular subject <em>always</em> takes a singular verb.
  59. ]]></listing>
  60.  
  61. <h4>Keyboard: KBD
  62.  
  63. <p>The <tag/KBD/ element indicates text typed by a user, typically
  64. rendered in a mono-spaced font. This is commonly used in instruction
  65. manuals. For example:
  66.  
  67. <listing><![CDATA[
  68. Enter <kbd>FIND IT</kbd> to search the database.
  69. ]]></listing>
  70.  
  71. <h4>Sample: SAMP
  72.  
  73. <p>The <tag/SAMP/ element indicates a sequence of literal characters,
  74. typically rendered in a mono-spaced font. For example:
  75.  
  76. <listing><![CDATA[
  77. The only word containing the letters <samp>mt</samp> is dreamt.
  78. ]]></listing>
  79.  
  80. <h4>Strong Emphasis: STRONG
  81.  
  82. <p>The <tag/STRONG/ element indicates strong emphasis,
  83. typically rendered in bold. For example:
  84.  
  85. <listing><![CDATA[
  86. <strong>STOP</strong>, or I'll say "<strong>STOP</strong>" again!.
  87. ]]></listing>
  88.  
  89. <h4>Variable: VAR
  90.  
  91. <p>The <tag/VAR/ element indicates a placeholder variable, typically rendered
  92. as italic. For example:
  93.  
  94. <listing><![CDATA[
  95. Type <SAMP>html-check <VAR>file</VAR> | more</SAMP>
  96. to check <VAR>file</VAR> for markup errors.
  97. ]]></listing>
  98.  
  99. <h3>Typographic Elements
  100.  
  101. <p>Typographic elements are used to specify the format of marked text.
  102.  
  103. <p>Typical renderings for idiomatic elements may vary between user
  104. agents. If a specific rendering is necessary — for example, when
  105. referring to a specific text attribute as in "The italic parts are
  106. mandatory" — a typographic element can be used to ensure that the
  107. intended typography is used where possible.
  108.  
  109. <note>
  110. User agents may support some typographic elements not included in
  111. this specification, as they have been deployed to some extent. The
  112. <tag/STRIKE/ element indicates horizontal line through the characters,
  113. and the <tag/U/ element indicates an underline.
  114. </note>
  115.  
  116. <h4>Bold: B
  117.  
  118. <p>The <tag/B/ element indicates bold text. Where bold typography is
  119. unavailable, an alternative representation may be used.
  120.  
  121. <h4>Italic: I
  122.  
  123. <p>The <tag/I/ element indicates italic text. Where italic typography
  124. is unavailable, an alternative representation may be used.
  125.  
  126. <h4>Teletype: TT
  127.  
  128. <p>The <tag/TT/ element indicates teletype (monospaced )text. Where a
  129. teletype font is unavailable, an alternative representation may be
  130. used.
  131.  
  132. <h3 id=a>Anchor: A
  133.  
  134. <p>The <tag/A/ element indicates a hyperlink anchor (see <hdref
  135. refid=hyperlink>). At least one of the <attr/NAME/ and <attr/HREF/
  136. attributes should be present. Attributes of the <tag/A/ element:
  137.  
  138. <tl>
  139. <tli>HREF: gives the URI of the head anchor of a hyperlink.
  140.  
  141. <tli>NAME: gives the name of the anchor, and makes it available as
  142. a head of a hyperlink.
  143.  
  144. <tli>TITLE: suggests a title for the destination resource —
  145. advisory only.  The <attr/TITLE/ attribute may be used:
  146.  
  147. <ul>
  148. <li> for display prior to accessing the destination resource, for
  149. example, as a margin note or on a small box while the mouse is over
  150. the anchor, or while the document is being loaded;
  151.  
  152. <li> for resources that do not include a title, such as graphics, plain
  153. text and Gopher menus, for use as a window title.
  154. </ul>
  155.  
  156. <tli>REL: The <attr/REL/ attribute gives the relationship(s) described
  157. by the hyperlink. The value is a whitespace separated list of
  158. relationship names.
  159.  
  160. <tli>REV: same as the REL attribute, but the semantics of the
  161. relationship are in the reverse direction. A link from A to B with
  162. REL="X" expresses the same relationship as a link from B to A with
  163. REV="X". An anchor may have both REL and REV attributes.
  164.  
  165. <tli>URN: specifies a preferred, more persistent identifier for the
  166. head anchor of the hyperlink. The syntax and semantics of the
  167. <attr/URN/ attribute are not yet specified.
  168.  
  169. <tli>METHODS: specifies methods to be used in accessing the
  170. destination, as a whitespace-separated list of names. The set of
  171. applicable names is a function of the scheme of the URI in the
  172. <attr/HREF/ attribute. For similar reasons as for the TITLE attribute,
  173. it may be useful to include the information in advance in the
  174. link. For example, the HTML user agent may chose a different rendering
  175. as a function of the methods allowed; for example, something that is
  176. searchable may get a different icon.
  177. </tl>
  178.  
  179. <h2>Line Break: BR
  180.  
  181. <p>The <tag/BR/ element specifies a line break between words (see
  182. <hdref refid=datachrs>). For example:
  183.  
  184. <listing><![CDATA[
  185. <P> Pease porridge hot<BR>
  186. Pease porridge cold<BR>
  187. Pease porridge in the pot<BR>
  188. Nine days old.
  189. ]]></listing>
  190.  
  191. <h2>Horizontal Rule: HR
  192.  
  193. <p>The <tag/HR/ element is a divider between sections of text;
  194. typically a full width horizontal rule or equivalent graphic. For
  195. example:
  196.  
  197. <listing><![CDATA[
  198. <HR>
  199. <ADDRESS>February 8, 1995, CERN</ADDRESS>
  200. </BODY>
  201. ]]></listing>
  202.  
  203. <h2 id=img>Image: IMG
  204.  
  205. <p>The <tag/IMG/ element refers to an image or icon via a hyperlink
  206. (see <hdref refid=image-present>).
  207.  
  208. <p>HTML user agents may process the value of the <attr/ALT/ attribute
  209. as an alternative to processing the image resource indicated by the
  210. <attr/SRC/ attribute.
  211. <note>Some HTML user agents can process graphics linked via anchors,
  212. but not <tag/IMG/ graphics. If a graphic is essential, it should be
  213. referenced from an <tag/A/ element rather than an <tag/IMG/ element. If
  214. the graphic is not essential, then the <tag/IMG/ element is
  215. appropriate.
  216. </note>
  217.  
  218. <p>Attributes of the <tag/IMG/ element:
  219.  
  220. <tl>
  221. <tli>ALIGN: alignment of the image with respect to the text
  222. baseline.
  223. <ul>
  224. <li><code/TOP/ specifies that the top of the image aligns with the
  225. tallest item on the line containing the image.
  226.  
  227. <li><code/MIDDLE/ specifies that the center of the image aligns with
  228. the baseline of the line containing the image.
  229.  
  230. <li><code/BOTTOM/ specifies that the bottom of the image aligns with
  231. the baseline of the line containing the image.
  232. </ul>
  233.  
  234. <tli>ALT: text to use in place of the referenced image resource, for
  235. example due to processing constraints or user preference.
  236.  
  237. <tli>ISMAP: indicates an image map (see <hdref refid=imagemap>).
  238.  
  239. <tli>SRC: specifies the URI of the image resource.
  240. <note>In practice, the media types of image resources are limited to a
  241. few raster graphic formats: typically <code>image/gif</code>,
  242. <code>image/jpeg</code>. In particular, <code>text/html</code>
  243. resources are not intended to be used as image resources.
  244. </note>
  245. </tl>
  246.  
  247. <p>Examples of use:
  248.  
  249. <listing><![CDATA[
  250. <IMG SRC="triangle.xbm" ALT="Warning:"> Be sure 
  251. to read these instructions.
  252. ]]></listing>
  253.  
  254. <listing><![CDATA[
  255. <a href="http://machine/htbin/imagemap/sample">
  256. <IMG SRC="sample.xbm" ISMAP>
  257. </a>
  258. ]]></listing>
  259.