HTML4.01规范-文本(3)

9.3.5 Visual rendering of paragraphs

Note. The following section is an informative description of the behavior of some current visual user agents when formatting paragraphs. Style sheets allow better control of paragraph formatting.html

注释。下面的部分是当前一些可视化用户代理在格式化段落时行为的非正式描述。样式表能够对段落格式化进行更好地控制。
promise

How paragraphs are rendered visually depends on the user agent. Paragraphs are usually rendered flush left with a ragged right margin. Other defaults are appropriate for right-to-left scripts.浏览器

段落如何被展示依赖于用户代理。段落一般状况下会从左侧开始并在右侧留有不规整的空白。其余的缺省状况对从右向左的语言也是适用的。app

HTML user agents have traditionally rendered paragraphs with white space before and after, e.g.,ide

HTML用户代理典型状况下会在段落的开始和结束放置空格。例如:

At the same time, there began to take form a system of numbering,   the calendar, hieroglyphic writing, and a technically advanced   art, all of which later influenced other peoples.    

Within the framework of this gradual evolution or cultural   progress the Preclassic horizon has been divided into Lower,   Middle and Upper periods, to which can be added a transitional   or Protoclassic period with several features that would later   distinguish the emerging civilizations of Mesoamerica. 

This contrasts with the style used in novels which indents the first line of the paragraph and uses the regular line spacing between the final line of the current paragraph and the first line of the next, e.g.,字体

这和在小说里适用的样式是不同,在小说里每一个段落的第一行会缩进以及在段落之间,即当前段落的最后一行和下一段落的第一行之间,的行间距离是正常的,例如:ui

         At the same time, there began to take form a system of   numbering, the calendar, hieroglyphic writing, and a technically   advanced art, all of which later influenced other peoples.      
    Within the framework of this gradual evolution or cultural   progress the Preclassic horizon has been divided into Lower,   Middle and Upper periods, to which can be added a transitional   or Protoclassic period with several features that would later   distinguish the emerging civilizations of Mesoamerica. 

Following the precedent set by the NCSA Mosaic browser in 1993, user agents generally don't justify both margins, in part because it's hard to do this effectively without sophisticated hyphenation routines. The advent of style sheets, and anti-aliased fonts with subpixel positioning promises to offer richer choices to HTML authors than previously possible.this

因为听从NCSA Mosaic 浏览器的设置,用户代理通常都不会采用两端对齐,部分缘由是因为没有丰富的连词符机制而很难作到。样式表以及平滑处理字体的出现给HTML做者提供了比之前更加丰富的控制。spa

Style sheets provide rich control over the size and style of a font, the margins, space before and after a paragraph, the first line indent, justification and many other details. The user agent's default style sheet renders P elements in a familiar form, as illustrated above. One could, in principle, override this to render paragraphs without the breaks that conventionally distinguish successive paragraphs. In general, since this may confuse readers, we discourage this practice.代理

样 式表提供了对字体大小以及样式、扉页留白,段落先后的空格,首行缩进,对齐以及其余不少细节信息的丰富控制。用户代理的缺省样式表会像上面提到的形式来展 现P元素。原则上,能够对段落间段落分隔的展示形式做覆盖,将其变成没有段落间折行。通常来讲,因为这样作可能会让读者迷惑,咱们不推荐这样作。

By convention, visual HTML user agents wrap text lines to fit within the available margins. Wrapping algorithms depend on the script being formatted.

按照约定,可视化HTML用户代理会将行按照适合可用的留白来进行折行。折行机制依赖于格式化的脚本。

In Western scripts, for example, text should only be wrapped at white space. Early user agents incorrectly wrapped lines just after the start tag or just before the end tag of an element, which resulted in dangling punctuation. For example, consider this sentence:

例如:在西方语言中,文本应该只在空格的地方进行折行。早期的用户代理会在元素开始标签以后或者结束标签以前尽心不正确的折行,这可能致使标点符号显示错误。例如,看下面的句子:

   A statue of the <A href="cih78">Cihuateteus</A>, who are patron ...

Wrapping the line just before the end tag of the A element causes the comma to be stranded at the beginning of the next line:

在A元素的结束标签以前进行折行会致使逗号出如今下一行的开始:

  A statue of the Cihuateteus
  
, who are patron ...

This is an error since there was no white space at that point in the markup.

因为在标记语言中该位置没有空格,这样显示是错误的。

9.4 Marking document changes: The INS and DEL elements

<!-- INS/DEL are handled by inclusion on BODY -->

<!ELEMENT (INS|DEL) - - (%flow;)*      -- inserted text, deleted text -->

<!ATTLIST (INS|DEL)

  %attrs;                              -- %coreattrs, %i18n, %events --
cite        %URI;          #IMPLIED  -- info on reason for change --
  
datetime    %Datetime;     #IMPLIED  -- date and time of change --
  >

Start tag: required, End tag: required

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

Attribute definitions

属性定义

cite = uri [CT]
The value of this attribute is a URI that designates a source document or message. This attribute is intended to point to information explaining why a document was changed
该属性的值是指向一个源文档或者消息的URI。该属性应该试图指向解释为何文档变化的信息。

datetime = datetime [CS]
The value of this attribute specifies the date and time when the change was made
该属性的值指定文档被修改的日期和时间。

INS and DEL are used to markup sections of the document that have been inserted or deleted with respect to a different version of a document (e.g., in draft legislation where lawmakers need to view the changes).

INS和DEL用于对文档内插入和删除的内容进行标记,以揭示一个不一样版本的文档(例如,在立法草案中立法者须要查看这些改变)。

These two elements are unusual for HTML in that they may serve as either block-level or inline elements (but not both). They may contain one or more words within a paragraph or contain one or more block-level elements such as paragraphs, lists and tables.

在HTML中,这两个元素是不一样寻常的,他们既能够被认为是块级别元素也能够是行呢元素。他们既能够包含一个段落里的一个或多个单词,也能够包含一个或多个块级别元素,例如:段落,列表和表格。

This example could be from a bill to change the legislation for how many deputies a County Sheriff can employ from 3 to 5.

下的的例子来自对一个州能够拥有的雇员数的修订,将原来的3个雇员修订为5个。

<P>
  A Sheriff can employ <DEL>3</DEL><INS>5</INS> deputies.
</P>

The INS and DEL elements must not contain block-level content when these elements behave as inline elements.

INS和DEL元素在其做为行内元素时不能包含任何块级别内容。

ILLEGAL EXAMPLE:

非法示例:
The following is not legal HTML.

下面的HTML是非法的。

<P>

<INS>
<DIV>
...block-level content...
</DIV> </INS> </P>

User agents should render inserted and deleted text in ways that make the change obvious. For instance, inserted text may appear in a special font, deleted text may not be shown at all or be shown as struck-through or with special markings, etc.

用户代理应该以显著的方式来展示插入的以及删除的文本。例如,插入的文本能够采用特殊的字体,删除的文本能够不显示或者以删除线亦或者用特殊的标记等。

Both of the following examples correspond to November 5, 1994, 8:15:30 am, US Eastern Standard Time.

下面的两个例子都是美国东部标准时间 1994年11月5日,上午8时15分30秒。

     1994-11-05T13:15:30Z 
     1994-11-05T08:15:30-05:00 

Used with INS, this gives:

和INS一块儿使用将是:

<INS datetime="1994-11-05T08:15:30-05:00"         cite="http://www.foo.org/mydoc/comments.html"> Furthermore, the latest figures from the marketing department suggest that such practice is on the rise. </INS>

The document "http://www.foo.org/mydoc/comments.html" would contain comments about why information was inserted into the document.

文档"http://www.foo.org/mydoc/comments.html"将包含信息被插入到文档内缘由的注释。

Authors may also make comments about inserted or deleted text by means of the title attribute for the INS and DEL elements. User agents may present this information to the user (e.g., as a popup note). For example:

对于INS和DEL元素,做者也能够用title属性来为插入和删除的文本作注释。用户代理会将信息展现给用户(例如,做为弹出提示)。例如:

<INS datetime="1994-11-05T08:15:30-05:00"
        title="Changed as a result of Steve B's comments in meeting.">
Furthermore, the latest figures from the marketing department
suggest that such practice is on the rise.
</INS>
相关文章
相关标签/搜索