- 浏览: 12928713 次
- 性别:
- 来自: 大连
文章分类
最新评论
-
sanrenxing_1:
GoEasy 实时推送支持IE6-IE11及大多数主流浏览器的 ...
WindowsPhone消息推送服务 -
张砚辉:
两侧照片绕Y轴旋转后有锯齿,请问锯齿解决方案,很长时间没解决
自定义带倒影和偏转的超炫Gallery -
knight_black_bob:
能不能把你自己的博客整理下分类下,写了这么多 ,都不知道怎么查 ...
Android_View,ViewGroup,Window之间的关系 -
jeasonyoung:
你这个代码实现在iOS8下应该是滑不动的
UISlider 滑块控件—IOS开发 -
wx_hello:
如果能写个可运行的java程序,不胜感激。。。
rs232串口通信原理
Basic HTML data types
6 Basic HTML data types
Contents
This section of the specification describes the basic data types that may appear as an element's content or an attribute's value.
For introductory information about reading the HTML DTD, please consult the SGML tutorial.
6.1 Case information
Each attribute definition includes information about the case-sensitivity of its values. The case information is presented with the following keys:
If an attribute value is a list, the keys apply to every value in the list, unless otherwise indicated.
6.2 SGML basic types
The document type definition specifies the syntax of HTML element content and attribute values using SGML tokens (e.g., PCDATA, CDATA, NAME, ID, etc.). See [ISO8879] for their full definitions. The following is a summary of key information:
-
CDATA is a sequence of characters from the document character set and may include character entities. User agents should interpret attribute values as follows:
- Replace character entities with characters,
- Ignore line feeds,
- Replace each carriage return or tab with a single space.
User agents may ignore leading and trailing white space in CDATA attribute values (e.g., "myval" may be interpreted as "myval"). Authors should not declare attribute values with leading or trailing white space.
For some HTML 4 attributes with CDATA attribute values, the specification imposes further constraints on the set of legal values for the attribute that may not be expressed by the DTD.
Although the STYLE and SCRIPT elements use CDATA for their data model, for these elements, CDATA must be handled differently by user agents. Markup and entities must be treated as raw text and passed to the application as is. The first occurrence of the character sequence "</" (end-tag open delimiter) is treated as terminating the end of the element's content. In valid documents, this would be the end tag for the element.
- ID and NAME tokens must begin with a letter ([A-Za-z]) and may be followed by any number of letters, digits ([0-9]), hyphens ("-"), underscores ("_"), colons (":"), and periods (".").
- IDREF and IDREFS are references to ID tokens defined by other attributes. IDREF is a single token and IDREFS is a space-separated list of tokens.
- NUMBER tokens must contain at least one digit ([0-9]).
6.3 Text strings
A number of attributes ( %Text; in the DTD) take text that is meant to be "human readable". For introductory information about attributes, please consult the tutorial discussion of attributes.
6.4 URIs
This specification uses the term URI as defined in [URI] (see also [RFC1630]).
Note that URIs include URLs (as defined in [RFC1738] and [RFC1808]).
Relative URIs are resolved to full URIs using a base URI. [RFC1808], section 3, defines the normative algorithm for this process. For more information about base URIs, please consult the section on base URIs in the chapter on links.
URIs are represented in the DTD by the parameter entity %URI;.
URIs in general are case-sensitive. There may be URIs, or parts of URIs, where case doesn't matter (e.g., machine names), but identifying these may not be easy. Users should always consider that URIs are case-sensitive (to be on the safe side).
Please consult the appendix for information about non-ASCII characters in URI attribute values.
6.5 Colors
The attribute value type "color" (%Color;) refers to color definitions as specified in [SRGB]. A color value may either be a hexadecimal number (prefixed by a hash mark) or one of the following sixteen color names. The color names are case-insensitive.
Black = "#000000" | Green = "#008000" |
||
Silver = "#C0C0C0" | Lime = "#00FF00" |
||
Gray = "#808080" | Olive = "#808000" |
||
White = "#FFFFFF" | Yellow = "#FFFF00" |
||
Maroon = "#800000" | Navy = "#000080" |
||
Red = "#FF0000" | Blue = "#0000FF" |
||
Purple = "#800080" | Teal = "#008080" |
||
Fuchsia = "#FF00FF" | Aqua = "#00FFFF" |
Thus, the color values "#800080" and "Purple" both refer to the color purple.
6.5.1 Notes on using colors
Although colors can add significant amounts of information to documents and make them more readable, please consider the following guidelines when including color in your documents:
- The use of HTML elements and attributes for specifying color is deprecated. You are encouraged to use style sheets instead.
- Don't use color combinations that cause problems for people with color blindness in its various forms.
- If you use a background image or set the background color, then be sure to set the various text colors as well.
- Colors specified with the BODY and FONT elements and bgcolor on tables look different on different platforms (e.g., workstations, Macs, Windows, and LCD panels vs. CRTs), so you shouldn't rely entirely on a specific effect. In the future, support for the [SRGB] color model together with ICC color profiles should mitigate this problem.
- When practical, adopt common conventions to minimize user confusion.
6.6 Lengths
HTML specifies three types of length values for attributes:
- Pixels: The value (%Pixels; in the DTD) is an integer that represents the number of pixels of the canvas (screen, paper). Thus, the value "50" means fifty pixels. For normative information about the definition of a pixel, please consult [CSS1].
- Length: The value (%Length; in the DTD) may be either a %Pixel; or a percentage of the available horizontal or vertical space. Thus, the value "50%" means half of the available space.
- MultiLength: The value ( %MultiLength; in the DTD) may be a %Length; or a relative length. A relative length has the form "i*", where "i" is an integer. When allotting space among elements competing for that space, user agents allot pixel and percentage lengths first, then divide up remaining available space among relative lengths. Each relative length receives a portion of the available space that is proportional to the integer preceding the "*". The value "*" is equivalent to "1*". Thus, if 60 pixels of space are available after the user agent allots pixel and percentage space, and the competing relative lengths are 1*, 2*, and 3*, the 1* will be alloted 10 pixels, the 2* will be alloted 20 pixels, and the 3* will be alloted 30 pixels.
Length values are case-neutral.
6.7 Content types (MIME types)
Note. A "media type" (defined in [RFC2045] and [RFC2046]) specifies the nature of a linked resource. This specification employs the term "content type" rather than "media type" in accordance with current usage. Furthermore, in this specification, "media type" may refer to the media where a user agent renders a document.
This type is represented in the DTD by %ContentType;.
Content types are case-insensitive.
Examples of content types include "text/html", "image/png", "image/gif", "video/mpeg", "text/css", and "audio/basic". For the current list of registered MIME types, please consult [MIMETYPES].
6.8 Language codes
The value of attributes whose type is a language code ( %LanguageCode in the DTD) refers to a language code as specified by [RFC1766], section 2. For information on specifying language codes in HTML, please consult the section on language codes. Whitespace is not allowed within the language-code.
Language codes are case-insensitive.
6.9 Character encodings
The "charset" attributes (%Charset in the DTD) refer to a character encoding as described in the section on character encodings. Values must be strings (e.g., "euc-jp") from the IANA registry (see [CHARSETS] for a complete list).
Names of character encodings are case-insensitive.
User agents must follow the steps set out in the section on specifying character encodings in order to determine the character encoding of an external resource.
6.10 Single characters
Certain attributes call for a single character from the document character set. These attributes take the %Character type in the DTD.
Single characters may be specified with character references (e.g., "&").
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).
The format is:
YYYY-MM-DDThh:mm:ssTZDwhere:
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:
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]
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).
Note. [DATETIME] does not address the issue of leap seconds.
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.
These link types are case-insensitive, i.e., "Alternate" has the same meaning as "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.
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.
For further discussions about link types, please consult the section on links in HTML documents.
6.13 Media descriptors
The following is a list of recognized media descriptors ( %MediaDesc in the DTD).
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:
- 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"
- 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"
- 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.
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".
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.
The case-sensitivity of script data depends on the scripting language.
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.
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.
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.
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.
The following target names are reserved and have special meanings.
相关推荐
MATLAB课件:ch1_basic_data_types.pdf
Understand the implementation of basic data types and why using the correct type is so important Work with XML data through the XML data type Construct XML data from relational result sets Store ...
Labview Basic about data types
Introduce java basic syntax and data types etc.
9.1.4 Basic Data Types 9.1.5 Compound Data Types 9.1.6 Extended Data Types 9.2 Communication Objects 9.2.1 Process Data Object(PDO) 9.2.2 Service Data Object (SDO) 9.2.3 Synchronisation Object (SYNC) ...
Quickly learn basic Python syntax, data types, and language concepts Work with both machine-readable and human-consumable data Scrape websites and APIs to find a bounty of useful information Clean...
A basic understanding of PHP data types, control structures, and other basic features is required What You Will Learn ? Gain a better understanding of PHP arrays as a basic data structure and their ...
Next, you will cement your knowledge of the basic concepts that the rest of the book relies on: file formats, data types, and character encodings. You will also learn how to extract and clean data ...
This book assumes familiarity with only the very basics of R, such as the main data types, simple functions, and how to move data around. No prior experience with data mining packages is necessary; ...
We start with a simple example app and extend it step by step as we talk about relationships, advanced data types, concurrency, syncing, and many other topics. Later on, we go well beyond what’s ...
From here, we introduce you to concepts such as arrays, linked lists, as well as abstract data types such as stacks and queues. Next, we'll take you through the basics of functional programming while...
Examine how the core data structure and algorithms knowledge fits into context of JavaScript explained using prototypical inheritance and native JavaScript objects/data types Take a high-level look at...
You will gain hands on experience with complex data types including text, images, and graphs. You will also discover object detection using Deep Neural Networks, which is one of the big, difficult ...
Chapter 2: Types of Data Chapter 3: The Five Steps of Data Science Chapter 4: Basic Mathematics Chapter 5: Impossible or Improbable – A Gentle Introduction to Probability Chapter 6: Advanced ...
This book explains the basic data algorithms without the theoretical jargon, and you’ll get hands-on turning data into insights using machine learning techniques. We will perform data-driven ...
Although there are already some books published on Big Data, most of them only cover basic concepts and society impacts and ignore the internal implementation details―making them unsuitable to R&D ...
Chapter 1: Introduction to R Data Types and Basic Operations Chapter 2: Basic Data Manipulation Chapter 3: Data Manipulation using plyr and dplyr Chapter 4: Reshaping Datasets Chapter 5: R and ...
Understand chart types and when to use specific chart types with different types of data Who This Book Is For Data scientists who have just started using Tableau and want to build on the skills using ...