HTML4.01規範中英文對照-HTML4簡介(2)

2.3 HTML 4

HTML 4 extends HTML with mechanisms for style sheets, scripting, frames, embedding objects, improved support for right to left and mixed direction text, richer tables, and enhancements to forms, offering improved accessibility for people with disabilities.html

HTML 4 在樣式表機制,腳本,框架,嵌入式對象,從右向左以及混合文本方向的更好支持,更豐富靈活的表格以及表單加強,爲生理缺陷人士提供給更好的訪問能力等方面都對HTML進行了擴展。react

HTML 4.01 is a revision of HTML 4.0 that corrects errors and makes some changes since the previous revision.瀏覽器

HTML4.01是HTML4.0的修訂版本,它修正了一些錯誤以及自從上次修訂的一些變動。網絡

2.3.1 Internationalization

This version of HTML has been designed with the help of experts in the field of internationalization, so that documents may be written in every language and be transported easily around the world. This has been accomplished by incorporating [RFC2070], which deals with the internationalization of HTML.app

該版本的HTML在設計時獲得了國際化領域專家的幫助,因此HTML文檔能夠用任何的語言來撰寫而且這些文檔能夠很容易的在世界範圍內傳播。在處理HTML國際化問題時,咱們引入了[RFC2070],因此該版本的HTML得到了上述能力。框架

One important step has been the adoption of the ISO/IEC:10646 standard (see [ISO10646]) as the document character set for HTML. This is the world's most inclusive standard dealing with issues of the representation of international characters, text direction, punctuation, and other world language issues.less

一個很重要的步驟是將ISO/IEC:10646(參見[ISO10640])標準做爲HTML的文檔字符集。該標準用於處理國際化字符、文本方向,標點以及其餘世界性語言問題。該標準在世界範圍內已經被普遍接受。ide

HTML now offers greater support for diverse human languages within a document. This allows for more effective indexing of documents for search engines, higher-quality typography, better text-to-speech conversion, better hyphenation, etc.工具

當今的HTM對在一個文檔內採用多種人類語言提供了更強大的支持。這種支持使得搜索引擎對文檔的索引更加有效,排版更加高質量,文本語音轉換更加先進,更好的斷字等等。佈局

2.3.2 Accessibility

As the Web community grows and its members diversify in their abilities and skills, it is crucial that the underlying technologies be appropriate to their specific needs. HTML has been designed to make Web pages more accessible to those with physical limitations. HTML 4 developments inspired by concerns for accessibility include:

隨着Web世界的增加,它的成員在他們我的能力以及技能上千差萬別,因此底層的技術應該能夠知足他們的特殊須要是很是關鍵的。HTML已經被設計成對於那些有生理缺陷的人們訪問網頁變得容易。HTML4在訪問性方面的關注點主要集中在以下幾個方面:

  • Better distinction between document structure and presentation, thus encouraging the use of style sheets instead of HTML presentation elements and attributes.
  • 更好的文檔結構與文檔展示隔離,這促使應用樣式表(Style sheets)而不是採用HTML的展示元素和屬性來解決文檔的展示問題。
  • Better forms, including the addition of access keys, the ability to group form controls semantically, the ability to group SELECT options semantically, and active labels.
  • 更好的表單,這些特性包括增長了訪問快捷鍵,根據語義來對錶單控件進行分組的能力,根據語義來對SELECT選項進行分組的能力以及活動標籤(acitve labels)
  • The ability to markup a text description of an included object (with the OBJECT element).
  • 對於經過OBJECT元素包含的對象提供文本描述的能力
  • A new client-side p_w_picpath map mechanism (the MAP element) that allows authors to integrate p_w_picpath and text links.
  • 全新的客戶端圖像地圖機制(MAP元素),該機制容許做者將圖像與文本連接整合起來。
  • The requirement that alternate text accompany p_w_picpaths included with the IMG element and p_w_picpath maps included with the AREA element.
  • 在IMG元以及在AREA元素內的圖像能夠與一個替代的文本想連接。
  • Support for the title and lang attributes on all elements.
  • 對於全部元素都提供title和lang屬性支持
  • Support for the ABBR and ACRONYM elements.
  • 支持ABBR(縮略語)和ACRONYM(首字母縮略)元素
  • A wider range of target media (tty, braille, etc.) for use with style sheets.
  • 在樣式表中提供了更普遍的目標介質(如:字符介質,盲文機子等)
  • Better tables, including captions, column groups, and mechanisms to facilitate non-visual rendering.
  • 更好的表格,這些特性包括標題,列分組以及簡化非可視化輸出的機制等。
  • Long descriptions of tables, p_w_picpaths, frames, etc.
  • 爲表格,圖片,框架等提供長文本描述。

Authors who design pages with accessibility issues in mind will not only receive the blessings of the accessibility community, but will benefit in other ways as well: well-designed HTML documents that distinguish structure and presentation will adapt more easily to new technologies.

那些在腦海裏一直想着頁面訪問性的HTML文檔做者不但能夠收到訪問社會的祝福,另外還能夠得到以下幾方面的收穫:一個設計優秀的區分結構與展示的文檔將會更加容易的引入新的技術。

Note. For more information about designing accessible HTML documents, please consult [WAI].

註釋。有關設計易於訪問的HTML文檔的信息,請諮詢[WAI].

2.3.3 Tables

The new table model in HTML is based on [RFC1942]. Authors now have greater control over structure and layout (e.g., column groups). The ability of designers to recommend column widths allows user agents to display table data incrementally (as it arrives) rather than waiting for the entire table before rendering.

而今的HTML提供了一個基於[RFC1942]的表格模型。文檔的做者擁有針對於表格結構與佈局的更增強大的控制能力(好比:列分組)。經過表格的設計者給出建議的列寬,用戶代理(瀏覽器)能夠增量地顯示錶格數據,而不是等到正個表格數據所有接受到才顯示。

Note. At the time of writing, some HTML authoring tools rely extensively on tables for formatting, which may easily cause accessibility problems.

註釋。在寫這篇文檔時,一些HTML撰寫工具至關依賴於表格來進行文檔格式化,這會很是容易致使可訪問性問題。

2.3.4 Compound documents

HTML now offers a standard mechanism for embedding generic media objects and applications in HTML documents. The OBJECT element (together with its more specific ancestor elements IMG and APPLET) provides a mechanism for including p_w_picpaths, video, sound, mathematics, specialized applications, and other objects in a document. It also allows authors to specify a hierarchy of alternate renderings for user agents that don't support a specific rendering.

HTML如今提供了標準的機制用於將常見的媒體對象以及應用程序嵌入見HTML文檔。OBJECT元素(以及它的更加專用的前輩元素IMG和 APPLET)提供了在文檔內包含圖片,視頻,語音,數學公式,專用應用程序以及其餘各類類型對象的機制。HTML還容許文檔撰寫者提供一個備選的展示層 級,當用戶代理(瀏覽器)不支持摸個對象展示的時候能夠在這個層級上逐級識別進行展示。

2.3.5 Style sheets

Style sheets simplify HTML markup and largely relieve HTML of the responsibilities of presentation. They give both authors and users control over the presentation of documents -- font information, alignment, colors, etc.

樣式表簡化了HTML的標籤同時也極大地減輕了HTML在展示方面的職責。他們把文檔展示的控制交給了做者和用戶——好比字體信息,對齊方式,顏色等等。

Style information can be specified for individual elements or groups of elements. Style information may be specified in an HTML document or in external style sheets.

樣式信息既能夠針對某個特定的單個元素也能夠針對一組元素。樣式信息既能夠在HTML文檔內聲明也能夠在一個外部的樣式表內聲明。

The mechanisms for associating a style sheet with a document is independent of the style sheet language.

將樣式表和文檔關聯的機制是獨立於樣式表語言的。

Before the advent of style sheets, authors had limited control over rendering. HTML 3.2 included a number of attributes and elements offering control over alignment, font size, and text color. Authors also exploited tables and p_w_picpaths as a means for laying out pages. The relatively long time it takes for users to upgrade their browsers means that these features will continue to be used for some time. However, since style sheets offer more powerful presentation mechanisms, the World Wide Web Consortium will eventually phase out many of HTML's presentation elements and attributes. Throughout the specification elements and attributes at risk are marked as "deprecated". They are accompanied by examples of how to achieve the same effects with other elements or style sheets.

在樣式表發明之前,HTML文檔的做者在展示方面只有很弱的控制能力。HTML3.2包含了一些用於控制對齊方式,字體大小和文本顏色的一些屬性和元素。 同時HTML文檔的做者仍是須要用表格和圖片的做爲網頁佈局的方法。若是用戶在一段較長的時間內部升級他們的瀏覽器,就意味着這些特性還要被使用很長時 間。然而,既然樣式表已經提供了更增強大的展示機制,萬維網聯盟將會清除掉衆多有關HTML展示的元素和屬性。在本文檔內全部這方面的元素和屬性將被標記 爲"不推薦使用"。並給出實現一樣效果的替代方案,這些方案是用其餘的元素或樣式表實現的。

2.3.6 Scripting

Through scripts, authors may create dynamic Web pages (e.g., "smart forms" that react as users fill them out) and use HTML as a means to build networked applications.

經過script腳本,HTML做者能夠建立動態的網頁(好比:用於相應用戶填報的"智能表單")以及用HTML做爲構建網絡應用的工具。

The mechanisms provided to include scripts in an HTML document are independent of the scripting language.

在HTML文檔內包含script腳本的機制與腳本語言自己無關。

2.3.7 Printing

Sometimes, authors will want to make it easy for users to print more than just the current document. When documents form part of a larger work, the relationships between them can be described using the HTML LINK element or using W3C's Resource Description Framework (RDF) (see [RDF10]).

有些時候,HTML做者很是但願除了打印當前文檔外還能夠打印其餘相關的文檔。並但願這樣的操做能夠很是容易。當不少文檔構建一個大的網絡時,他們之間的關係能夠經過HTML的LINK元素或者W3C的資源描述框架(RDF)來表述(參見[RDF10])。

2.4 Authoring documents with HTML 4

We recommend that authors and implementors observe the following general principles when working with HTML 4.

咱們建議全部的HTML做者和實現者在用HTML4工做時可以檢視本節的以下通用準則。

2.4.1 Separate structure and presentation

HTML has its roots in SGML which has always been a language for the specification of structural markup. As HTML matures, more and more of its presentational elements and attributes are being replaced by other mechanisms, in particular style sheets. Experience has shown that separating the structure of a document from its presentational aspects reduces the cost of serving a wide range of platforms, media, etc., and facilitates document revisions.

HTML的根是SGML。SGML從一開始就是一種用戶表述結構的標記語言。隨着HTML的成熟,愈來愈多的有關展示的元素和屬性已經被諸如樣式表等其餘 機制所取代。經驗已經代表將文檔的結構與其展示方面分離將在下降在多個平臺、介質等方面傳播的成本,以及簡化文檔的修訂。

2.4.2 Consider universal accessibility to the Web

To make the Web more accessible to everyone, notably those with disabilities, authors should consider how their documents may be rendered on a variety of platforms: speech-based browsers, braille-readers, etc. We do not recommend that authors limit their creativity, only that they consider alternate renderings in their design. HTML offers a number of mechanisms to this end (e.g., the alt attribute, the accesskey attribute, etc.)

爲了每一個人均可以而更加容易訪問Web,特別是那些有生理缺陷的人們,HTML的做者須要關注他們的文檔在不一樣的平臺上如何被展示,這些平臺包括:基於語 音的瀏覽器,盲文閱讀器等等。咱們不建議做者限制他們的創造力,HTML爲了知足這些需求提供了多種可供選擇的機制(好比:alt屬 性,accesskey屬性等等)以保證他們不只僅是隻涉及一種替代方式。

Furthermore, authors should keep in mind that their documents may be reaching a far-off audience with different computer configurations. In order for documents to be interpreted correctly, authors should include in their documents information about the natural language and direction of the text, how the document is encoded, and other issues related to internationalization.

更進一步,做者應該一直想着他們的文檔可能正在到達一個遙遠的擁有徹底不一樣電腦配置的受衆。爲了使文檔能夠被正確的解釋,做者應該在他們的文檔中包含天然語言以及文本方向,文檔如何被編碼以及其餘有關國際化的信息。

2.4.3 Help user agents with incremental rendering

By carefully designing their tables and making use of new table features in HTML 4, authors can help user agents render documents more quickly. Authors can learn how to design tables for incremental rendering (see the TABLE element). Implementors should consult the notes on tables in the appendix for information on incremental algorithms.

經過仔細地設計他們的表格以及使用HTML4提供的有關表格的新的特性,做者能夠幫助用戶代理(瀏覽器)更快的展示表格。做者能夠學習一下如何設計一個增量展示的表格(參見TABLE元素)。HTML實現者應該參考在本文檔附錄裏寡慾表格增量展示機制的相關注釋信息。
相關文章
相關標籤/搜索