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.
因爲在標記語言中該位置沒有空格,這樣顯示是錯誤的。
<!-- 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>