Python 官方文档:入门教程 => 点击学习
9.3.5 Visual rendering of paragraphs Note. The following section is an infORMative description of the behavior of some
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.
注释。下面的部分是当前一些可视化用户代理在格式化段落时行为的非正式描述。样式表可以对段落格式化进行更好地控制。
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.
段落如何被展现依赖于用户代理。段落通常情况下会从左侧开始并在右侧留有不规整的空白。其他的缺省情况对从右向左的语言也是适用的。
html user agents have traditionally rendered paragraphs with white space before and after, e.g.,
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.,
这和在小说里适用的样式是不一样,在小说里每个段落的第一行会缩进以及在段落之间,即当前段落的最后一行和下一段落的第一行之间,的行间距离是正常的,例如:
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.
由于遵从NCSA Mosaic 浏览器的设置,用户代理一般都不会采用两端对齐,部分原因是由于没有丰富的连词符机制而很难做到。样式表以及平滑处理字体的出现给HTML作者提供了比以前更加丰富的控制。
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.
由于在标记语言中该位置没有空格,这样显示是错误的。
<!-- 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
属性定义
Attributes defined elsewhere
在其他地方定义的属性
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>
--结束END--
本文标题: HTML4.01规范-文本(3)
本文链接: https://lsjlt.com/news/183296.html(转载时请注明来源链接)
有问题或投稿请发送至: 邮箱/279061341@qq.com QQ/279061341
2024-03-01
2024-03-01
2024-03-01
2024-02-29
2024-02-29
2024-02-29
2024-02-29
2024-02-29
2024-02-29
2024-02-29
回答
回答
回答
回答
回答
回答
回答
回答
回答
回答
0