Note. We recommend that style sheet implementations provide a mechanism for inserting quotation marks before and after a quotation delimited by BLOCKQUOTE in a manner appropriate to the current language context and the degree of nesting of quotations.

注释。我们建议样式表的实现可以提供一种根据当前的语言上下文以及嵌套深度向BLOCKQUOTE框定的引文的头部和尾部插入引号的机制。

However, as some authors have used BLOCKQUOTE merely as a mechanism to indent text, in order to preserve the intention of the authors, user agents should not insert quotation marks in the default style.

然而,由于一些作者已经将BLOCKQUOTE最为一种缩进文本的机制,为了不中断作者的这种用法,用户代理缺省情况下不应该插入引号。

The usage of BLOCKQUOTE to indent text is deprecated in favor of style sheets.

用BLOCKQUOTE来缩进文本的用法 是不推荐的,应采用样式表。

9.2.3 Subscripts and superscripts: the SUB and SUP elements

<!ELEMENT (SUB|SUP) - - (%inline;)*    -- subscript, superscript -->

<!ATTLIST (SUB|SUP)
  %attrs;                              -- %coreattrs, %i18n, %events --
  >

Start tag: required, End tag: required

开始标签:必须,结束标签:必须

Attributes defined elsewhere

在其他地方定义的属性

Many scripts (e.g., French) require superscripts or subscripts for proper rendering. The SUB and SUP elements should be used to markup text in these cases.

很多书写用字母(比如:法语)需要上标或下标才能正确展示。在这些情况下,SUB和SUP元素应该用来标记文本。

      H<sub>2</sub>O
      E = mc<sup>2</sup>
      <SPAN lang="fr">M<sup>lle</sup> Dupont</SPAN>

9.3 Lines and Paragraphs

Authors traditionally divide their thoughts and arguments into sequences of paragraphs. The organization of information into paragraphs is not affected by how the paragraphs are presented: paragraphs that are double-justified contain the same thoughts as those that are left-justified.

作者传统上会将他们的思想和讨论分成段落的序列。信息的段落组织形式不会受到这些段落如何展示的影响:双向对齐的段落和左对齐的多乱所包含的思想是一样的。

The HTML markup for defining a paragraph is straightforward: the P element defines a paragraph.

用于定义段落的HTML标记是很直接的:P元素定义一个段落。

The visual presentation of paragraphs is not so simple. A number of issues, both stylistic and technical, must be addressed:

但段落的可视化展现就不是这么简单了。下面所列举的有关样式及技术的问题必须处理:

  • Treatment of white space
  • Line breaking and word wrapping
  • Justification
  • Hyphenation
  • Written language conventions and text directionality
  • Formatting of paragraphs with respect to surrounding content

  • 空白的处理
  • 折行和单词折断
  • 对齐方式
  • 连词
  • 书写语言的习惯以及文本方向
  • 环绕内容的段落格式化

We address these questions below. Paragraph alignment and floating objects are discussed later in this document.

下面我们会逐个讨论这些问题。段落对齐方式和浮动对象将在本文档的后续部分进行讨论。

9.3.1 Paragraphs: the P element

<!ELEMENT P - O (%inline;)*            -- paragraph -->

<!ATTLIST P
  %attrs;                              -- %coreattrs, %i18n, %events --
  >

Start tag: required, End tag: optional

The P element represents a paragraph. It cannot contain block-level elements (including P itself).

We discourage authors from using empty P elements. User agents should ignore empty P elements.

P元素展现一个段落。它不能承载块级别元素(包括P元素本身)。我们不支持作者使用空的P元素。用户代理应该忽略空的P元素。

9.3.2 Controlling line breaks

A line break is defined to be a carriage return (&#x000D;), a line feed (&#x000A;), or a carriage return/line feed pair. All line breaks constitute white space.

折行被定义为一个回车符(&#x000D;),一个换行符(&#x000A;),或者一个回车、换行的组合。所有的折行构成了空白。

For more information about SGML's specification of line breaks, please consult the notes on line breaks in the appendix.

有关SGML规范中折行的更多信息,请参阅附录中关于折行的注释。

Forcing a line break: the BR element 
<!ELEMENT BR - O EMPTY                 -- forced line break -->

<!ATTLIST BR
  %coreattrs;                          -- id, class, style, title --
  >

Start tag: required, End tag: forbidden

开始标签:必须,结束标签:禁止

Attributes defined elsewhere

在其他地方定义的属性

The BR element forcibly breaks (ends) the current line of text.

BR元素强制对当前行文本进行折行(结束)。

For visual user agents, the clear attribute can be used to determine whether markup following the BR element flows around p_w_picpaths and other objects floated to the left or right margin, or whether it starts after the bottom of such objects. Further details are given in the section on alignment and floating objects. Authors are advised to use style sheets to control text flow around floating p_w_picpaths and other objects.

对于可视化用户代理来说,clear属性可以被用来确定跟随BR元素的标记是否环绕悬浮于左边或右边空白图像或者其他对象,或者决定它从这类对象的底部开始。更进一步的细节信息在对齐方式及悬浮对象部分进行描述。作者被建议使用样式表来控制文本环绕悬浮的图像和其他对象。

With respect to bidirectional formatting, the BR element should behave the same way the [ISO10646] LINE SEPARATOR character behaves in the bidirectional algorithm.

考虑到双向格式化机制,BR元素应该与[ISO10646]中行分隔符字符在双向机制中的行为相同。

Prohibiting a line break 

Sometimes authors may want to prevent a line break from occurring between two words. The &nbsp; entity (&#160; or &#xA0;) acts as a space where user agents should not cause a line break.

有时作者可能希望禁止两个单词中间进行折行。&nbsp;实体(&#160; or &#xA0;)会形成空格,在空格的地方用户代理不应该进行折行。

9.3.3 Hyphenation

In HTML, there are two types of hyphens: the plain hyphen and the soft hyphen. The plain hyphen should be interpreted by a user agent as just another character. The soft hyphen tells the user agent where a line break can occur.

在HTML中,有两种类型的连词符:一般的连词符以及软连词符。一般的表示符应该被用户代理当成一个字符来解释。软连词符告知用户代理在此可以进行折行。

Those browsers that interpret soft hyphens must observe the following semantics: If a line is broken at a soft hyphen, a hyphen character must be displayed at the end of the first line. If a line is not broken at a soft hyphen, the user agent must not display a hyphen character. For operations such as searching and sorting, the soft hyphen should always be ignored.

解析软连词符的浏览器必须按照下面的语义进行:如果在软连词符位置文本行是折断的,那么在第一样的结尾必须显示一个连词字符。如果在软连词符位置文本行未折断,用户代理必须不显示连词字符。对于像搜索以及排序这样的操作,软连词应该被忽略。

In HTML, the plain hyphen is represented by the "-" character (&#45; or &#x2D;). The soft hyphen is represented by the character entity reference &shy; (&#173; or &#xAD;)

在HTML中,一般连词符用“-”字符(&#45; or &#x2D;)来表示。软连词符用字符实体&shy; (&#173; or &#xAD;)表示。

9.3.4 Preformatted text: The PRE element

<!ENTITY % pre.exclusion "IMG|OBJECT|BIG|SMALL|SUB|SUP">
<!ELEMENT PRE - - (%inline;)* -(%pre.exclusion;) -- preformatted text -->

<!ATTLIST PRE
  %attrs;                              -- %coreattrs, %i18n, %events --
  >

Start tag: required, End tag: required

开始标签:必须,结束标签:必须

Attribute definitions

属性定义

width = number [CN]
Deprecated. This attribute provides a hint to visual user agents about the desired width of the formatted block. The user agent can use this information to select an appropriate font size or to indent the content appropriately. The desired width is expressed in number of characters. This attribute is not widely supported currently
不推荐。该属性为可视化用户代理提供了格式化块的目标宽度信息。用户代理可以使用该信息来选择合适的字体大小或者对内容进行合适的缩进。目标宽度用字符数量来表示。当前该属性是没有被广泛支持的。

 

The PRE element tells visual user agents that the enclosed text is "preformatted". When handling preformatted text, visual user agents:

PRE元素告知可视化用户代理包含的文本时预格式化的。当处理预格式化文本时,可视化用户代理:

  • May leave white space intact.
  • May render text with a fixed-pitch font.
  • May disable automatic word wrap.
  • Must not disable bidirectional processing.
  • 应该保持空白空间不变化。
  • 应该使用固定高度的字体显示文本。
  • 应该禁止自动折词。
  • 不能机制双向处理。

Non-visual user agents are not required to respect extra white space in the content of a PRE element.

非可视化用户代理不需要顾忌在PRE元素内容中额外的空白。

For more information about SGML's specification of line breaks, please consult the notes on line breaks in the appendix.

有关SGML规范中折行的更多信息,请参阅有附录中关折行的注释。

The DTD fragment above indicates which elements may not appear within a PRE declaration. This is the same as in HTML 3.2, and is intended to preserve constant line spacing and column alignment for text rendered in a fixed pitch font. Authors are discouraged from altering this behavior through style sheets.

上面的DTD片段定义了那些元素不能再PRE声明内部使用。这和HTML3.2中是一样的,并且应该保留用固定高度字体表示文本的固定行间距以及列对齐方式。作者不要使用样式表来改变这种缺省的行为。

The following example shows a preformatted verse from Shelly's poem To a Skylark:

下面的例子展示了一个Shelly's的Skylark诗句:

<PRE>
       Higher still and higher
         From the earth thou springest
       Like a cloud of fire;
         The blue deep thou wingest,
And singing still dost soar, and soaring ever singest.
</PRE>

Here is how this is typically rendered:

下面是该段落的典型的展现:

       Higher still and higher
         From the earth thou springest
       Like a cloud of fire;
         The blue deep thou wingest,
And singing still dost soar, and soaring ever singest.

The horizontal tab character
The horizontal tab character (decimal 9 in [ISO10646] and [ISO88591] ) is usually interpreted by visual user agents as the smallest non-zero number of spaces necessary to line characters up along tab stops that are every 8 characters. We strongly discourage using horizontal tabs in preformatted text since it is common practice, when editing, to set the tab-spacing to other values, leading to misaligned documents.

水平方向的制表符

水平方向制表符(在 [ISO10646][ISO88591] 中为数字9)通常被可视化代理解析成对于行字符中tab的占据的最小数量的空格,一般为8个字符。由于在编辑时tab空间设置成其他值是经常发生的,我们强烈不建议在预格式化文本中使用制水平方向制表符。这样会导致错文档文本对齐方式混乱。