HTML4.01規範中英文對照-HTML基本數據類型(2)

6.11 Dates and times

[ISO8601] allows many options and variations in the representation of dates and times. The current specification uses one of the formats described in the profile [DATETIME] for its definition of legal date/time strings ( %Datetime in the DTD).html

[ISO8601]在日期和時間的展示上容許不少選項及變形。本規範只採用了其中的一種格式,在[DATETIME] 中描述了該格式的細節,在DTD的參數實體%Datetime 中出現的日期/時間字符串必須符合該種格式纔是合法的。git

The format is:
  YYYY-MM-DDThh:mm:ssTZD
where:

     YYYY = four-digit year

     MM   = two-digit month (01=January, etc.)
     
DD   = two-digit day of month (01 through 31)
     
hh   = two digits of hour (00 through 23) (am/pm NOT allowed)
     
mm   = two digits of minute (00 through 59)
     
ss   = two digits of second (00 through 59)
     
TZD  = time zone designator

The time zone designator is one of:chrome

Z
indicates UTC (Coordinated Universal Time). The "Z" must be uppercase.
+hh:mm
indicates that the time is a local time which is hh hours and mm minutes ahead of UTC.
-hh:mm
indicates that the time is a local time which is hh hours and mm minutes behind UTC.

日期/時間字符串的格式以下:網絡

  YYYY-MM-DDThh:mm:ssTZD

其中:
     YYYY = 四位數字的年份
     MM   = 兩位數字的月份(01表明一月份,依此類推)
     
DD   = 兩位數字的日期(從01 到 31)
     
hh   = 兩位數字的小時(從00 到 23) (不容許上下午標識:am/pm)
     
mm   = 兩位數字的分鐘(從00 到 59)
     
ss   = 兩位數字的秒鐘(從00 到 59)
     
TZD  = 時區指示符

時區指示符能夠是下表中的任何一種:app

Z
表明UTC時間即協調世界時。 "Z" 必須大寫。
+hh:mm
表明該時間是本地時間,該時間在UTC時間以前hh小時mm分鐘。
-hh:mm
表明該時間是本地時間,該時間在UTC時間以後hh小時mm分鐘。

Exactly the components shown here must be present, with exactly this punctuation. Note that the "T" appears literally in the string (it must be uppercase), to indicate the beginning of the time element, as specified in [ISO8601]框架

必須按照上面的描述提供全部組成部分,它們之間的標點分隔也要精確匹配。請注意:根據[ISO8601]的描述,大寫字符"T"(必須大寫)表示時間元素的開始。ide

If a generating application does not know the time to the second, it may use the value "00" for the seconds (and minutes and hours if necessary).ui

若是生成程序不知道具體的秒鐘時間,它能夠對秒鐘字段使用"00"做爲其值。相似的,若是須要也能夠將該規則應用到分鐘,小時字段。this

Note. [DATETIME] does not address the issue of leap seconds.搜索引擎

註釋。 [DATETIME] 不包括閏秒機制。

6.12 Link types

Authors may use the following recognized link types, listed here with their conventional interpretations. In the DTD, %LinkTypes refers to a space-separated list of link types. White space characters are not permitted within link types.

HTML做者可使用下述已經被識別出連接類型,這些連接類型在下表中都有規範的解釋。在DTD中, %LinkTypes 指的是用空格分隔的連接類型列表。在連接類型裏不容許出現空格字符。

These link types are case-insensitive, i.e., "Alternate" has the same meaning as "alternate".

這些連接類型是大小寫不敏感的,例如: "Alternate"和"alternate"都表明一樣的含義。

User agents, search engines, etc. may interpret these link types in a variety of ways. For example, user agents may provide access to linked documents through a navigation bar.

用戶代理、搜索引擎等等可能會對這些連接類型進行不一樣方式的解讀。例如:用戶代理可能會經過導覽條提供對連接文檔的訪問機制。

Alternate
Designates substitute versions for the document in which the link occurs. When used together with the lang attribute, it implies a translated version of the document. When used together with the media attribute, it implies a version designed for a different medium (or media).
Alternate型的連接爲文檔指定了替代版本。當和lang屬性一塊兒使用時,表示一個當前文檔的相應翻譯版本。當和media屬性一塊兒使用時,表示爲另一種不一樣的介質(媒體)設計的文檔版本。
Stylesheet
Refers to an external style sheet. See the section on external style sheets for details. This is used together with the link type "Alternate" for user-selectable alternate style sheets.
指向外部樣式表。有關詳細信息,請參閱「外部樣式表」部分。當其和連接類型"Alternate"一塊兒使用時,能夠表示用戶可選擇的替代樣式表。
Start
Refers to the first document in a collection of documents. This link type tells search engines which document is considered by the author to be the starting point of the collection.
只是文檔集合中的第一個文檔。該連接類型能夠告知搜索引擎哪個文檔是做者認爲的集合起始點。
Next
Refers to the next document in a linear sequence of documents. User agents may choose to preload the "next" document, to reduce the perceived load time.
指向在一組線性排列的文檔中,下一個文檔。用戶代理能夠選擇提早裝載"next"所指定的文檔,這樣作能夠減小文檔裝載感知時間。
Prev
Refers to the previous document in an ordered series of documents. Some user agents also support the synonym "Previous".
指向在一組排序的文檔中,前一個文檔。有一些用戶代理同時支持同義詞"Previous"。
Contents
Refers to a document serving as a table of contents. Some user agents also support the synonym ToC (from "Table of Contents").
指向一個做爲目錄的文檔。一些用戶代理同時支持同義詞ToC(即英文:「Table of Contents」)。
Index
Refers to a document providing an index for the current document.
指向爲當前文檔提供索引的文檔.
Glossary
Refers to a document providing a glossary of terms that pertain to the current document。
指向爲當前文檔中出現的術語提供術語列表的文檔。
Copyright
Refers to a copyright statement for the current document.
指向當前文檔的版權聲明。
Chapter
Refers to a document serving as a chapter in a collection of documents.
指向在文檔集合中做爲一章的文檔。
Section
Refers to a document serving as a section in a collection of documents.
指向在一個文檔集合中做爲部分(Section)的文檔。
Subsection
Refers to a document serving as a subsection in a collection of documents
指向一個文檔集合中做爲子部分的文檔。
Appendix
Refers to a document serving as an appendix in a collection of documents
指向一個文檔集合中做爲附錄的文檔。.
Help
Refers to a document offering help (more information, links to other sources information, etc.)
指向一個提供幫助信息的文檔,該文檔好比有更多信息以及連接到其餘信息源等。

Bookmark
Refers to a bookmark. A bookmark is a link to a key entry point within an extended document. The title attribute may be used, for example, to label the bookmark. Note that several bookmarks may be defined in each document.
指向一個書籤。書籤是指向到文檔內關鍵入口的連接。title屬性能夠被用來標記命名書籤。請注意,在一個文檔內能夠定義多個書籤。

Authors may wish to define additional link types not described in this specification. If they do so, they should use a profile to cite the conventions used to define the link types. Please see the profile attribute of the HEAD element for more details.

HTML做者可能但願定義其餘本規範內沒有描述的連接類型。若是他們確實想這麼作,那麼他們應該使用profile註解用於定義連接類型的術語。請參考HEAD元素的profile屬性來得到更多細節。

For further discussions about link types, please consult the section on links in HTML documents.

關於連接類型的更深刻討論,請參閱《HTML文檔內的連接》部分。

6.13 Media descriptors

The following is a list of recognized media descriptors ( %MediaDesc in the DTD).

下面是已經能夠被識別的介質描述列表,媒體描述符在DTD中用參數實體%MediaDesc來表示。

screen
Intended for non-paged computer screens。
沒有分頁機制的計算機屏幕
tty
Intended for media using a fixed-pitch character grid, such as teletypes, terminals, or portable devices with limited display capabilities
固定字符網格型介質,例如,電傳打字機機,字符終端,顯示能力有限的移動設備。
tv
Intended for television-type devices (low resolution, color, limited scrollability)
電視類型的設備,這種類型的設備特性是低分辨率,顏色少,滾動能力受限。
projection
Intended for projectors.
投影儀
handheld
Intended for handheld devices (small screen, monochrome, bitmapped graphics, limited bandwidth)
手持設備,這種類型的設備的特性以下:屏幕尺寸小,通常只有黑白顯示,無彩色,只支持位圖形式的圖片以及網絡傳輸帶寬也比較有限。
print
Intended for paged, opaque material and for documents viewed on screen in print preview mode。
分頁的不透明的物質以及在屏幕上以打印預覽模式顯示。
braille
Intended for braille tactile feedback devices
盲文觸感回饋設備。
aural
Intended for speech synthesizers.
語音合成器。
all
Suitable for all devices.
適合於全部設備。

Future versions of HTML may introduce new values and may allow parameterized values. To facilitate the introduction of these extensions, conforming user agents must be able to parse the media attribute value as follows:

在HTML的將來版本中可能會引入更多的介質名稱而且可能容許參數化取值。爲了簡化這些可能的擴展,符合規範的用戶代理必須能按照以下的機制來解析media屬性的值:

  1. The value is a comma-separated list of entries. For example,
    media="screen, 3d-glasses, print and resolution > 90dpi"
    

    is mapped to:

    "screen"
    "3d-glasses"
    "print and resolution > 90dpi"
    
  2. Each entry is truncated just before the first character that isn't a US ASCII letter [a-zA-Z] (ISO 10646 hex 41-5a, 61-7a), digit [0-9] (hex 30-39), or hyphen (hex 2d). In the example, this gives:
    "screen"
    "3d-glasses"
    "print"
    
  3. A case-sensitive match is then made with the set of media types defined above. User agents may ignore entries that don't match. In the example we are left with screen and print.

  1. media屬性值的形式是用逗號分隔的實體列表。例如,
    media="screen, 3d-glasses, print and resolution > 90dpi"
    

    會被映射爲:

    "screen"
    "3d-glasses"
    "print and resolution > 90dpi"三個實體。
    
  2. 對於實體,若是其內包含非US ASCII字符[a-zA-Z] (ISO 10646 十六進制代碼 41-5a, 61-7a), 數字 [0-9] (十六進制代碼 30-39), 連詞符(十六進制代碼 2d),那麼該實體會被截斷,截斷的位置爲第一個非法字符以前。繼續上面的例子, 這會使上面的三個實體變成:
    "screen"
    "3d-glasses"
    "print"
    
  3. 而後將獲得的實體列表與本節開始定義的介質類型進行區分大小寫的匹配。用戶代理能夠忽略那些沒有匹配到的實體。繼續上面的例子,就會只剩 screen 和 print

Note. Style sheets may include media-dependent variations within them (e.g., the CSS @media construct). In such cases it may be appropriate to use "media=all".

註釋。樣式表可能包含上述介質的更多變種(例如,CSS @media指令)。在這種狀況下,將media設置成all可能更合適。

6.14 Script data

Script data ( %Script; in the DTD) can be the content of the SCRIPT element and the value of intrinsic event attributes. User agents must not evaluate script data as HTML markup but instead must pass it on as data to a script engine.

Script腳本數據(在DTD中%Script;參數實體)能夠是SCRIPT元素的內容或者死內建時間屬性的屬性值。用戶代理絕對不能將腳本數據當作HTML標記處理,而是要將它當成數據傳遞給相應的腳本引擎。

The case-sensitivity of script data depends on the scripting language.

Script腳本數據是否大小寫敏感依賴於相應的腳本語言。

Please note that script data that is element content may not contain character references, but script data that is the value of an attribute may contain them. The appendix provides further information about specifying non-HTML data.

請注意,當Script腳本數據是元素內容的時候,不能含有字符引用。但當Script腳本數據是屬性值時就能夠攜帶字符引用。附錄裏提供了關於指定非HTML數據的更進一步信息。

6.15 Style sheet data

Style sheet data (%StyleSheet; in the DTD) can be the content of the STYLE element and the value of the style attribute. User agents must not evaluate style data as HTML markup.

樣式表數據(在DTD中爲%StyleSheet;參數實體)能夠是STYLE元素的內容,另外也能夠是style屬性的值。用戶代理絕對不能將樣式表數據當成HTML標記來處理。

The case-sensitivity of style data depends on the style sheet language.

樣式數據是不是大小寫敏感依賴於相應的樣式表語言。

Please note that style sheet data that is element content may not contain character references, but style sheet data that is the value of an attribute may contain them. The appendix provides further information about specifying non-HTML data.

請注意,樣式表數據做爲元素內容時不能夠攜帶字符引用,但做爲屬性值時能夠攜帶字符引用。附錄裏提供了有關指定非HTML數據的更進一步信息。

6.16 Frame target names

Except for the reserved names listed below, frame target names (%FrameTarget; in the DTD) must begin with an alphabetic character (a-zA-Z). User agents should ignore all other target names.

除了下表列出的保留的名字外,框架目標名字(在DTD中的%FrameTarget參數實體)必須以字母開始(a-zA-Z)。用戶代理應該忽略其餘任何形式的目標名字。

The following target names are reserved and have special meanings.

下面的目標名字是被保留並有特使含義的。

_blank
The user agent should load the designated document in a new, unnamed window
用戶代理應該一個全新的未命名的窗口中載入指定的文檔。
_self
The user agent should load the document in the same frame as the element that refers to this target
用戶代理應該在引用到該目標的元素所在的框架(frame)中載入文檔。
_parent
The user agent should load the document into the immediate FRAMESET parent of the current frame. This value is equivalent to _self if the current frame has no parent
用戶代理應該將文檔載入到當前框架的直接的父FRAMESET中。若是當前框架沒有父節點,那麼該值與_self相同。
_top
The user agent should load the document into the full, original window (thus canceling all other frames). This value is equivalent to _self if the current frame has no parent
用戶代理應該將文檔載入到那個完整的原始窗口(因而取消了全部其餘的框架)。若是當前框架沒喲父節點,該值與_self相同。
相關文章
相關標籤/搜索